-
Notifications
You must be signed in to change notification settings - Fork 266
fix: ImmutableSet converted to List for Impersonated Credentials #732
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
Conversation
As part of BigQueryOptions the SCOPES is defined as an ImmutableSet. When using an Impersonated Account, it fails when trying to get service as the SCOPES are immutableSet and the previous code tries to cast it to List directly and fails. Adding a fix for the same
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
@googlebot I signed it! |
chingor13
left a comment
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.
Thanks for submitting this. Can you add a simple test for this failure so that we don't regress in the future?
Adding JUnit Test Cases for the change
Adding JUnit Test Cases for the change
@chingor13 Added the JUnit Test case. |
TimurSadykov
left a comment
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.
Hi, sorry for delay, some minor comments and we can get it done. Thanks!
oauth2_http/javatests/com/google/auth/oauth2/ImpersonatedCredentialsTest.java
Outdated
Show resolved
Hide resolved
oauth2_http/javatests/com/google/auth/oauth2/ImpersonatedCredentialsTest.java
Outdated
Show resolved
Hide resolved
oauth2_http/javatests/com/google/auth/oauth2/ImpersonatedCredentialsTest.java
Outdated
Show resolved
Hide resolved
oauth2_http/javatests/com/google/auth/oauth2/ImpersonatedCredentialsTest.java
Outdated
Show resolved
Hide resolved
Changes made as per the code review comments
Changes made as per the code review comments
TimurSadykov
left a comment
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.
LGTM
|
@dpanangat hey, thanks for updates, please fix the linter failure and we should be good to go. To do that you need to run the "mvn com.coveo:fmt-maven-plugin:format" command and push resulted format changes. |
🤖 I have created a release *beep* *boop* --- ## [1.6.0](v1.5.3...v1.6.0) (2022-03-15) ### Features * Add AWS Session Token to Metadata Requests ([#850](#850)) ([577e9a5](577e9a5)) ### Bug Fixes * ImmutableSet converted to List for Impersonated Credentials ([#732](#732)) ([7dcd549](7dcd549)) * update library docs ([#868](#868)) ([a081015](a081015)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
As part of BigQueryOptions or StorageOptions the SCOPES is defined as an ImmutableSet.
When using an Impersonated Account, it fails when trying to get service, as the SCOPES are immutableSet and the previous code tries to cast it to List directly and fails.
Adding a fix for the same.
Fixes #731 ☕️