fix: scope external-update concurrency per component#210
Merged
joshua-temple merged 1 commit intoJun 17, 2026
Conversation
The external-update workflow shared orchestrate's ref-scoped concurrency
group (orchestrate-${{ github.ref }}). When two upstream components notify
the same downstream repo on the same ref, they landed in one group. GitHub
keeps only the latest pending run per group and cancels the older pending
ones even with cancel-in-progress: false, so one component's state write was
silently dropped.
Scope the default group per component and per ref
(cascade-external-${{ inputs.deploy_name }}-${{ github.ref }}). Distinct
components now run concurrently; a component still serializes against itself.
Cross-writer manifest contention is resolved by commitWithApplicationRetry's
fetch/reset/re-apply on a non-fast-forward push. Explicit concurrency.group
overrides are still forwarded verbatim, and the state-token checkout and
stderr-capture behavior are unchanged.
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The generated external-update workflow shared orchestrate's ref-scoped concurrency group (
orchestrate-${{ github.ref }}). When two distinct upstream components notify the same downstream repo on the same ref, both runs landed in one group. GitHub keeps only the latest pending run per concurrency group and cancels older pending ones even withcancel-in-progress: false, so one component's state write was silently dropped.Live evidence (cascade-example-primary): a 4-run burst showed one CANCELLED run, which is exactly this shared-group cancellation. (The two FAILED runs in the same window failed earlier on bad dispatch inputs,
external deploy 'shared'/'widget-b' not found in config, an example-repo data mismatch unrelated to this bug.)Fix
Scope the default external-update concurrency group per component and per ref:
cascade-external-${{ inputs.deploy_name }}-${{ github.ref }}.commitWithApplicationRetry(5 attempts, fetch/reset/re-apply on non-fast-forward), which is its purpose.concurrency.groupoverride is still forwarded verbatim.inputs.deploy_nameis a workflow expression in the key, not shell text, so it carries no injection risk.The state-token checkout fix and the stderr-capture behavior are unchanged.
Verification
go build ./... && go test ./...: 1415 passed across 23 packages.golangci-lint run ./...: no issues.