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

xdsclient: only include nodeID in error strings, not the whole nodeProto #5461

Merged
merged 2 commits into from Jun 23, 2022

Conversation

easwars
Copy link
Contributor

@easwars easwars commented Jun 23, 2022

Fixes #5392

RELEASE NOTES: none

@easwars easwars requested a review from zasweq June 23, 2022 17:43
@easwars easwars added the Type: Internal Cleanup Refactors, etc label Jun 23, 2022
@easwars easwars added this to the 1.48 Release milestone Jun 23, 2022
zasweq
zasweq approved these changes Jun 23, 2022
Copy link
Contributor

@zasweq zasweq left a comment

Choose a reason for hiding this comment

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

LGTM. Only add test if really easy, otherwise looks fine.

@@ -115,9 +115,9 @@ func (wi *watchInfo) sendErrorLocked(err error) {
errMsg := err.Error()
errTyp := xdsresource.ErrType(err)
if errTyp == xdsresource.ErrorTypeUnknown {
err = fmt.Errorf("%v, xDS client nodeID: %s", errMsg, wi.c.nodeIDJSON)
err = fmt.Errorf("%v, xDS client nodeID: %s", errMsg, wi.c.nodeID)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a test of this error message (only logging nodeID) if not too much effort?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had looked into it before sending the PR out as well. It isn't very straightforward and would not be worth the mess. Thanks.

@zasweq zasweq assigned easwars and unassigned zasweq Jun 23, 2022
@easwars easwars merged commit c6ee1c7 into grpc:master Jun 23, 2022
11 checks passed
@easwars easwars deleted the only_node_id branch June 23, 2022 23:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xds: Only the node id should be logged, not the full node
2 participants