feat(generate): fan out per-component orchestrate workflows - #514
Merged
Merged
Conversation
When a manifest declares components, generate one orchestrate workflow per component: path-scoped triggers derived from the component path, a per-component concurrency group, a namespaced workflow name, and the component's resolved tag namespace. A single shared helper drives both the generate and verify (Plan) paths so they cannot disagree, proven byte-identical. A manifest with no components block generates byte-identical output to today. Deep-copy the resolved component config so no sibling derivation bleeds through shared pointer or slice fields. Promote, release, hotfix, and rollback stay repo-wide here; their per-component semantics land in the versioning, promotion, and lifecycle stages. Refs #283. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
… harness The act+gitea harness gated repo staging on a hardcoded .github/workflows/orchestrate.yaml, but a components manifest emits per-component orchestrate-<name>.yaml files and no repo-wide orchestrate.yaml, so staging failed. Accept any non-empty orchestrate*.yaml, preserving the original guard against generating no orchestrate workflow at all. Scenario 44 step 3 asserted file isolation via a plan diff, which the harness's post-generation name suffixing makes impossible (every workflow shows a name diff); reassert the observable per-component fan-out instead: each orchestrate-<name>.yaml carries its own concurrency group and path filter (lines the harness does not rewrite) and no repo-wide orchestrate.yaml exists. Refs #283. 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
With the components config model (#507) and scoped state serializer (#508) in place, the generator must emit per-component workflows when a manifest declares
components:, while single-component output stays byte-identical.Fix
components:is declared, generate one orchestrate workflow per component: path-scoped triggers from the componentpath, a per-component concurrency group (not overridable to a shared literal), a namespaced workflow name, and the component's resolved tag namespace.Plan()path call one shared helper, so they cannot disagree; proven byte-identical.components:block generates byte-identical output to today.Scope boundary
This increment emits per-component workflow STRUCTURE for the orchestrate lane only. Promote, release, hotfix, and rollback stay repo-wide here; their per-component state-keying and version-scoping semantics land in the versioning (#287), promotion (#291), and lifecycle (#293/#294) stages. Single-component repos are unaffected.
Verification
go build ./...,go test ./...(2561 pass),go test ./... -race(2561 pass),golangci-lint run ./...clean; e2e module build+vet clean. Single-component generation byte-identical (TestOrchestrateTargets_SingleComponent_ByteIdenticalplus the unchanged determinism suite). e2e scenario 44 asserts roundtrip no-drift and per-component file isolation (a plan touchingorchestrate-api.yamlleavesorchestrate-web.yamluntouched). A deep-copy test mutates slice/map/pointer fields on one resolved component and asserts the sibling and source are untouched.Refs #283.