Skip to content

chore(spanner): add example for Mutable Credentials#12293

Open
ldetmer wants to merge 5 commits intomainfrom
mut-cred-example
Open

chore(spanner): add example for Mutable Credentials#12293
ldetmer wants to merge 5 commits intomainfrom
mut-cred-example

Conversation

@ldetmer
Copy link
Copy Markdown
Contributor

@ldetmer ldetmer commented Mar 27, 2026

This provides an example of how to use mutable credentials.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new Java snippet, MutableCredentialsExample.java, which demonstrates how to implement dynamic credential rotation in Google Cloud Spanner using MutableCredentials and a scheduled executor to monitor file updates. The review feedback suggests improving the example's usability by passing the credentials path as a method parameter and enhancing code readability by using an import for AtomicReference instead of its fully qualified name.

ldetmer and others added 2 commits March 27, 2026 10:36
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@ldetmer ldetmer marked this pull request as ready for review March 27, 2026 15:45
@ldetmer ldetmer requested a review from a team as a code owner March 27, 2026 15:45
@snippet-bot
Copy link
Copy Markdown

snippet-bot bot commented Mar 27, 2026

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

ldetmer and others added 2 commits March 27, 2026 13:30
# Conflicts:
#	java-spanner/samples/snippets/src/main/java/com/example/spanner/MutableCredentialsExample.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants