Repository navigation
fix(api): resolve a vanished alert group with its values - #3507
kodiakhq[bot] merged 4 commits into
Conversation
Store a group-by alert group's values on its history row and fall back to
them when the group has no rows left at resolve time, so
{{attributes.x}} and {{var.x}} render instead of coming out empty.
The joined group string cannot be parsed back into values.
|
@andrewdunndev is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: c8d13d2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
PR Review✅ No issues found. |
Deep Review✅ No critical issues found. This is a clean, backward-compatible additive change. The new 🟡 P2 — recommended
🔵 P3 nitpicks (2)
Reviewers (11): correctness, adversarial, data-migrations, api-contract, reliability, performance, testing, maintainability, kieran-typescript, project-standards, previous-comments. Testing gaps:
No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
|
Thanks, all three are in 3b2a6d9: |
Summary
Closes #3470
Stores a grouped alert's group-by values on its history row and reads them back at resolve time, so
{{attributes.*}}and{{var.*}}are filled in when a group resolves after it has disappeared from the data. Until now they rendered empty on that resolve: the group had no rows left to read values from, and the joinedgroupstring on the history row cannot be split back into values.groupValuesis a list of{ key, value }pairs rather than an object, since group-by column names can contain dots and Mongo would read them as nested paths.groupValues; they resolve as they do today, and the next evaluation of a live group stores the values.{{var}}is empty on the resolve of a vanished group.How to reproduce
Starting point:
yarn dev, a webhook destination whose body template uses{{var.service}}, and a group-by alert onservice.On
main:servicevalue, then stop sending data for that value and wait out the alert window.{{var.service}}.On this branch:
servicevalue.make dev-int FILE=checkAlertsruns the new cases: plain and dotted aliases, a generic webhook body, an empty value, and a legacy row.How to test on Vercel preview
N/A, API-only change
References