Move the daily release compat date 7 days into the future#6043
Move the daily release compat date 7 days into the future#6043
Conversation
|
IMO we should also adjust the validation code to still enforce that the date can't be newer than today. diff --git a/src/workerd/io/compatibility-date.c++ b/src/workerd/io/compatibility-date.c++
index be2ec8b4f..6db121f05 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: |
|
We should do a changelog on this or some other kind of comms. New docs and link to them as part of the error message. Happy to help do that. |
Merging this PR will degrade performance by 16.3%
Performance Changes
Comparing Footnotes
|
1661c71 to
2ceb59c
Compare
2ceb59c to
e27fb8b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6043 +/- ##
==========================================
- Coverage 70.66% 70.65% -0.01%
==========================================
Files 409 409
Lines 109381 109388 +7
Branches 18072 18073 +1
==========================================
- Hits 77289 77284 -5
- Misses 21244 21256 +12
Partials 10848 10848 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e27fb8b to
a211cb8
Compare
6813c4b to
ea3dcce
Compare
86f87b8 to
e14aba6
Compare
|
This is a breaking change that caused a regression when consuming workerd npm package |
Fixes #6008