Skip to content

test(cli): Add regression tests for empty actions on metric alert triggers - #1818

Merged
BYK merged 1 commit into
mainfrom
seer/cli/metric-alert-empty-actions-tests
Nov 2, 2026
Merged

BYK merged 1 commit into
mainfrom
seer/cli/metric-alert-empty-actions-tests

Conversation

@sentry

@sentry sentry Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

In CLI releases up to 0.47.0, sentry alert metrics create/edit invoked validateMetricTriggers, which required every trigger to include a non-empty actions array and failed callers (typically AI coding agents) sending actions: [] with ValidationError: Each trigger must include a non-empty actions array.

Commit 5b7ea24 (#1591) migrated metric alert triggers to native detector conditions and introduced ThresholdTriggerSchema using maxLength(0) for actions, accepting actions: [] and omitting actions from the detector conditions payload.

This PR locks in the fix ahead of release with regression tests:

  • Asserts parseMetricTriggers accepts triggers containing empty actions: [] arrays without error.
  • Asserts createMetricAlertRule strips empty trigger actions when constructing detector conditions.

Fixes CLI-20K

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 2, 2026 10:52pm UTC

Request Review

@github-actions github-actions Bot added the risk: low PR risk score: low label Nov 2, 2026
@BYK
BYK merged commit b2b64c0 into main Nov 2, 2026
27 checks passed
@BYK
BYK deleted the seer/cli/metric-alert-empty-actions-tests branch November 2, 2026 23:16

This branch was previously deployed

1 inactive deployment
Preview — 5e49d92b Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant