Skip to content

ci(playwright): don't fail merge-group runs when baseline push is ruleset-blocked - #31983

Merged
chirag-madlani merged 1 commit into
mainfrom
ci/refresh-baseline-ruleset-graceful
Aug 24, 2026
Merged

ci(playwright): don't fail merge-group runs when baseline push is ruleset-blocked#31983
chirag-madlani merged 1 commit into
mainfrom
ci/refresh-baseline-ruleset-graceful

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Why — urgent follow-up to #31907

The direct-commit baseline refresh from #31907 is being rejected by main's repository ruleset (GH013: Changes must be made through the merge queue) — the workflow token has no bypass grant yet. The job treated the rejection as "main moved, retry", failed after 3 attempts, and turned the first two post-merge full-mode merge_group runs red (32750389130, 32750390655) with all tests green — the exact failure mode this pipeline work exists to prevent.

Fix

Detect ruleset/branch-protection rejections (GH013 / "rule violations" / "protected branch") in the push output and degrade to:

  • a ::warning annotation naming the missing bypass grant,
  • a job-summary note,
  • graceful exit 0 — downstream planning keeps using the current baseline.

Genuine push races (main moved mid-refresh) keep the retry loop and still hard-fail after 3 attempts.

To actually enable auto-refresh (maintainer action)

Grant bypass on the main ruleset ("Changes must be made through the merge queue" / "through a pull request" rules) to the identity the job pushes with — RELEASE_BOT_TOKEN if configured, else the GitHub Actions app. Until then the refresh job logs a warning and skips; nothing goes red.

Tests

  • YAML validated; all 124 CI-script tests pass (no script changes).

🤖 Generated with Claude Code

Greptile Summary

This PR prevents timing-baseline refresh failures from blocking otherwise successful merge-group runs when direct pushes to main are rejected by repository rules.

  • Captures the push exit status and combined output.
  • Converts recognized ruleset or branch-protection rejections into a warning and job-summary notice.
  • Preserves retries and eventual failure for ordinary push races.

Confidence Score: 5/5

The PR appears safe to merge because recognized repository-policy rejections are surfaced without failing merge-group runs, while other push failures still retry and eventually fail.

The changed workflow preserves successful pushes and race retries, and only converts the explicitly intended repository-ruleset rejection path into a warning-backed graceful skip.

Important Files Changed

Filename Overview
.github/workflows/playwright-postgresql-e2e.yml Adds targeted nonfatal handling for ruleset-blocked baseline pushes while retaining retries for other push failures.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Refresh and commit timing baseline] --> B[Push to main]
  B -->|Success| C[Baseline refreshed]
  B -->|Ruleset or branch protection rejection| D[Emit warning and summary]
  D --> E[Exit successfully with existing baseline]
  B -->|Other push failure| F{Attempts remaining?}
  F -->|Yes| A
  F -->|No| G[Fail refresh job]
Loading

Reviews (1): Last reviewed commit: "ci(playwright): don't fail merge-group r..." | Re-trigger Greptile

…eset-blocked

The direct-commit baseline refresh (#31907) hit main's repository
ruleset (GH013: changes must go through the merge queue) because the
workflow token has no bypass grant yet. The job treated that as 'main
moved, retry' and failed after 3 attempts — turning every full-mode
merge_group run red and ejecting innocent PRs (runs 32750389130,
32750390655): the exact failure mode the pipeline exists to prevent.

Detect ruleset rejections in the push output and degrade to a loud
::warning + job-summary note + graceful skip; keep the retry loop and
hard failure for genuine push races. Auto-refresh stays inert until a
maintainer grants the token bypass on the main ruleset.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 24, 2026 17:41

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 was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Aug 24, 2026
@gitar-bot

gitar-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Updates the Playwright CI workflow to gracefully handle ruleset push rejections during baseline refreshes by exiting with a warning instead of failing the merge-group run. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants