fix: allows user-agent header with header provider#871
Merged
thiagotnunes merged 2 commits intogoogleapis:masterfrom Feb 17, 2021
Merged
fix: allows user-agent header with header provider#871thiagotnunes merged 2 commits intogoogleapis:masterfrom
thiagotnunes merged 2 commits intogoogleapis:masterfrom
Conversation
A bug was introduced, where if the caller tried to set a custom user agent with a header provider an exception would be thrown (for duplicate keys). Here, we merge the user agent set by the client along with the one set by the library, instead of throwing such exception.
Contributor
Author
Codecov Report
@@ Coverage Diff @@
## master #871 +/- ##
============================================
- Coverage 85.12% 85.10% -0.02%
- Complexity 2588 2590 +2
============================================
Files 143 143
Lines 14154 14156 +2
Branches 1366 1368 +2
============================================
- Hits 12048 12047 -1
- Misses 1537 1542 +5
+ Partials 569 567 -2
Continue to review full report at Codecov.
|
Contributor
|
LGTM |
olavloite
approved these changes
Feb 16, 2021
google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java
Show resolved
Hide resolved
4 tasks
Tests if the default user agent is present in the user-agent header set in the GapicSpannerRpc class.
meltsufin
reviewed
Mar 13, 2021
|
|
||
| private static HeaderProvider headerProviderWithUserAgentFrom(HeaderProvider headerProvider) { | ||
| final Map<String, String> headersWithUserAgent = new HashMap<>(headerProvider.getHeaders()); | ||
| final String userAgent = headersWithUserAgent.get(USER_AGENT_KEY); |
Member
There was a problem hiding this comment.
@thiagotnunes user-agent and User-Agent should be equivalent.
This needs case insensitivity.
Contributor
Author
ansh0l
pushed a commit
to ansh0l/java-spanner
that referenced
this pull request
Nov 10, 2022
This is an auto-generated regeneration of the .pb.go files by cloud.google.com/go/internal/gapicgen. Once this PR is submitted, genbot will update the corresponding PR to depend on the newer version of go-genproto, and assign reviewers. Whilst this or any regen PR is open in go-genproto, genbot will not create any more regeneration PRs. If all regen PRs are closed, gapicgen will create a new set of regeneration PRs once per night. If you have been assigned to review this PR, please: - Ensure that CI is passing. If it's failing, it requires your manual attention. - Approve and submit this PR if you believe it's ready to ship. That will prompt genbot to assign reviewers to the google-cloud-go PR. Corresponding google-cloud-go PR: googleapis/google-cloud-go#6467 Changes: feat: add content of IP Utilization insights to Stackdriver logging proto for Network Analyzer PiperOrigin-RevId: 465110127 Source-Link: googleapis/googleapis@2206a0f chore: regenerate API index Source-Link: googleapis/googleapis@072a946 feat: Remove v1p4beta1 API protos. v1p4beta1 has been deprecated and announced through MSA. This is the cleanup PiperOrigin-RevId: 464897844 Source-Link: googleapis/googleapis@73c7cd8
rajatbhatta
pushed a commit
to rajatbhatta/java-spanner
that referenced
this pull request
Nov 17, 2022
The Statement#executeBatch() method did not respect the statement
timeout that had been set on a statement. This meant that a batch like
the following would always use the default timeout that is set in the
Gapic generated client, and ignore the timeout set in
Statement#setTimeout(int):
statement.setTimeout(120);
statement.addBatch("insert into foo (id) values (1)");
statement.executeBatch(); // This ignored the statement timeout
Fixes googleapis#870
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.
A bug was introduced, where if the caller tried to set a custom user agent with a header provider an exception would be thrown (for duplicate keys). Here, we merge the user agent set by the client along with the one set by the library, instead of throwing such exception.
Fixes #880