Skip to content

ci: Add more concurrency cancellation#4199

Open
backspace wants to merge 9 commits intomainfrom
ci-concurrency-cancellation
Open

ci: Add more concurrency cancellation#4199
backspace wants to merge 9 commits intomainfrom
ci-concurrency-cancellation

Conversation

@backspace
Copy link
Contributor

@backspace backspace commented Mar 17, 2026

This causes more CI jobs to cancel when a newer commit is made, which is common when
accepting automated review suggestions. There’s no reason jobs should still be running
from the older commit when I’ve made so many more since I pushed it:

boxel 2026-03-17 16-17-22

Many uses of always() are now using !cancelled(). We were using the former to ensure
some jobs or steps ran even when previous ones failed; this continues that but makes them
cancel for concurrency reasons.

@cardstack cardstack deleted a comment from github-actions bot Mar 17, 2026
@cardstack cardstack deleted a comment from github-actions bot Mar 17, 2026
@github-actions
Copy link

Preview deployments

@github-actions
Copy link

github-actions bot commented Mar 18, 2026

Host Test Results

    1 files  ±0      1 suites  ±0   2h 28m 38s ⏱️ - 2m 26s
2 025 tests ±0  2 010 ✅ ±0  15 💤 ±0  0 ❌ ±0 
2 040 runs  ±0  2 025 ✅ ±0  15 💤 ±0  0 ❌ ±0 

Results for commit e29e5e0. ± Comparison against base commit 9166312.

♻️ This comment has been updated with latest results.

@backspace backspace marked this pull request as ready for review March 18, 2026 02:52
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 96c92cf05a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

with:
skip_catalog: true
concurrency:
group: ci-host-test-web-assets-${{ github.head_ref || github.run_id }}

Choose a reason for hiding this comment

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

P2 Badge Include fork identity in new concurrency groups

On pull_request runs, github.head_ref is only the source branch name. This new group key will therefore collide for unrelated PRs from different forks that both use a common branch name such as main or patch-1, so one contributor's push can cancel another PR's host asset build. Including the fork repo (or PR number) in the group would avoid these cross-PR cancellations.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Historically we haven’t been getting PRs from forks, but we can revisit this if it becomes a problem

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates GitHub Actions workflows to more aggressively cancel superseded CI work when newer commits are pushed (especially on PR branches), by adding/expanding concurrency + cancel-in-progress and replacing some always() conditions with !cancelled() to preserve “run on failure” behavior while respecting cancellations.

Changes:

  • Add/expand job-level concurrency groups with cancel-in-progress: true across multiple workflows.
  • Replace selected if: always() usages with if: ${{ !cancelled() }} so post-failure steps still run, but cancellation stops extra work.
  • Adjust preview workflows so older preview deploy/comment jobs get cancelled when new commits arrive.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/yaml-lint.yml Adds concurrency cancellation to the YAML lint job.
.github/workflows/preview-host.yml Adds concurrency cancellation to preview host jobs; updates comment job condition to respect cancellation.
.github/workflows/preview-comment.yml Adds concurrency cancellation to the reusable preview-comment workflow job.
.github/workflows/pr-boxel-ui.yml Adds concurrency cancellation to UI preview jobs; updates comment job condition to respect cancellation.
.github/workflows/diff-skills.yaml Adds concurrency cancellation to the diff-skills reusable workflow job.
.github/workflows/ci.yaml Adds concurrency cancellation to the test-web-assets call; updates several artifact/log steps and a report-merge job to use !cancelled().
.github/workflows/ci-lint.yaml Updates many lint/build steps to use !cancelled() so they still run on failures but not on cancellation.
.github/workflows/ci-host.yaml Adds concurrency cancellation to the test-web-assets call and follow-up jobs; updates artifact/log steps and finalization/publish jobs to use !cancelled().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@backspace backspace requested a review from a team March 18, 2026 15:59
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.

3 participants