Skip to content

Import concurrency job discriminator from shared workflows - #57978

Merged
pelikhan merged 9 commits into
mainfrom
copilot/ensure-group-discriminator-import
Sep 2, 2026
Merged

Import concurrency job discriminator from shared workflows#57978
pelikhan merged 9 commits into
mainfrom
copilot/ensure-group-discriminator-import

Conversation

Copilot AI commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Shared workflows can now provide concurrency.job-discriminator. The main workflow takes precedence when both define one.

Changes

  • Import semantics

    • First imported discriminator wins across shared workflows.
    • Main workflow discriminator overrides imported values.
  • Validation

    • Allows only job-discriminator under shared workflow concurrency.
    • Continues rejecting workflow-level concurrency settings such as group.
# shared.md
concurrency:
  job-discriminator: ${{ inputs.item_id }}

Copilot AI and others added 3 commits September 2, 2026 15:24
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan September 2, 2026 15:34
@pelikhan
pelikhan marked this pull request as ready for review September 2, 2026 16:12
Copilot AI balanced review requested due to automatic review settings September 2, 2026 16:12
@pelikhan

pelikhan commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

@copilot allow the entire group field to be merged from shared agentic workflows as a whole

Copilot AI 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.

🟡 Changes recommended

Unsupported concurrency fields are not rejected through common shared-subdirectory import paths.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Imports shared concurrency.job-discriminator values while preserving main-workflow precedence.

Changes:

  • Adds first-import-wins extraction and merge behavior.
  • Adds shared-workflow validation and tests.
  • Documents import precedence.
File summaries
File Description
pkg/workflow/concurrency_import_test.go Tests import and override behavior.
pkg/workflow/compiler_orchestrator_workflow.go Applies the imported discriminator.
pkg/parser/schema_validation.go Allows only the import-safe concurrency field.
pkg/parser/schema_location_test.go Tests shared-workflow validation.
pkg/parser/import_processor.go Exposes the merged discriminator.
pkg/parser/import_field_extractor.go Extracts the first imported value.
pkg/parser/import_field_extractor_test.go Tests first-wins extraction.
pkg/constants/constants.go Removes concurrency from the blanket forbidden list.
docs/src/content/docs/reference/concurrency.md Documents shared-workflow precedence.
Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment on lines +63 to +67
if key == "concurrency" {
if err := validateSharedWorkflowConcurrencyField(frontmatter["concurrency"]); err != nil {
return err
}
continue
@@ -487,7 +487,6 @@ var IgnoredFrontmatterFields = []string{}
// and will be properly imported and merged when the shared workflow is imported.
var SharedWorkflowForbiddenFields = []string{
Copilot AI and others added 2 commits September 2, 2026 16:39
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot allow the entire group field to be merged from shared agentic workflows as a whole

Updated: shared workflow concurrency.group is now carried through import processing and merged with main-workflow precedence intact; unsupported concurrency keys remain rejected.

@pelikhan

pelikhan commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Copilot AI commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot fix https://github.com/github/gh-aw/actions/runs/33656491885/job/100348121909?pr=57978

Fixed at 811a3d4: the shared-workflow concurrency import fix is in place, the Go formatting issue was corrected, and the focused parser/workflow concurrency regression checks pass.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please inspect the current failed checks on this PR, address any remaining issues, refresh the branch if needed, and run the pr-finisher skill before handing back to maintainers.

  • Current failed checks from compact context:
    • impacted-go-tests
    • lint-go-format
    • lint-go-golangci
    • Unit tests (A-C)
    • Unit tests (H-M)
    • Unit tests (S-Z and other)
  • Your latest reply says the formatting fix landed on the current head; please verify what still remains failing for maintainers.

Generated by 👨🍳 PR Sous Chef
Comment /souschef to run again

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 29.3 AIC · ⌖ 8.78 AIC · ⊞ 8.7K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
@pelikhan

pelikhan commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

mergedMaxAICredits string
mergedMaxDailyAICredits string
mergedConcurrency string
mergedJobDiscriminator string

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot this is a subset of discriminator so it is part of concurrency.

Copilot AI commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot fix https://github.com/github/gh-aw/actions/runs/33662782973/job/100367188334?pr=57978

Fixed in 506f725: the nested shared-import regression was caused by the fixtures using the legacy mcp-servers.<name>.image shape, which trips schema validation. I updated the regression cases to use the valid container form and verified go test ./pkg/parser -count=1 passes.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please address the remaining unresolved review feedback on this PR, refresh the branch if needed, and run the pr-finisher skill before handing back to maintainers.

Generated by 👨🍳 PR Sous Chef
Comment /souschef to run again

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 40.1 AIC · ⌖ 8.81 AIC · ⊞ 9.2K ·
Comment /souschef to run again

@pelikhan
pelikhan merged commit 939e997 into main Sep 2, 2026
36 checks passed
@pelikhan
pelikhan deleted the copilot/ensure-group-discriminator-import branch September 2, 2026 20:39
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.88.2

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.

4 participants