Skip to content

[DX-5482] Further adjust Alertgate - #2855

Merged
Tofel merged 3 commits into
mainfrom
dx-5482-adjust-gate
Oct 1, 2026
Merged

Tofel merged 3 commits into
mainfrom
dx-5482-adjust-gate

Conversation

@Tofel

@Tofel Tofel commented Sep 30, 2026

Copy link
Copy Markdown
Contributor
  • Add --exclude-alerts <file|->: an enumerated list subtracted from…the selected alert set, combinable with both --alerts and label selection. A name that does not resolve is an error, and excluding the whole selection exits 2.

  • Rename --no-fail-fast to --fail-fast, on by default. Pass --fail-fast=false to wait for the full window and its coverage proof.

  • When alerts are selected by labels, print each matched rule on its own line before the planned run time, so it is clear what was actually selected.

  • Round an observation window with a subsecond part up to the next whole second (by extending to), so a plan never reads window 9m59.99445781s.

  • Drop the warning that transitionGrace exceeds a quarter of the window; it was noise, not an actionable condition.

… the selected alert set, combinable with both `--alerts` and label selection. A name that does not resolve is an error, and excluding the whole selection exits `2`.

- Rename `--no-fail-fast` to `--fail-fast`, on by default. Pass `--fail-fast=false` to wait for the full window and its coverage proof.
- When alerts are selected by labels, print each matched rule on its own line before the planned run time, so it is clear what was actually selected.
- Round an observation window with a subsecond part up to the next whole second (by extending `to`), so a plan never reads `window 9m59.99445781s`.
- Drop the warning that `transitionGrace` exceeds a quarter of the window; it was noise, not an actionable condition.
Copilot AI balanced review requested due to automatic review settings September 30, 2026 14:06
@Tofel
Tofel requested a review from a team as a code owner September 30, 2026 14:06
@github-actions

Copy link
Copy Markdown

👋 Tofel, thanks for creating this pull request!

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!

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-testing-framework/grafana-alertcheck

View full report

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Log mode can block reading a forbidden stdin exclusion, and exclusion read errors identify the wrong flag.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Enhances Alertgate selection controls, fail-fast configuration, and observation-window reporting.

Changes:

  • Adds --exclude-alerts for named and label-based selections.
  • Renames the fail-fast flag and prints label-selected rules.
  • Rounds subsecond windows and removes transition-grace warnings.
File Description
grafana-alertcheck/​README.md Documents alert exclusions.
internal/​gate/​watch.go Applies exclusions during watch setup.
internal/​gate/​watch_test.go Tests watch selection behavior.
internal/​gate/​schedule.go Rounds windows and simplifies summaries.
internal/​gate/​schedule_test.go Tests timing summaries and rounding.
internal/​gate/​labels.go Implements exclusions and selection output.
internal/​gate/​labels_test.go Tests exclusion resolution and output.
internal/​gate/​check.go Integrates exclusions and rounded windows.
internal/​gate/​check_test.go Tests updated check behavior.
docs/​reference/​cli.md Updates the CLI reference.
docs/​index.md Updates introductory usage guidance.
docs/​how-alerts-are-evaluated.md Documents timing and fail-fast changes.
docs/​architecture.md Updates fail-fast architecture notes.
cmd/​watch.go Adds watch exclusion parsing.
cmd/​watch_test.go Tests conflicting stdin sources.
cmd/​common.go Registers the exclusion flag.
cmd/​check.go Adds exclusion and fail-fast CLI handling.
cmd/​check_test.go Tests changed check flags.
.changeset/​v0.1.8.md Records release changes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread grafana-alertcheck/cmd/check.go Outdated
Comment thread grafana-alertcheck/cmd/common.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation consistently covers the documented behavior with focused validation and regression tests.

Review effort: Balanced
Findings: None

Resolved since last review (2)

sebawo
sebawo previously approved these changes Oct 1, 2026
@Tofel
Tofel enabled auto-merge (squash) October 1, 2026 07:42
@Tofel
Tofel merged commit ddc9372 into main Oct 1, 2026
62 checks passed
@Tofel
Tofel deleted the dx-5482-adjust-gate branch October 1, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants