Skip to content

Conversation

supersonicbyte
Copy link
Collaborator

@supersonicbyte supersonicbyte commented Sep 18, 2024

Disabling concurrency for workflows on a branch can be helpful to reduce redundant jobs executions. For example:
• I made a PR and it triggers the CI workflows
• I notice that I have a typo in the tests and I that it will cause the tests to fail
• I commit the fix
• Workflows for both commits will run concurrently

This PR disables workflow concurrency on branch basis and the previous scenario would be:
• I made a PR and it triggers the CI workflows
• I notice that I have a typo in the tests and I that it will cause the tests to fail
• I commit the fix
• The workflow of the most recent commit will cancel any in progress or pending workflows from the previous commit

Results of this PR is that we don't waste build time on non-latest commits.

More about workflow concurrency can be found here.

@cla-bot cla-bot bot added the cla-signed label Sep 18, 2024
@supersonicbyte
Copy link
Collaborator Author

I made some commits to test does it work, and it seems it works just fine. Here.

Copy link
Member

@daveverwer daveverwer left a comment

Choose a reason for hiding this comment

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

I do this all the time when I push a branch before running snapshots! 😬

I'd love to see this not waste quite so many resources. 👍 from me.

@supersonicbyte supersonicbyte merged commit 3ae6ba7 into main Sep 20, 2024
6 checks passed
@supersonicbyte supersonicbyte deleted the workflow-concurrency branch September 20, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants