Repository navigation
test(cli): keep maintenance window dates stable across e2e redeploys [RED-1265] [ship] - #1573
Merged
Merged
Conversation
…[RED-1265] The deploy-project fixture computed its maintenance window dates from the current time on every deploy. The API compares an active window's dates at minute precision and rejects changes, so a test that redeploys the fixture failed whenever its two deploys landed in different clock minutes. The e2e harness now passes FIXTURE_NOW, fixed once per test file, and the fixture derives its dates from it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sorccu
force-pushed
the
simo/RED-1265-stable-maintenance-window-dates
branch
from
October 26, 2026 14:50
a8e9af2 to
b666021
Compare
…D-1265] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear: RED-1265
The
deploy-projecte2e fixture computed its maintenance window'sstartsAt,endsAtandrepeatEndsAtfrom the current time on every deploy. The API compares an active window's dates at minute precision and rejects a change with "Complete, cancel, or delete the active maintenance before changing the schedule dates." The deploy test "owns the intent and the automatic-repair override: a redeploy clears what was set in Checkly" deploys the fixture twice about 10s apart, so it failed whenever the two deploys landed in different clock minutes. This was seen on the Windows e2e shard in #1572.checklyEnv()ine2e/run-checkly.tsnow passesCHECKLY_E2E_FIXTURE_NOW, an ISO timestamp fixed once when each test file loads, and the fixture derives its dates from it. Redeploys within a file therefore send identical dates. The window still starts at the file's start time and lasts an hour, so it is active when redeployed, which the fixture's timezone comment depends on. Outside the harness the fixture falls back toDate.now().Every spec that uses
deploy-project(deploy.spec.ts,destroy.spec.ts) runs the CLI throughchecklyEnv(), so all of them pick this up.Testing
pnpm run test:e2e e2e/__tests__/deploy.spec.ts e2e/__tests__/destroy.spec.tsagainst production: 18/18 passed.🤖 Generated with Claude Code