mysql/awsmysql: allow refresh the IAM token when its expired#3625
Merged
vangent merged 1 commit intogoogle:masterfrom Oct 26, 2025
Merged
mysql/awsmysql: allow refresh the IAM token when its expired#3625vangent merged 1 commit intogoogle:masterfrom
vangent merged 1 commit intogoogle:masterfrom
Conversation
Contributor
Author
|
cc @vangent for review. |
vangent
reviewed
Oct 24, 2025
mysql/awsmysql/awsmysql.go
Outdated
| if c.iam != nil { | ||
| var err error | ||
| // AuthToken is expired after 15 minutes, | ||
| // so we need to refresh it for each new connection. |
Contributor
There was a problem hiding this comment.
This isn't strictly true is it? If someone does 1000 connections at startup, you'll refresh IAM 1000 times, but only needed to do it once.
Are you copying this pattern of refresh-in-background from somewhere else, or ...?
Contributor
Author
There was a problem hiding this comment.
BuildAuthToken call is local-ops, without network invoke. So I think its okay to have 1000 tokens there. The cert provider already has its cache to use when assume the token via RoleARN.
And ofcourse, not AI thing there.
Contributor
Author
|
@vangent review again please, |
vangent
approved these changes
Oct 26, 2025
Contributor
|
I really wish we had better testing for this, but it looks OK to me. |
This was referenced Oct 27, 2025
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.
No description provided.