Repository navigation
test(cli): Add regression tests for empty actions on metric alert triggers - #1818
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
BYK
approved these changes
Nov 2, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In CLI releases up to 0.47.0,
sentry alert metrics create/editinvokedvalidateMetricTriggers, which required every trigger to include a non-emptyactionsarray and failed callers (typically AI coding agents) sendingactions: []withValidationError: Each trigger must include a non-empty actions array.Commit 5b7ea24 (#1591) migrated metric alert triggers to native detector conditions and introduced
ThresholdTriggerSchemausingmaxLength(0)for actions, acceptingactions: []and omitting actions from the detector conditions payload.This PR locks in the fix ahead of release with regression tests:
parseMetricTriggersaccepts triggers containing emptyactions: []arrays without error.createMetricAlertRulestrips 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 runThis PR was automatically generated by Sentry. You can adjust this setting at any time.