feat(e2e): add hotfix runner step actions and expectation surface#115
Merged
Conversation
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
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 multi-step e2e harness lacked the step actions and assertion surface needed to drive the hotfix flow end to end. Hotfix scenarios could not stage a diverged environment, run the plan job, drive a harness-side cherry-pick/PR/merge cycle, exercise the merged build/deploy/finalize path, or assert divergence state (ref, base SHA, patches) and branch/PR outcomes.
Fix
Additive harness capabilities (no existing scenario or step type is affected):
hotfix_plan(commit_ref, target_env, dry_run, expect_failure),hotfix_apply(target_env, commit_ref),merge_pr(label/index),resolve_conflict(files),hotfix_merged(target_env). Validated in the runner switch and dispatched to new execute methods.hotfix_applyruns a realgit cherry-pick -xin the act container, distinguishes clean vs conflict from the unmerged-file list, opens a gitea PR with thecascade-hotfix/cascade-hotfix-conflictlabel and the machine-readable trailers, and polls the pushed branch SHA before opening the PR.StateExpectgainsref,base_sha,patches,patches_contain,previous_version;StepExpectgainsbranches(exist/deleted) andprs(open_with_label/open_count).EnvStateSetupgainsref/base_sha/patches/previous_versionso a diverged env can be staged directly without a full hotfix run.PromoteStepgainsforce, mapped to the promote workflow'sforceinput.ref,base_sha,patches) and the harness materializes them into the staged manifest.Verification
go build ./...andgo vet ./...clean at the repo root and in thee2e/module.golangci-lint run ./...clean (root and e2e module).TestMultiStepScenarios/Two_Environment_Happy_PathandThree_Environment_Happy_Pathboth pass.This is an enabler for the hotfix scenario suite; it adds harness capability only and ships unit coverage for the new parsing, validation, dispatch, and assertion wiring.