test(rollback): isolate resolution source in e2e + surface it in the rollback workflow - #347
Merged
Merged
Conversation
…rollback workflow The e2e harness could not distinguish which rollback target-resolution source won (live state vs the per-env history ring vs git-history). Surface the resolved source end-to-end: preflight --gha-output emits target_source, the generated rollback workflow logs 'rollback resolved from <source>' (ungated by dry_run), and the harness gains an ExpectSource assertion. Adds three e2e scenarios pinning each precedence path, validated under act+gitea. retry-on-conflict (#333) was already covered by CommitWithRetry unit tests. Closes #320. 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.
Closes #320 (#333 was already covered by CommitWithRetry unit tests).
The e2e harness could not distinguish WHICH rollback target-resolution source won (live env state vs the per-env history ring vs git-history fallback). This surfaces the resolved source end-to-end:
internal/rollback: preflight--gha-outputnow emitstarget_source; unit tests assert the source per precedence path.internal/generate/rollback.go: the generated rollback workflow gains atarget_sourcejob output and a "Report Resolved Source" step loggingrollback resolved from <source>(ungated by dry_run); generator test asserts it.e2e/harness: newRollbackStep.ExpectSource+assertRollbackSource.e2e/scenarios/rollback/scenarios pin each path (state / previous-ring / git-history). All three pass under act+gitea locally.#333retry-on-conflict is already covered deterministically byCommitWithRetry409-injection unit tests + e2e scenario 08; not duplicated. Build +go test ./...+ golangci-lint clean.