Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

feat: add support for quotaProjectId header #826

Merged
merged 3 commits into from Dec 12, 2019

Conversation

codyoss
Copy link
Member

@codyoss codyoss commented Dec 5, 2019

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 5, 2019
@codyoss
Copy link
Member Author

codyoss commented Dec 5, 2019

After this change a release will need to be cut and core updated in order to make the proper changes there.

@codecov
Copy link

codecov bot commented Dec 5, 2019

Codecov Report

Merging #826 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #826      +/-   ##
============================================
+ Coverage     78.69%   78.71%   +0.02%     
- Complexity     1145     1146       +1     
============================================
  Files           202      202              
  Lines          5092     5098       +6     
  Branches        404      405       +1     
============================================
+ Hits           4007     4013       +6     
  Misses          912      912              
  Partials        173      173
Impacted Files Coverage Δ Complexity Δ
...om/google/api/gax/rpc/ApiClientHeaderProvider.java 90% <100%> (+0.93%) 10 <0> (+1) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0abb5c...307ea38. Read the comment docs.

@codyoss codyoss marked this pull request as ready for review December 9, 2019 19:36
@codyoss codyoss requested a review from a team December 9, 2019 19:36
@codecov-io
Copy link

codecov-io commented Dec 10, 2019

Codecov Report

Merging #826 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #826      +/-   ##
============================================
+ Coverage     78.69%   78.71%   +0.02%     
- Complexity     1145     1146       +1     
============================================
  Files           202      202              
  Lines          5092     5098       +6     
  Branches        404      405       +1     
============================================
+ Hits           4007     4013       +6     
  Misses          912      912              
  Partials        173      173
Impacted Files Coverage Δ Complexity Δ
...om/google/api/gax/rpc/ApiClientHeaderProvider.java 90% <100%> (+0.93%) 10 <0> (+1) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0abb5c...110f6a0. Read the comment docs.

@igorbernstein2 igorbernstein2 removed their request for review December 11, 2019 18:11
@igorbernstein2 igorbernstein2 dismissed their stale review December 11, 2019 18:12

thanks for adding docs

Copy link
Contributor

@chingor13 chingor13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gapic-only clients don't use google-cloud-core so there must be another place in the gax that would use this.

@codyoss
Copy link
Member Author

codyoss commented Dec 12, 2019

I think you are right. Looks like there is one spot that it is possible it does not get set when making a JWT ServiceAccount in GoogleCredentialsProvider. I will add this in a followup PR once googleapis/google-auth-library-java#383 is merged and released.

@codyoss codyoss merged commit 0fe52ac into googleapis:master Dec 12, 2019
@codyoss codyoss deleted the quota-project-id branch December 12, 2019 18:20
@codyoss codyoss mentioned this pull request Dec 13, 2019
@broady
Copy link

broady commented Dec 13, 2019

What's the meaning of the token suffix? A project ID doesn't match with the common understanding of "token"

@codyoss
Copy link
Member Author

codyoss commented Dec 16, 2019

@broady nothing special. Looking at the others properties of the builder, it did not seem like Token applied to them either(at least not all). I could be wrong on this though as the class does not document what its properties are for. So I went with consistency of api related to other fields. If you think it is right though, we can drop the suffix. I will have to just deprecate the old one though for now as a release has already happened.

@broady
Copy link

broady commented Dec 16, 2019

@codyoss I looked more, it looks like "token" really only makes sense for constructing the client string.

I think "resource token" and "quota project id token" don't make sense.

Seems fine to leave as-is if users aren't typically interacting with this package.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants