Skip to content

New commits on a PR trigger cancellation of previous actions#7614

Merged
erosselli merged 2 commits intomainfrom
erosselli/concurrency-for-actions
Mar 10, 2026
Merged

New commits on a PR trigger cancellation of previous actions#7614
erosselli merged 2 commits intomainfrom
erosselli/concurrency-for-actions

Conversation

@erosselli
Copy link
Copy Markdown
Contributor

@erosselli erosselli commented Mar 10, 2026

Ticket []

Description Of Changes

Code Changes

Steps to Confirm

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
    • No UX review needed
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

Summary by CodeRabbit

  • Chores
    • Optimized CI/CD workflow efficiency by implementing run management across development branches.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Mar 10, 2026 6:31pm
fides-privacy-center Ignored Ignored Mar 10, 2026 6:31pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 79aadf5c-79d1-41a0-bdcf-cbc2a4128bdd

📥 Commits

Reviewing files that changed from the base of the PR and between d7e6eb2 and ca404a9.

📒 Files selected for processing (11)
  • .github/workflows/backend_checks.yml
  • .github/workflows/check_changelog.yml
  • .github/workflows/check_pr_size.yml
  • .github/workflows/chromatic.yml
  • .github/workflows/cli_checks.yml
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/cypress_admin-ui.yml
  • .github/workflows/cypress_fides-js.yml
  • .github/workflows/cypress_privacy-center.yml
  • .github/workflows/frontend_checks.yml
  • .github/workflows/static_checks.yml

📝 Walkthrough

Walkthrough

The pull request adds concurrency configuration blocks to 10 GitHub Actions workflows. Each concurrency block groups runs by workflow name and git reference, with automatic cancellation of in-progress runs enabled for all branches except main.

Changes

Cohort / File(s) Summary
GitHub Actions Concurrency Configuration
.github/workflows/backend_checks.yml, .github/workflows/check_changelog.yml, .github/workflows/check_pr_size.yml, .github/workflows/chromatic.yml, .github/workflows/cli_checks.yml, .github/workflows/codeql-analysis.yml, .github/workflows/cypress_admin-ui.yml, .github/workflows/cypress_fides-js.yml, .github/workflows/cypress_privacy-center.yml, .github/workflows/frontend_checks.yml, .github/workflows/static_checks.yml
Added concurrency block to each workflow with group key derived from ${{ github.workflow }}-${{ github.ref }} and cancel-in-progress enabled for non-main branches.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 With concurrency blocks now in place,
No workflows will overlap or race,
Main branch runs safe, others compressed,
GitHub's queue gets a well-deserved rest! ✨

Hops away contentedly 🐇

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is entirely a template with no actual content filled in. All sections contain only placeholder comments with no substantive information about the changes, rationale, or verification steps. Fill in the PR template sections with actual content: add ticket number, describe the concurrency changes, list modified files, provide confirmation steps, and complete the pre-merge checklist items.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding concurrency configurations to GitHub Actions workflows to cancel previous runs when new commits arrive on non-main branches.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch erosselli/concurrency-for-actions

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

@erosselli erosselli marked this pull request as ready for review March 10, 2026 18:33
@erosselli erosselli enabled auto-merge March 10, 2026 18:34
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 10, 2026

Greptile Summary

This PR adds a concurrency block to all 11 GitHub Actions workflow files, cancelling in-progress workflow runs when new commits are pushed to a PR branch, while preserving runs on main (and scheduled runs, which also target main). This is a standard GitHub Actions optimization that avoids wasting CI resources on stale runs.

  • All 11 workflow files receive the same consistent 4-line concurrency addition with group: ${{ github.workflow }}-${{ github.ref }} and cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
  • The codeql-analysis.yml workflow also has a weekly scheduled trigger (cron: '00 6 * * 1'); since scheduled events run against refs/heads/main, cancel-in-progress will correctly evaluate to false for those runs, preventing security scans from being prematurely cancelled
  • Workflows that only trigger on pull_request (e.g. check_changelog.yml, check_pr_size.yml) will have cancel-in-progress always evaluate to true, which is the expected and correct behavior since PRs never have github.ref == refs/heads/main
  • Pushes to release-** branches will also have cancel-in-progress: true — this is intentional and consistent with wanting cancellation everywhere except main

Confidence Score: 5/5

  • This PR is safe to merge — changes are purely additive CI configuration with no impact on application code.
  • The changes are identical, low-risk YAML additions across 11 workflow files. The concurrency pattern used is a well-established GitHub Actions best practice. The cancel-in-progress guard correctly preserves runs on main, including both push-triggered and scheduled runs (e.g. CodeQL). No application logic is touched.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/backend_checks.yml Adds standard concurrency block to cancel in-progress runs on new commits, protecting main branch from cancellation.
.github/workflows/check_changelog.yml Adds concurrency block with cancel-in-progress logic; note this workflow only triggers on pull_request so cancel-in-progress will always be true (PRs never have ref == refs/heads/main).
.github/workflows/check_pr_size.yml Adds concurrency block; minor formatting note — no blank line before the concurrency key unlike other files, but valid YAML.
.github/workflows/chromatic.yml Adds standard concurrency block, consistent with other workflow files.
.github/workflows/cli_checks.yml Adds standard concurrency block, consistent with other workflow files.
.github/workflows/codeql-analysis.yml Adds concurrency block to a workflow that also has a scheduled trigger (weekly cron). Scheduled runs fire on the default branch (main), so cancel-in-progress will be false — preventing overlapping security scans from interfering with each other. Behavior is correct.
.github/workflows/cypress_admin-ui.yml Adds standard concurrency block, consistent with other workflow files.
.github/workflows/cypress_fides-js.yml Adds standard concurrency block, consistent with other workflow files.
.github/workflows/cypress_privacy-center.yml Adds standard concurrency block, consistent with other workflow files.
.github/workflows/frontend_checks.yml Adds standard concurrency block, consistent with other workflow files.
.github/workflows/static_checks.yml Adds standard concurrency block, consistent with other workflow files.

Last reviewed commit: ca404a9

@erosselli erosselli added this pull request to the merge queue Mar 10, 2026
Merged via the queue into main with commit 0c3fde7 Mar 10, 2026
64 of 65 checks passed
@erosselli erosselli deleted the erosselli/concurrency-for-actions branch March 10, 2026 20:19
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.

2 participants