fix(flaky): propagate auth trigger errors#200
Open
JerryNee wants to merge 1 commit into
Open
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughAdds detection of auth-related ApiError codes (AUTH_REQUIRED, AUTH_INVALID, AUTH_FORBIDDEN) during the rerun-trigger step in ChangesFlaky rerun auth failure propagation
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant runFlaky
participant triggerRerun
participant isFlakyFatalTriggerError
runFlaky->>triggerRerun: POST /runs/rerun
triggerRerun-->>runFlaky: ApiError (auth code)
runFlaky->>isFlakyFatalTriggerError: check(err)
isFlakyFatalTriggerError-->>runFlaky: true
runFlaky-->>runFlaky: rethrow (exitCode 3)
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
What does this PR do?
test flakydocumented auth failures as exit code 3, but the rerun-trigger catch path only rethrewNOT_FOUND; otherApiErrors were recorded as{ outcome: "error" }attempts and eventually exited as flaky/failing with code 1.This changes
runFlakyto propagate auth-family trigger errors (AUTH_REQUIRED,AUTH_INVALID,AUTH_FORBIDDEN) before scoring per-attempt errors, so credentials problems keep the standard auth envelope/exit code.Related issue
Fixes #199
Type of change
Checklist
mainbranch.feat(...),fix(...),docs(...), …).npm run lintandnpm run format:checkpass.npm run typecheckpasses.npm testpasses and coverage stays at or above the 80% gate.README.md/DOCUMENTATION.mdwhere relevant.Notes for reviewers
Added focused
runFlakycoverage forAUTH_REQUIRED,AUTH_INVALID, andAUTH_FORBIDDENduring the rerun trigger. ExistingNOT_FOUNDbehavior for missing replayable runs is unchanged.Validation run locally:
npm test -- src/commands/test.flaky.spec.tsnpm run typechecknpm run format:checknpm run lintNO_COLOR= npm testMy shell exports
NO_COLOR=1; the full suite was rerun with it cleared so the existing ticker TTY ANSI tests exercise their expected raw-write path.Summary by CodeRabbit
test flakynow stops immediately on authentication-related trigger failures instead of treating them as normal retry errors.