-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
xds: add xDS transport custom dial options support #7997
base: master
Are you sure you want to change the base?
Conversation
All tests are passing but codecov is throwing an error: "error - 2025-01-09 18:18:05,722 -- Report creating failed: {"message":"Token required because branch is protected"}". I see the same error in other PRs so I assume it's not an issue with this PR. |
internal/xds/bootstrap/bootstrap.go
Outdated
@@ -283,11 +285,17 @@ func (sc *ServerConfig) MarshalJSON() ([]byte, error) { | |||
} | |||
|
|||
// dialer captures the Dialer method specified via the credentials bundle. | |||
// Deprecated and to be deleted. Use extradDialOptions which takes precedence over this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Deprecated: use extradDialOptions
instead. Will take precedence over this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
type dialer interface { | ||
// Dialer specifies how to dial the xDS server. | ||
Dialer(context.Context, string) (net.Conn, error) | ||
} | ||
|
||
// extraDialOptions captures custom dial options specified via the credentials bundle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dial options can be anything right? like WithStatsHandler
, WithContextDialer
etc.? I think WithContextDialer
will be specified via credentials bundle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. In prod we are specifying WithContextDialer
now, and will add WithStatsHandler
on top of this change.
} | ||
|
||
// mockStatsHandler implements `stats.Handler`. It's a no-op mock handler. | ||
type mockStatsHandler struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we usually prefix with test or you can noopStatsHandler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@yousukseung we are not updating transport to use this instead yet? |
I removed I don't see any change needed in transport though. All changes I'm making is internal to |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7997 +/- ##
==========================================
- Coverage 82.17% 81.94% -0.23%
==========================================
Files 381 381
Lines 38539 38541 +2
==========================================
- Hits 31668 31584 -84
- Misses 5564 5630 +66
- Partials 1307 1327 +20
|
This PR extends #7586 to support multiple custom dial options.
The custom dialer option added in PR#7586 is now deprecated but not removed yet. This will be removed in a future PR after dependencies are moved to the new option.
RELEASE NOTES: N/A