Skip to content

feat(cli): add timezone and pause/silence scope to maintenance windows [RED-1015] - #1466

Open
shiini2 wants to merge 3 commits into
mainfrom
manel/parity-maintenance-window-scope
Open

shiini2 wants to merge 3 commits into
mainfrom
manel/parity-maintenance-window-scope

Conversation

@shiini2

@shiini2 shiini2 commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Linear: RED-1015

Adds timezone, pauseAllChecks, silenceAlertsTags and silenceAllAlerts to the MaintenanceWindow construct, and makes tags optional. The CLI deploy schema already accepts all of these, so no backend change is needed. checkly import round-trips the new properties.

timezone is sent as null when omitted. Project deploys update maintenance windows as a patch: a missing timezone keeps the stored zone, so deleting it from code would otherwise do nothing. With null, removing it resets the window to UTC. The other three fields don't need this because the deploy schema defaults them when they're omitted.

TimeZone type. Editors suggest the canonical IANA names (tzdata 2026c zone.tab plus UTC), and any other string is still accepted. The list uses current names such as Europe/Kyiv, not the legacy CLDR ids Intl returns, because the API stores current names.

Validation. validate() rejects UTC offsets (+05:00, Etc/GMT+5), which the API also rejects, and names that Intl doesn't recognize. Listed names skip the Intl check, because older Node releases ship older tzdata.

Warning for a window with no scope. Now that tags is optional, validate() warns (without failing) when a window sets neither a pause scope (tags/pauseAllChecks) nor a silence scope (silenceAlertsTags/silenceAllAlerts). Such a window would affect no checks.

Upgrade note. The first deploy after upgrading resets any timezone set for a CLI-managed window in the web app. If a maintenance is active at that moment, the deploy fails until the maintenance ends, because the API rejects timezone changes on an active window. The fix is to declare the timezone in code.

Related:

🤖 Generated with Claude Code

shiini2 and others added 2 commits September 30, 2026 02:01
Send `timezone: null` when the property is omitted. Project deploys
update maintenance windows as a patch, so an omitted timezone kept the
stored zone and removing it from code had no effect.

Add a `TimeZone` type that suggests canonical IANA names (tzdata 2026c
zone.tab plus UTC) while still accepting any string, and reject UTC
offsets and unknown zone names during validation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With `tags` optional, a window can set neither a pause scope nor a
silence scope and would deploy without affecting any check, so
validation now warns about it.

Import codegen emits `tags` only when the window has some, the time
zone check moves next to the `TimeZone` type, and the AI context
describes the silence scope and `timezone`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sorccu
sorccu force-pushed the manel/parity-maintenance-window-scope branch from 08c00e7 to 0250a1c Compare September 29, 2026 17:35
@sorccu sorccu changed the title feat: add timezone and pause/silence scope to the maintenance window construct feat(cli): add timezone and pause/silence scope to maintenance windows [RED-1015] Sep 29, 2026
@sorccu
sorccu marked this pull request as ready for review September 29, 2026 17:41

This branch has not been deployed

No deployments
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.

2 participants