Skip to content
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

Fix Spanner Emulator triggering default credentials creation #457

Merged
merged 2 commits into from
May 5, 2021
Merged

Conversation

meltsufin
Copy link
Member

Fixes: #455.

@sonarcloud
Copy link

sonarcloud bot commented May 4, 2021

Copy link
Contributor

@elefeint elefeint left a comment

Choose a reason for hiding this comment

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

This will work. I think we may have been overriding client library's default behavior by setting credentials in the first place -- client library has a clause that will automatically set to NoCredentials if emulator is set -- https://github.com/googleapis/java-spanner/blob/7564c11dcf4e06a85d288c88754fe0f0acf47e26/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java#L1019

@meltsufin
Copy link
Member Author

This will work. I think we may have been overriding client library's default behavior by setting credentials in the first place -- client library has a clause that will automatically set to NoCredentials if emulator is set -- https://github.com/googleapis/java-spanner/blob/7564c11dcf4e06a85d288c88754fe0f0acf47e26/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java#L1019

Either way, if we don't create the bean, our core starter will initialize the default credentials provider which will cause this problem.

@meltsufin meltsufin merged commit 32869e1 into main May 5, 2021
@meltsufin meltsufin deleted the gh-455 branch May 5, 2021 00:57
kateryna216 added a commit to kateryna216/spring-cloud-gcp that referenced this pull request Oct 20, 2022
prash-mi pushed a commit that referenced this pull request Jun 20, 2023
Bumps [reactor-bom](https://github.com/reactor/reactor) from 2020.0.12 to 2020.0.13.
- [Release notes](https://github.com/reactor/reactor/releases)
- [Commits](reactor/reactor@2020.0.12...2020.0.13)

---
updated-dependencies:
- dependency-name: io.projectreactor:reactor-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emulator Enablement & No Credentials does not work
2 participants