Skip to content

ci: cancel superseded workflow runs and bump anchore-scan action#462

Merged
esarafianou merged 3 commits into
masterfrom
ci/workflow-hardening
May 20, 2026
Merged

ci: cancel superseded workflow runs and bump anchore-scan action#462
esarafianou merged 3 commits into
masterfrom
ci/workflow-hardening

Conversation

@esarafianou

Copy link
Copy Markdown
Contributor

Summary

NONE

Made with Cursor

esarafianou and others added 2 commits May 20, 2026 14:54
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@mm-cloud-bot mm-cloud-bot added the release-note-none Denotes a PR that doesn't merit a release note. label May 20, 2026
@esarafianou esarafianou requested a review from NARSimoes May 20, 2026 12:24
@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a339214a-5afe-41b4-8054-e0a83e9eeb74

📥 Commits

Reviewing files that changed from the base of the PR and between 19d54f9 and c99d0a5.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

CD 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.

Changes

Workflow Configuration Updates

Layer / File(s) Summary
Anchore action version bump
.github/workflows/cd.yml
security/anchore-scan and security/anchore-scan-fips steps now reference a new pinned commit of the mattermost/actions/delivery/anchore-scan action; all step inputs remain unchanged.
CI workflow concurrency policy
.github/workflows/ci.yml
Top-level concurrency block added to group runs by ${{ github.workflow }}-${{ github.ref }} and cancel in-progress runs when the event is a pull_request.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes both main changes: adding workflow concurrency policy to cancel superseded runs and bumping the anchore-scan action.
Description check ✅ Passed The description provides detailed context for both changes, including specific commit hashes, the rationale for the concurrency policy, and references to related issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/workflow-hardening

Comment @coderabbitai help to get the list of available commands and usage tips.

@NARSimoes NARSimoes 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.

Thanks @esarafianou , just a minor clarification

Comment thread .github/workflows/ci.yml
- "v**"
pull_request:

concurrency:

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.

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' }}).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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>
@esarafianou esarafianou requested a review from NARSimoes May 20, 2026 13:01
@esarafianou esarafianou merged commit fc965d2 into master May 20, 2026
14 checks passed
@esarafianou esarafianou deleted the ci/workflow-hardening branch May 20, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants