Skip to content

test(cli): keep maintenance window dates stable across e2e redeploys [RED-1265] [ship] - #1573

Merged
sorccu merged 2 commits into
mainfrom
simo/RED-1265-stable-maintenance-window-dates
Oct 26, 2026
Merged

sorccu merged 2 commits into
mainfrom
simo/RED-1265-stable-maintenance-window-dates

Conversation

@sorccu

@sorccu sorccu commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Linear: RED-1265

The deploy-project e2e fixture computed its maintenance window's startsAt, endsAt and repeatEndsAt from 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() in e2e/run-checkly.ts now passes CHECKLY_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 to Date.now().

Every spec that uses deploy-project (deploy.spec.ts, destroy.spec.ts) runs the CLI through checklyEnv(), so all of them pick this up.

Testing

  • pnpm run test:e2e e2e/__tests__/deploy.spec.ts e2e/__tests__/destroy.spec.ts against production: 18/18 passed.

🤖 Generated with Claude Code

…[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
sorccu force-pushed the simo/RED-1265-stable-maintenance-window-dates branch from a8e9af2 to b666021 Compare October 26, 2026 14:50
@sorccu sorccu changed the title test(cli): keep maintenance window dates stable across e2e redeploys [RED-1265] test(cli): keep maintenance window dates stable across e2e redeploys [RED-1265] [ship] Oct 26, 2026
github-actions[bot]
github-actions Bot previously approved these changes Oct 26, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: ship/show PR from a same-repo branch.

…D-1265]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: ship/show PR from a same-repo branch.

@sorccu
sorccu merged commit d89338e into main Oct 26, 2026
15 of 16 checks passed
@sorccu
sorccu deleted the simo/RED-1265-stable-maintenance-window-dates branch October 26, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant