Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 5, 2025

Updates the GitHub Actions workflow concurrency configuration to allow parallel execution of workflows on the develop branch while maintaining cancellation behavior for other branches.

Problem

Previously, all workflow runs were subject to cancellation when new commits were pushed to the same branch (cancel-in-progress: true). This caused issues on the develop branch where important CI runs could be prematurely cancelled, potentially missing critical feedback on the main development branch.

Solution

Modified the concurrency settings in .github/workflows/build.yml to use separate concurrency groups and conditional cancellation:

concurrency:
  # Use separate concurrency groups for develop vs other branches to prevent cross-cancellation
  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/develop' && github.run_number || 'branch' }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}

Behavior

  • develop branch: Each run gets its own concurrency group (using run_number), allowing parallel execution without cancellation or queuing delays
  • All other branches: Shared concurrency group with cancel-in-progress: true - workflows are cancelled when new commits are pushed

This ensures that the develop branch can run multiple workflows in parallel without interference while still providing the efficiency benefits of workflow cancellation on feature branches and pull requests.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@kuznetsss kuznetsss changed the title [WIP] Set cancel-in-progress false for develop branch in workflow concurrency ci: Set cancel-in-progress false for develop branch in workflow concurrency Aug 5, 2025
@kuznetsss kuznetsss marked this pull request as ready for review August 5, 2025 13:03
Copilot AI changed the title ci: Set cancel-in-progress false for develop branch in workflow concurrency Fix concurrency settings to preserve develop branch workflows Aug 5, 2025
@kuznetsss kuznetsss requested a review from Copilot August 5, 2025 13:04
Copilot AI requested a review from kuznetsss August 5, 2025 13:04
Copy link

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 the GitHub Actions workflow concurrency configuration to prevent cancellation of in-progress builds on the develop branch while maintaining cancellation behavior for other branches.

  • Modified the cancel-in-progress setting to use a conditional expression based on the branch reference
  • Preserves complete CI coverage on the develop branch by allowing workflows to run to completion
  • Maintains efficiency on feature branches and pull requests by continuing to cancel superseded workflows

@kuznetsss kuznetsss requested a review from mathbunnyru August 5, 2025 13:05
@kuznetsss
Copy link
Collaborator

@copilot, can you fix all the comments?

Copilot AI changed the title Fix concurrency settings to preserve develop branch workflows Fix concurrency settings to allow parallel workflows on develop branch Aug 5, 2025
Copilot AI requested a review from mathbunnyru August 5, 2025 13:09
Copy link
Contributor Author

Copilot AI commented Aug 5, 2025

@copilot, can you fix all the comments?

Updated the comments to provide clearer explanation of the concurrency behavior - develop branch workflows run in parallel while other branches have cancellation enabled. See commit e9c7d0c.

Copy link
Collaborator

@kuznetsss kuznetsss left a comment

Choose a reason for hiding this comment

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

@copilot, one more comment to fix

Copilot AI requested a review from kuznetsss August 5, 2025 13:20
@kuznetsss kuznetsss changed the title Fix concurrency settings to allow parallel workflows on develop branch ci: Fix concurrency settings to allow parallel workflows on develop branch Aug 5, 2025
@kuznetsss kuznetsss merged commit 63d664b into develop Aug 5, 2025
2 checks passed
@kuznetsss kuznetsss deleted the copilot/fix-981e74cd-5758-4aff-a551-0586f99e871f branch August 5, 2025 13:26
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