Skip to content

fix(plugin-e2e): adapt alert rule advanced mode detection to Grafana 13.2#2762

Merged
tolzhabayev merged 1 commit into
mainfrom
fix/alert-rule-advanced-mode-detection
Jul 9, 2026
Merged

fix(plugin-e2e): adapt alert rule advanced mode detection to Grafana 13.2#2762
tolzhabayev merged 1 commit into
mainfrom
fix/alert-rule-advanced-mode-detection

Conversation

@tolzhabayev

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

Grafana 13.2 removed the frontend usage of the alertingQueryAndExpressionsStepMode feature toggle (grafana/grafana#125086), which broke the nightly E2E run (29000729249) in two ways:

  • AlertRuleEditPage.isAdvancedModeSupported() decided the editor mode by reading the toggle from boot data. On 13.2 the toggle is inert, so the page objects assumed the legacy editor while Grafana rendered the simplified step, and getQueryRow() timed out looking for a query row title that doesn't exist there. It now detects the mode from the DOM instead: wait for the query step to mount, then check for the advanced mode switch.
  • alerting.basicMode.spec.ts forces the toggle off to test the legacy no-switch editor. That configuration no longer exists on >= 13.2, so the spec is skipped there. alerting.advancedMode.spec.ts covers the same scenarios on those versions.

Also makes the boot data override mutate the existing featureToggles and user objects in place instead of replacing them. The runtime config keeps a reference to the original object, so replacing it means plugins never see the override when the callback runs after config construction. This is what made queryEditor.tlsEnabled flaky on nightly.

Verified against grafana-enterprise nightly (13.2.0-28985753600, the build that failed in CI), 13.1.0 and 11.0.11: the alerting and feature-toggles suites are green on all three.

Which issue(s) this PR fixes:

n/a

@tolzhabayev tolzhabayev self-assigned this Jul 9, 2026
@grafana-catalog-project-bot grafana-catalog-project-bot Bot moved this from 📬 Triage to 🧑‍💻 In development in Grafana Catalog Team Jul 9, 2026
@tolzhabayev tolzhabayev marked this pull request as ready for review July 9, 2026 09:04
@tolzhabayev tolzhabayev requested a review from a team as a code owner July 9, 2026 09:04
@tolzhabayev

Copy link
Copy Markdown
Collaborator Author

Alternative to #2758

@tolzhabayev tolzhabayev enabled auto-merge (squash) July 9, 2026 09:27

@leventebalogh leventebalogh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 👍

@github-project-automation github-project-automation Bot moved this from 🧑‍💻 In development to 🔬 In review in Grafana Catalog Team Jul 9, 2026
@tolzhabayev tolzhabayev merged commit 8c7df9a into main Jul 9, 2026
37 checks passed
@tolzhabayev tolzhabayev deleted the fix/alert-rule-advanced-mode-detection branch July 9, 2026 09:32
@github-project-automation github-project-automation Bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚀 Shipped

Development

Successfully merging this pull request may close these issues.

3 participants