Include "(GPN:Beam)" in user-agent of GCS HTTP request header for Java.#26770
Merged
johnjcasey merged 4 commits intomasterfrom May 23, 2023
unknown repository
Merged
Include "(GPN:Beam)" in user-agent of GCS HTTP request header for Java.#26770johnjcasey merged 4 commits intomasterfrom unknown repository
johnjcasey merged 4 commits intomasterfrom
unknown repository
Conversation
* Prepend "(GPN:Beam)" to the application name, which is then used in constructing the user agent string by GCS client APIs. * Add a unit test.
Contributor
|
Assigning reviewers. If you would like to opt out of this review, comment R: @Abacn for label java. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
kennknowles
reviewed
May 18, 2023
...gle-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/Transport.java
Outdated
Show resolved
Hide resolved
3 tasks
Author
|
Run Java_Examples_Dataflow PreCommit |
Contributor
|
Run Java PreCommit |
Contributor
|
Run Java_GCP_IO_Direct PreCommit |
kennknowles
reviewed
May 19, 2023
| Storage.Objects.Get getObject = storageClient.objects().get("testbucket", "testobject"); | ||
| // An example of user agent string will be like | ||
| // "TransportTest (GPN:Beam) Google-API-Java-Client/2.0.0" | ||
| assertThat(getObject.getRequestHeaders().getUserAgent(), containsString("(GPN:Beam)")); |
Member
There was a problem hiding this comment.
Since we discovered the possible problem in code review, how about also checking that the userAgent string is valid. Or at least that if you split it on space that the GPN:Beam is not the first.
bvolpato
approved these changes
May 22, 2023
3 tasks
cushon
pushed a commit
to cushon/beam
that referenced
this pull request
May 24, 2024
…a. (apache#26770) * Include "(GPN:Beam)" in the user agent of GCS HTTP request header. * Prepend "(GPN:Beam)" to the application name, which is then used in constructing the user agent string by GCS client APIs. * Add a unit test. * Run spotlessApply for format. * Add '(GPN:Beam)' after the origin application name * Check and ensure the user agent string meets the minimum requirement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR should fix #26644 for Java SDKs.
For more details, please see the comment here.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.