-
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/internal/xdsclient: Emit unknown for CSM Labels if not present in CDS #7309
Conversation
TelemetryLabels: map[string]string{ | ||
"csm.service_name": "unknown", | ||
"csm.service_namespace_name": "unknown", | ||
}, |
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.
Can you make a package global and reference it from individual tests.
unknownCSMLabels = map[string]string{
"csm.service_name": "unknown",
"csm.service_namespace_name": "unknown",
},
I understand this could be a little counter to other comments that we make where we say test logic and state should stay as local as possible, instead of being spread in different places. But these labels, I feel (correct me if I'm wrong), are not very pertinent to the test, and someone reading the test need not know what these labels mean to understand what the test is doing. So, I feel we can make the test tables a tiny bit smaller without losing the readability of them.
This comment applies to other tests as well.
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, check out the line diff of commit :).
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.
At first I created symbol in xds/internal/testutils, but that had an import cycle since that imports xdsresource and xdsresource accesses symbol, so I just put in xds/internal.
For posterity: the issue was caught in grpc/psm-interop#98. Ad-hoc run to verify the fix: |
@zasweq : I reviewed this yesterday, but forgot to assign it back to you. |
Will need to cherry pick this onto 1.65. |
This PR fixes CSM interop tests. Specifically, it aligns with the language from CSM Design: "The values for the service labels csm.service_name and csm.service_namespace_name come from xDS, “unknown” if not present."
This behavior lives in the xDS Client due to CSM Label filtering already happening in the xDS Client, and to keep in one place. Previously we had filtering in plugin option as well, but this behavior keeps it in one place. The only way these optional labels to be used is to configure an OpenTelemetry Dial Option with both of these optional labels set in API.
RELEASE NOTES: N/A