Skip to content

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

Merged
easwars merged 2 commits into
grpc:masterfrom
easwars:only_node_id
Jun 23, 2022
Merged

xdsclient: only include nodeID in error strings, not the whole nodeProto#5461
easwars merged 2 commits into
grpc:masterfrom
easwars:only_node_id

Conversation

@easwars

@easwars easwars commented Jun 23, 2022

Copy link
Copy Markdown
Contributor

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 left a comment

Copy link
Copy Markdown
Contributor

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.

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
Copy Markdown
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
Copy Markdown
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
@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