ci: cancel superseded workflow runs and bump anchore-scan action#462
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughCD workflow: pins the Anchore scan action to a new mattermost/actions/delivery/anchore-scan commit for both standard and FIPS steps. CI workflow: adds a top-level concurrency block grouping runs by workflow+ref and conditionally cancels in-progress runs for pull_request events. ChangesWorkflow Configuration Updates
🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
NARSimoes
left a comment
There was a problem hiding this comment.
Thanks @esarafianou , just a minor clarification
| - "v**" | ||
| pull_request: | ||
|
|
||
| concurrency: |
There was a problem hiding this comment.
Just a sanity check: with the current configuration each new push to master cancels the previous in-progress ci run on refs/heads/master, because they share one concurrency group and cancel-in-progress: true. So, this can happens if we fast merge multiple pull-request which might affect some docker pushes that we do in CI. If this is accurate I wonder if we should just cancel in pull-request (e.g. cancel-in-progress: ${{ github.event_name == 'pull_request' }}).
There was a problem hiding this comment.
Good catch, addressing now.
Previously the concurrency block cancelled in-progress runs on every event. On master/tag pushes the build/build-fips jobs run docker-push, so fast-merging PRs could cancel an in-flight master CI mid push and leave Docker Hub in a partial state. Restrict cancel-in-progress to pull_request events so PR pushes still supersede their predecessors while master/tag CI is allowed to complete. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
.github/workflows/ci.yml— add a top-levelconcurrencyblock (group: ${{ github.workflow }}-${{ github.ref }},cancel-in-progress: true). On PR Update golang version to 1.26.3 #461 we observed three runs (Add Anchore Scan in CD #433/Bump github/codeql-action from 3.30.6 to 4.30.8 in the github-actions-updates group #434/"db opened", advice to get to next step? #435) all in progress for the same branch; with this block, new pushes on a PR branch supersede their in-flight predecessors while pushes tomasterand tag refs remain isolated (each gets its own ref-scoped group)..github/workflows/cd.yml— bumpmattermost/actions/delivery/anchore-scanfrom003fac68730de6e3e2dc31939e7f2c460f2a8ba0to354df0f666759a18085c7c7135db533f6b1da367(currentHEADofmattermost/actions, "Update anchorectl to match instance version (update olm #56)", 2026-05-20). Bothanchore-operatorandanchore-operator-fipssteps updated to keep the pinned SHA current.Made with Cursor