From c6b38afb1aec56fca499cc520c6aec361ef7d710 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Mon, 9 Feb 2026 18:22:42 +0000 Subject: [PATCH 1/3] Move the daily release compat date 7 days into the future --- .github/workflows/daily-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily-release.yml b/.github/workflows/daily-release.yml index e98f284306a..52ecff0ae62 100644 --- a/.github/workflows/daily-release.yml +++ b/.github/workflows/daily-release.yml @@ -22,7 +22,7 @@ jobs: - name: Get current date id: date - run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + run: echo "date=$(date -d '+7 days' +'%Y-%m-%d')" >> $GITHUB_OUTPUT - name: Update compatibility date run: | From b3dd9d2c0bde66392288a88ba393551c6cec7a5c Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Mon, 9 Feb 2026 18:38:59 +0000 Subject: [PATCH 2/3] Check for future dates as well --- src/workerd/io/compatibility-date.c++ | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/workerd/io/compatibility-date.c++ b/src/workerd/io/compatibility-date.c++ index be2ec8b4f42..6db121f0578 100644 --- a/src/workerd/io/compatibility-date.c++ +++ b/src/workerd/io/compatibility-date.c++ @@ -115,6 +115,16 @@ static void compileCompatibilityFlags(kj::StringPtr compatDate, "date supported by this server binary is \"", SUPPORTED_COMPATIBILITY_DATE, "\".")); } + + // workerd is built with SUPPORTED_COMPATIBILITY_DATE set a little bit into the futurue, so + // that the build can support setting the compat date to today until the next release is + // ready. But we don't want people to actually set their compat date in the future, so let's + // check against the clock time as well. + if (CompatDate::today() < parsedCompatDate) { + errorReporter.addError( + kj::str("Can't set compatibility date in the future: ", parsedCompatDate)); + } + break; case CompatibilityDateValidation::CURRENT_DATE_FOR_CLOUDFLARE: From f383b8804fb7d11d47783eccf0008add14b7fe8b Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Mon, 9 Feb 2026 18:47:36 +0000 Subject: [PATCH 3/3] Make message more verbose --- src/workerd/io/compatibility-date.c++ | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/workerd/io/compatibility-date.c++ b/src/workerd/io/compatibility-date.c++ index 6db121f0578..7c18ef29d6e 100644 --- a/src/workerd/io/compatibility-date.c++ +++ b/src/workerd/io/compatibility-date.c++ @@ -121,16 +121,16 @@ static void compileCompatibilityFlags(kj::StringPtr compatDate, // ready. But we don't want people to actually set their compat date in the future, so let's // check against the clock time as well. if (CompatDate::today() < parsedCompatDate) { - errorReporter.addError( - kj::str("Can't set compatibility date in the future: ", parsedCompatDate)); + errorReporter.addError(kj::str("Can't set compatibility date in the future: \"", + parsedCompatDate, "\". Today's date (UTC) is \"", CompatDate::today(), "\".")); } break; case CompatibilityDateValidation::CURRENT_DATE_FOR_CLOUDFLARE: if (CompatDate::today() < parsedCompatDate) { - errorReporter.addError( - kj::str("Can't set compatibility date in the future: ", parsedCompatDate)); + errorReporter.addError(kj::str("Can't set compatibility date in the future: \"", + parsedCompatDate, "\". Today's date (UTC) is \"", CompatDate::today(), "\".")); } break;