Repository navigation
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the test-only change addressing revoked-certificate error variability.
No open issues 🎉
What changed in this PR
This test-only change addresses the TestTLSRequired flakiness reported in #17434 by accepting either observed error when connecting with a revoked client certificate.
Changes:
- Accepts both the TLS “bad certificate” error and “connection reset by peer.”
- Still requires a connection error and reports unexpected error text.
| File | Description |
|---|---|
go/mysql/server_test.go |
Updates the revoked-certificate assertion to tolerate either observed failure. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22140 +/- ##
===========================================
+ Coverage 69.67% 72.13% +2.46%
===========================================
Files 1614 354 -1260
Lines 216793 62222 -154571
===========================================
- Hits 151044 44884 -106160
+ Misses 65749 17338 -48411
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mattlord
left a comment
There was a problem hiding this comment.
Thanks for picking this up! I think that it'd be worth adding a short comment above the assertion in go/mysql/server_test.go:1258 that says why a reset counts as a rejection. With TLS 1.3, the client finishes its handshake before the server checks the client certificate. So when the server rejects the revoked cert and closes the connection first, the client's write of the handshake response fails with connection reset by peer before it can read the server's bad certificate alert. Without that comment, accepting the reset looks like it could hide an unrelated failure.
Looks good to me.
Signed-off-by: Jeremy Doupe <jeremy@doupe.com>
da41c5b to
ff5d8d8
Compare
|
THanke @mattlord! Added comment for assertion. |
mattlord
left a comment
There was a problem hiding this comment.
Thanks for adding the comment! Looks good to me.
Description
TestTLSRequiredwas flaky because a race condition between the server rejectingthe revoked certificate and the connection being reset could cause the client to
see
"connection reset by peer"instead of"remote error: tls: bad certificate".The test is updated to accept either error string, both of which indicate the
revoked certificate was properly rejected.
Motivation
How do you use Vitess? (pick one)
Did you run this change against a real Vitess deployment?
Related Issue(s)
Fixes #17434
Checklist
Deployment Notes
AI Disclosure