-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert GRPC context changes #15780
Merged
dbussink
merged 1 commit into
vitessio:main
from
planetscale:dbussink/revert-grpc-context-changes
Apr 23, 2024
Merged
Revert GRPC context changes #15780
dbussink
merged 1 commit into
vitessio:main
from
planetscale:dbussink/revert-grpc-context-changes
Apr 23, 2024
Conversation
This file contains 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
These changes were made assuming we could use `grpc.NewClient` everywhere. But we had failing test for that. In a specific case, we replace it with `grpc.Dial` but that's not the same. If we can't move it all to `grpc.NewClient` yet, we have to keep the context setup we do as well, or otherwise `grpc.Dial` could hang indefinitely even if the caller context is cancelled since it gets started with the background context. Signed-off-by: Dirkjan Bussink <[email protected]>
dbussink
requested review from
frouioui,
rohit-nayak-ps,
ajm188,
GuptaManan100 and
shlomi-noach
as code owners
April 23, 2024 07:42
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
|
dbussink
requested review from
harshit-gangal,
systay,
mattlord,
notfelineit,
derekperkins and
deepthi
as code owners
April 23, 2024 07:42
vitess-bot
bot
added
NeedsBackportReason
If backport labels have been applied to a PR, a justification is required
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsIssue
A linked issue is missing for this Pull Request
NeedsWebsiteDocsUpdate
What it says
labels
Apr 23, 2024
GuptaManan100
approved these changes
Apr 23, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15780 +/- ##
==========================================
- Coverage 68.43% 68.41% -0.03%
==========================================
Files 1556 1556
Lines 195433 195437 +4
==========================================
- Hits 133743 133700 -43
- Misses 61690 61737 +47 ☔ View full report in Codecov by Sentry. |
rohit-nayak-ps
approved these changes
Apr 23, 2024
dbussink
added
Type: Bug
Component: General
Changes throughout the code base
Type: Dependencies
Dependency updates
and removed
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsWebsiteDocsUpdate
What it says
NeedsIssue
A linked issue is missing for this Pull Request
NeedsBackportReason
If backport labels have been applied to a PR, a justification is required
labels
Apr 23, 2024
dbussink
added a commit
to planetscale/vitess
that referenced
this pull request
Apr 23, 2024
The change in vitessio#15780 made me audit the rest of the places where we dial with GRPC today where we don't pass in a context yet. This is something we should do, since the Dial can block otherwise indefinitely even on context cancel in the caller. This fixes those cases and even cleans up a TODO that mentioned this needed to be done in a specific spot. Once we move to grpc.NewClient in a more piecemeal fashion, we can probably clean up / undo a lot of these cases but until then we should do this properly with a context passed in. Signed-off-by: Dirkjan Bussink <[email protected]>
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
These changes were made assuming we could use
grpc.NewClient
everywhere. But we had failing test for that. In a specific case, we replace it withgrpc.Dial
but that's not the same.If we can't move it all to
grpc.NewClient
yet, we have to keep the context setup we do as well, or otherwisegrpc.Dial
could hang indefinitely even if the caller context is cancelled since it gets started with the background context.Related Issue(s)
Broken #15743
Checklist