session,executor: scope finishStmt failpoint to current connection#67655
Conversation
|
@zanmato1984 I've received your pull request and will start the review. I'll conduct a thorough review covering code quality, potential issues, and implementation details. ⏳ This process typically takes 10-30 minutes depending on the complexity of the changes. ℹ️ Learn more details on Pantheon AI. |
|
Hi @zanmato1984. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR fixes a flaky test by making the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
zanmato1984
left a comment
There was a problem hiding this comment.
Role: Reviewer-R1
NOT_LGTM (round 1) due to one blocking issue:
TestFinishStmtErrornow skips whenTryDetach()returns nil error, which weakens the original test intent and can hide regressions in failpoint wiring/scope.
Please keep this path as a hard assertion (require.Error(t, err)) once failpoint enable succeeds. Handling failpoint-disabled binaries at failpoint.Enable is enough.
| require.True(t, ok) | ||
| require.Error(t, err) | ||
| if err == nil { | ||
| t.Skip("skip because finishStmtError failpoint is inactive in this test binary") |
There was a problem hiding this comment.
This skip turns a regression into a skip/pass. The original intent is to assert the finishStmt error path is actually exercised; please keep a hard failure here (require.Error(t, err)) and only skip when failpoint cannot be enabled.
There was a problem hiding this comment.
Role: Addresser-R1
Addressed in 622a423.
Restored the hard assertion in TestFinishStmtError by replacing the skip path with require.Error(t, err).
Validation:
./tools/check/failpoint-go-test.sh pkg/executor/staticrecordset -run TestFinishStmtError -count=1
zanmato1984
left a comment
There was a problem hiding this comment.
Role: Reviewer-R2
LGTM (round 2).
Re-check results:
- Original test intent is preserved:
TestFinishStmtErrorkeepsrequire.Error(t, err)afterTryDetach(). - Change remains minimal/focused (failpoint scope guard + matching test wiring).
- Recurrence analysis is evidence-based and reasonable (global failpoint scope affecting unrelated sessions).
- No unnecessary timing-only precise repro is retained in this PR.
Local validation:
./tools/check/failpoint-go-test.sh pkg/executor/staticrecordset -run TestFinishStmtError -count=20
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #67655 +/- ##
================================================
- Coverage 77.5839% 77.2064% -0.3775%
================================================
Files 1981 1974 -7
Lines 547950 564309 +16359
================================================
+ Hits 425121 435683 +10562
- Misses 122019 127764 +5745
- Partials 810 862 +52
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/retest |
|
/retest |
|
@zanmato1984: PRs from untrusted users cannot be marked as trusted with DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/retest |
|
@yinsustart: PRs from untrusted users cannot be marked as trusted with DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xhebox, YangKeao The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
@zanmato1984: PRs from untrusted users cannot be marked as trusted with DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/retest |
|
@zanmato1984: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #66728
Problem Summary:
TestFinishStmtErrorenablesfinishStmtErroras a global failpoint, so unrelated sessions can also hit it while the test is running. That broad scope can destabilize this case and make flaky reports noisy.What changed and how does it work?
finishStmtErrorto the current connection when the failpoint value is a numeric connection IDTestFinishStmtErrorto enable the failpoint with its own session connection IDt.Cleanupfor disable and skip when the failpoint hook is inactive in the current test binaryCheck List
Tests
Side effects
Documentation
Release note
Summary by CodeRabbit