You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
watch and single-step check can now select alerts by labels instead of names: --include-labels team=bcm,env=stage, optionally refined with --exclude-labels severity=info. Matches are exact; label selection cannot be combined with --alerts or --folder, and is refused with --in. A selection that matches no rules exits 2.
To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.
Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!
Scope dependent flags to their valid selection branches
grafana-alertcheck/cmd/check.go:19
The synopsis places --exclude-labels and --folder outside the selection alternatives, so --help advertises invalid combinations such as --alerts ... --exclude-labels ... and --include-labels ... --folder ..., both of which validation rejects. Scope each dependent flag to its valid branch.
Scope dependent flags to their valid selection branches
grafana-alertcheck/cmd/watch.go:16
The synopsis places --exclude-labels and --folder outside the selection alternatives, so --help advertises invalid combinations such as --alerts ... --exclude-labels ... and --include-labels ... --folder ..., both of which validation rejects. Scope --folder to the alert-name branch and --exclude-labels to the label branch.
Nest folder and exclusion flags under valid selection branches
grafana-alertcheck/docs/reference/cli.md:30
This synopsis currently presents --exclude-labels and --folder as valid with either selection mode, although the documented and implemented constraints reject exclusions without label inclusion and reject folders with labels. Group these flags under the branch where each is accepted.
This issue also appears on line 69 of the same file.
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
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.
watchand single-stepcheckcan now select alerts by labels instead of names:--include-labels team=bcm,env=stage, optionally refined with--exclude-labels severity=info. Matches are exact; label selection cannot be combined with--alertsor--folder, and is refused with--in. A selection that matches no rules exits2.