Skip to content

Simplify workflow concurrency groups to sequentialize per workflow#15030

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/remove-issue-number-from-groups
Closed

Simplify workflow concurrency groups to sequentialize per workflow#15030
Copilot wants to merge 4 commits intomainfrom
copilot/remove-issue-number-from-groups

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Workflow concurrency groups were using event-specific identifiers (issue numbers, PR numbers, git refs, discussion numbers), creating unnecessary complexity and preventing consistent sequential processing across all workflow types.

Changes

  • pkg/workflow/concurrency.go: Simplified concurrency logic to sequentialize all workflows per workflow name, removing special handling for different event types (issues, PRs, push, discussions)
  • pkg/workflow/concurrency_test.go: Updated all test expectations to reflect simplified behavior
  • docs/src/content/docs/reference/concurrency.md: Updated documentation to reflect simplified patterns
  • Workflow lock files: Recompiled workflows with new concurrency groups

Pattern

All workflows now use the same simple pattern:

# Before (varied by trigger type)
concurrency:
  group: "gh-aw-${{ github.workflow }}-${{ github.event.issue.number }}"
  # OR
  group: "gh-aw-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
  # OR
  group: "gh-aw-${{ github.workflow }}-${{ github.ref }}"
  # OR
  group: "gh-aw-${{ github.workflow }}-${{ github.event.discussion.number }}"

# After (consistent for all)
concurrency:
  group: "gh-aw-${{ github.workflow }}"

Exception: Command triggers (slash_command) retain issue/PR context for proper isolation:

concurrency:
  group: "gh-aw-${{ github.workflow }}-${{ github.event.issue.number || github.event.pull_request.number }}"

PR workflows retain cancel-in-progress: true for automatic cancellation when new commits are pushed.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 11, 2026 23:35
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix concurrency group for workflows to exclude issue number Fix issue workflow concurrency groups to sequentialize per workflow Feb 11, 2026
Copilot AI requested a review from pelikhan February 11, 2026 23:43
// Multiple runs on the same workflow queue sequentially
} else if isDiscussionWorkflow(workflowData.On) {
// Discussion workflows: use discussion number
keys = append(keys, "${{ github.event.discussion.number }}")
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot also sequentialize per workflow for discussions (no discussion number)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 762cc13. Discussion workflows now sequentialize per workflow (no discussion number).

func buildConcurrencyGroupKeys(workflowData *WorkflowData, isCommandTrigger bool) []string {
keys := []string{"gh-aw", "${{ github.workflow }}"}

if isCommandTrigger {
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot simplify the concurrency group setting: sequentialize per workflow. no special handling of other events.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 762cc13. All workflows now sequentialize per workflow name - removed special handling for PRs, push, discussions, etc. Only command triggers retain issue/PR context.

… name

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Fix issue workflow concurrency groups to sequentialize per workflow Simplify workflow concurrency groups to sequentialize per workflow Feb 11, 2026
@pelikhan
Copy link
Contributor

@copilot command triggers

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.

2 participants