feat: deploy the updated component on external update#213
Merged
Conversation
When an external deploy declares on_update.deploy.workflow, the generated external-update receiver emits a scoped deploy_<name> job that runs synchronously in the same receiver run after the slot is recorded. The job needs the update job, is gated on its success and on inputs.deploy_name, and calls the declared reusable workflow with the recorded environment, sha, version, and deploy_name, inheriting secrets. Absent on_update keeps the receiver record-only and byte-identical to before: no deploy job is generated. on_update.deploy is reusable-workflow only and its workflow path is required when the block is present. 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 external-update receiver records a new component version into
ci.state.<env>.external.<deploy_name>but stops there. Absorbing an upstream bump does not deploy the component, so the new version sits recorded but unreleased until a separate pipeline run.Fix
Add an opt-in, additive
on_update.deploy.workflowfield to each external deploy. When set, the generated receiver workflow emits a scopeddeploy_<name>job (needs: update) that runs that component's reusable deploy workflow in the SAME run, gated on the update job succeeding and oninputs.deploy_namematching the component. The deploy is scoped to the updated component only, never a full pipeline re-run, and shares the receiver run id for deterministic correlation.Absent
on_updatethe output is byte-identical to today (record-only). Per-component concurrency, the state-token checkout, and the application-level commit retry in the update verb are all preserved unchanged.Verification
go build ./...,go test ./...,golangci-lint run ./...greengo build+go vetgreene2e/scenarios/multi-repo/external-update-deploys-component.yaml