fix(e2e): repair two reusable-callback scenario regressions surfaced by #162#163
Merged
Merged
Conversation
… failing-rollback scenarios PR #161 removed the inline run callback emission path and converted two scenarios to reusable workflows, but staged the referenced workflow bodies only via a step commit.files, which lands after generation runs. The harness seeds callback stubs and runs generation once at setup, so validate.yaml was missing at generation time and the failing rollback deploy used the generic non-failing stub. PR #162 narrowed the transient classifier and surfaced both. Add a setup_workflows map on MultiStepScenario seeded into the setup commit before generation, and a validate workflow_call stub clause keyed on config.validate.workflow. Move the failing deploy-app.yaml into setup_workflows so the rollback re-deploy fails under the Rollback caller, and rely on the seeded validate stub so orchestrate.yaml generation emits the gate. Test-infra only; no product behavior change. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
…ow name Inside a reusable workflow_call callback, $GITHUB_WORKFLOW is the callee's own name, not the caller's, on act and on real GitHub. The converted rollback scenario keyed its failing deploy on the caller name (Rollback*), which never matches, so the re-deploy always succeeded and the state-unchanged assertion broke. Both promote and rollback also dispatch via workflow_dispatch, so the event name cannot disambiguate either. Set CASCADE_E2E_ROLLBACK on the rollback dispatch only and key the deploy callback on it; act passes top-level env into the reusable callee. 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
PR #161 removed the inline
run:callback emission path and converted two e2e scenarios to reusable workflows, but staged the referenced workflow bodies only via a step'scommit.files, which lands AFTER workflow generation runs at scenario setup. PR #162 narrowed the transient classifier, surfacing both regressions deterministically:Rollback leaves trunk state unchanged when the deploy fails: step 7 "expected rollback to fail but it succeeded". The failing deploy was keyed on $GITHUB_WORKFLOW matchingRollback*, but inside a reusableworkflow_callcallback $GITHUB_WORKFLOW is the callee's own name (on act and on real GitHub), never the caller's, so the re-deploy never failed.Validate Callback Gate: generation failed readingvalidate.yaml(no such file), because the harness seeds callback stubs only for builds/deploys/publish/changelog, never forconfig.validate.workflow, and the inlinevalidate.yamlarrived too late via a step commit.Fix (test-infra only; no product change)
workflow_callstub forconfig.validate.workflowbefore generation, mirroring the changelog stub clause.setup_workflowsmap onMultiStepScenarioseeds scenario-supplied callback bodies into the setup commit before generation (overriding the generic stub). The failing rollback deploy moves there so it is present at generation time.CASCADE_E2E_ROLLBACKenv the harness sets only on the rollback dispatch (act passes top-level env into reusable callees). Both promote and rollback dispatch via workflow_dispatch, so event name cannot disambiguate; the caller workflow name is not visible to the callee.Verification
go build ./...,go test ./...(1265 pass),go vet ./e2e/...,golangci-lint runon both modules: clean.