Make updating actions cache synchronous - #7712
Conversation
📝 WalkthroughWalkthroughA 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
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 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)
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. Comment |
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }} | ||
| cancel-in-progress: false |
There was a problem hiding this comment.
I'm on the fence regarding setting this to true.
What do you think @fanninpm?
There was a problem hiding this comment.
Setting this to true should be safe as long as all the caches are uploaded at the very end of the workflow.
There was a problem hiding this comment.
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.
fanninpm
left a comment
There was a problem hiding this comment.
This is good as it currently stands.
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