Skip to content

ci: per-PR concurrency for visual-regression and preview runs - #2718

Open
matyasf wants to merge 2 commits into
masterfrom
ci/harden-gh-pages-cleanup
Open

matyasf wants to merge 2 commits into
masterfrom
ci/harden-gh-pages-cleanup

Conversation

@matyasf

@matyasf matyasf commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • visual-regression: replace the repo-wide gh-pages concurrency group with one group per PR and cancel-in-progress. The shared group cancelled other PRs' queued runs (8 of the last 12 cancellations), so those PRs got no report for that commit
  • visual-regression: drop the closed trigger and the cleanup job; removal of closed-PR folders moves to the daily cleanup in ci: add a daily cleanup of the gh-pages previews #2719
  • preview: cancel-in-progress so a newer push cancels a deploy still running for an older commit

Test Plan

  • Push two commits to this PR a minute apart: the first visual-regression and preview runs should be cancelled, not queued
  • Push to two different PRs at the same time: neither visual-regression run should be cancelled

Fixes INSTUI-5192

🤖 Generated with Claude Code

…s reliable

Folders for closed PRs piled up on gh-pages (3.1 GB checkout, 121 stale folders) because the
event-based cleanup lost in several ways: push races between the two close-event jobs, a repo-wide
concurrency group that cancelled queued runs, and slow deploys finishing after the removal and
re-creating the folder.

- Add gh-pages-dir.sh: replaces or removes one directory on gh-pages, retrying from a fresh
  shallow fetch when the push is rejected
- visual-regression: per-PR concurrency group with cancel-in-progress, publish and cleanup both
  go through the script, cleanup no longer clones the full gh-pages history
- preview: cancel-in-progress so a close run cancels an in-flight deploy

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@matyasf matyasf self-assigned this Sep 16, 2026
@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2718/

Built to branch gh-pages at 2026-09-16 13:07 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

Copy link
Copy Markdown
Contributor

Visual regression report

Cypress suite: ✅ Passing

Visual diff: ⚠️ Changes detected.

Status Count
Unchanged 95
Changed 1
New 0
Removed 0

Accessibility (axe): ✅ No violations.

📊 View full report — click a screenshot's ⚠ badge to see each violation boxed on the image, with the offending element named and contrast failures shown as color swatches.

Diff images (1)

badge-canvas.png — 1573 pixels differ

Baselines come from the visual-baselines branch. They refresh on every merge to master. The Cypress suite line covers the a11y and console-error assertions — a ❌ there means the suite found real issues even if the visual diff is clean.

github-actions Bot added a commit that referenced this pull request Sep 16, 2026
@matyasf
matyasf requested review from HerrTopi and balzss and removed request for HerrTopi and balzss September 16, 2026 09:23
The daily cleanup in gh-pages-cleanup.yml (PR #2719) owns removal of closed-PR folders, so the
close-event cleanup job and the retrying push script are not needed. What remains fixes a
different bug: the repo-wide `gh-pages` concurrency group cancelled other PRs' queued
visual-regression runs, so those PRs got no report for that commit.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@matyasf matyasf changed the title ci: make gh-pages cleanup of PR previews and visual-regression reports reliable ci: per-PR concurrency for visual-regression and preview runs Sep 16, 2026
if: steps.diff.outcome == 'failure' || steps.cypress.outcome == 'failure'
run: exit 1

cleanup-report:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The left lots of reports still in the repo. A daily job does now this much better: #2719

github-actions Bot pushed a commit that referenced this pull request Sep 16, 2026
@matyasf
matyasf requested a review from balzss September 16, 2026 13:17
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.

1 participant