fix(flaky): propagate auth trigger errors#217
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)
WalkthroughThis PR updates the ChangesAuth failure propagation in test flaky
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: throws ApiError(code)
runFlaky->>isFlakyFatalTriggerError: check code
alt AUTH_REQUIRED/AUTH_INVALID/AUTH_FORBIDDEN
isFlakyFatalTriggerError-->>runFlaky: fatal=true
runFlaky-->>runFlaky: re-throw ApiError, exitCode=3
else other error
isFlakyFatalTriggerError-->>runFlaky: fatal=false
runFlaky-->>runFlaky: record non-fatal attempt
end
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?
Replaces accidentally closed PR #200.
Updates
test flakyso auth failures while triggering reruns are treated as fatal API errors instead of being recorded as ordinary flaky attempts.Specifically, this propagates these trigger-time auth errors:
AUTH_REQUIREDAUTH_INVALIDAUTH_FORBIDDENThat keeps the CLI from reporting an auth/environment failure as a flaky test signal.
Related issue
Fixes #199
Type of change
Testing
Previously validated on the original PR branch with:
npm test -- src/commands/test.flaky.spec.tsnpm run typechecknpm run format:checknpm run lintNO_COLOR= npm testNotes for reviewers
Focused change in
runFlaky: auth-related rerun trigger errors are rethrown, while normal per-attempt flaky recording remains unchanged.Summary by CodeRabbit