Skip to content

Make updating actions cache synchronous - #7712

Merged
youknowone merged 1 commit into
RustPython:mainfrom
ShaharNaveh:upd-cache-seq
May 1, 2026
Merged

Make updating actions cache synchronous#7712
youknowone merged 1 commit into
RustPython:mainfrom
ShaharNaveh:upd-cache-seq

Conversation

@ShaharNaveh

@ShaharNaveh ShaharNaveh commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

If multiple PRs are being merged in a short period of time multiple runs of the workflow can trigger, and cause a little race condition regarding what is considered the latest cache. This PR makes it so no more than 1 run of updating the cache can run at any given time

@coderabbitai

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

A concurrency block is added to the GitHub Actions workflow configuration file to manage concurrent workflow runs. The block groups runs by workflow name and disables cancellation of in-progress runs, preventing concurrent execution conflicts.

Changes

Cohort / File(s) Summary
Workflow Configuration
.github/workflows/update-caches.yml
Added top-level concurrency block with workflow name grouping and cancel-in-progress: false to prevent cancellation of in-progress runs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested reviewers

  • fanninpm
  • youknowone

Poem

🐰 Workflows now dance in orderly lines,
No cancellations, just perfect signs,
Concurrency grouped with graceful care,
Updates cache with time to spare!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Make updating actions cache synchronous' directly describes the main change—adding concurrency controls to enforce sequential cache updates and prevent race conditions.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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


concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

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.

I'm on the fence regarding setting this to true.

What do you think @fanninpm?

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.

Setting this to true should be safe as long as all the caches are uploaded at the very end of the workflow.

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.

Setting this to true would cause running jobs to be canceled if there's a new one in queue. So in theory, the caches would never update until there will be no pushes to main for long period of time (depends on how many PRs were merged at that time window).

Setting this to false would never cancel already running jobs, but will skip any in-queue job that wasn't started yet.

@youknowone
youknowone requested a review from fanninpm April 30, 2026 02:02

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

This is good as it currently stands.

@ShaharNaveh
ShaharNaveh requested a review from youknowone May 1, 2026 13:59
@youknowone
youknowone merged commit 0f25d14 into RustPython:main May 1, 2026
20 checks passed
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