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
Set user-agent per test in e2e framework #64790
Comments
If we want to only set User-Agent in a common place, I think add kubernetes/test/e2e/framework/framework.go Lines 154 to 157 in fd044d1
|
@hzxuzhonghu had the same thought. |
Since User-Agent is a HTTP header itself, would it be better to create descriptive headers specifically and then log all headers in audit logs? Something like:
|
For the sake of argument, alternative approaches that wouldn't require changes to auditing:
However, since we want to add user-agent to the audit logs anyway, I agree that's the preferred approach. |
What about generically add support in kubernetes/client-go to set user-agent to the calling src code file and line using runtime.Caller. An off-by-default option, having this level of insight for any k8s application seems like an easy win. Generating an index of test data that includes links to github for all calling/called functions. I'm exploring this idea a bit further: https://github.com/cncf/apisnoop/issues/23 |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
In order to identify which e2e test is hitting a specific API endpoint
Given an e2e test using e2e/framework/utils
When the user agent is set via client-go config
Then we will be able to log which e2e test called a specific API
Prior discussion: https://groups.google.com/d/msg/kubernetes-sig-api-machinery/R-z_NjiLzmg/q1kWg9jSAQAJ
/kind feature
/cc @kubernetes/api-reviewers @kubernetes/sig-testing-feature-requests @liggitt @lavalamp @bgrant0607
The text was updated successfully, but these errors were encountered: