Repository navigation
fix(webapp): forward condition value and windowSec in queryWatchFromPatch (#5065) #5071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,6 +67,8 @@ export function queryWatchFromPatch(patch: AlertDraftPatch): QueryWatchPrefill | | |
| mode: patch.querySignalChoice?.mode, | ||
| measure: patch.querySignalChoice?.measure, | ||
| operator: patch.condition?.operator, | ||
| value: patch.condition?.value, | ||
| windowSec: patch.condition?.windowSec, | ||
|
Comment on lines
+70
to
+71
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Query watch fix missing release note This user-facing query watch fix has no Learn moreThe repository's server changes guidance requires a release note for a user-facing server-only bug fix. This change restores query watch condition and window prefills for customers, but the PR adds no release note. Example: A customer whose query alert previously lost its threshold now sees it prefilled, but the release summary does not mention the fix. Recommended fix: Add a Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| }; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Query watch windows shorten unexpectedly
For a query patch requesting 630 seconds,
prefillWindowMinutesbecomes 10 instead of 11. The created alert watches a shorter interval than requested.Learn more
Query watch alerts store their windows in whole minutes. The patch contract accepts any number of seconds, and applyDraftPatch rounds curated alert windows up. Rounding to the nearest minute here shortens intervals with a remainder under 30 seconds. The resulting window is used by queryAlertRequestBody when the alert is created.
Example: With a 601-second patch window and a 600-second minimum cadence, this code prefills 10 minutes and creates a 600-second alert rather than covering all 601 seconds.
Recommended fix: Use
Math.ceil(prefill.windowSec / 60)before checking the analysis bounds, matchingapplyDraftPatchand avoiding a shorter requested interval.Was this helpful? React with 👍 or 👎 to provide feedback.