Skip to content
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

grpc: add clientconn.CanonicalTarget() to return the canonical target string #7006

Merged
merged 3 commits into from Feb 28, 2024

Conversation

arvindbr8
Copy link
Member

@arvindbr8 arvindbr8 commented Feb 28, 2024

This change does 3 things:

  1. reverts commit 3ae77e6
  2. Add a new CanonicalTarget() API that returns canonical target string
  3. Also reapply the same changes made to resolver.Target() by 3ae77e6

RELEASE NOTES:

  • grpc: add clientconn.CanonicalTarget() to return the canonical target string.
  • grpc: stabilize clientconn.Target()

@arvindbr8 arvindbr8 added the Type: Behavior Change Behavior changes not categorized as bugs label Feb 28, 2024
@arvindbr8 arvindbr8 added this to the 1.63 Release milestone Feb 28, 2024
Copy link

codecov bot commented Feb 28, 2024

Codecov Report

Merging #7006 (9afa17a) into master (eb08be4) will increase coverage by 0.30%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7006      +/-   ##
==========================================
+ Coverage   82.21%   82.51%   +0.30%     
==========================================
  Files         296      296              
  Lines       31473    31467       -6     
==========================================
+ Hits        25874    25964      +90     
+ Misses       4531     4448      -83     
+ Partials     1068     1055      -13     
Files Coverage Δ
clientconn.go 92.65% <100.00%> (+1.90%) ⬆️

... and 17 files with indirect coverage changes

@arvindbr8 arvindbr8 changed the title Revert "grpc: Canonicalize string returned by ClientConn.Target() and resolver.Address.String() (#6923)" grpc: add clientconn.CanonicalTarget() to return the canonical target string Feb 28, 2024
clientconn.go Outdated
Comment on lines 887 to 901
//
// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
func (cc *ClientConn) Target() string {
return cc.target
}

// CanonicalTarget returns the canonical target string of the ClientConn.
//
// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a later
// release.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's delete these experimental labels. Target() will always return the string passed to Dial and CanonicalTarget will always return the scheme://[authority]/[endpoint].

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, Done.

@dfawley dfawley assigned arvindbr8 and unassigned dfawley Feb 28, 2024
@arvindbr8 arvindbr8 merged commit c267d5b into grpc:master Feb 28, 2024
23 of 24 checks passed
@arvindbr8 arvindbr8 deleted the revert_3ae77e6 branch February 28, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Behavior Change Behavior changes not categorized as bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants