Closed xjuan closed 1 month ago
Good catch @xjuan 😄
Checking the validity of the token and refreshing it is probably a good idea prior to the metadata exchange.
We do await cache.connect_info()
prior to the metadata exchange which should refresh the token before it expires in the majority of cases which is probably why it occurs so infrequently.
But I agree, explicitly checking it again should fix any race condition where the token expires between the connection info call and the metadata exchange.
This should be a rare case, but we can still get the fix in to prevent it.
Bug Description
New connections to alloyDB stops working after 30hs of fastapi service running on cloud run.
The problem is the token sent in the metadata exchange is never refreshed.
The following code example is a simplified version of the actual connection code.
Example code (or command)
Stacktrace
Steps to reproduce?
Environment
Additional Details
No response