mirror of https://github.com/pulumi/pulumi.git
a437b90a5e
Currently the token source loop will stop if `refreshToken` ever returns an error, regardless of what that error is. While the API call to the service does have some retry logic at it's level it can still potentially return an error just due to transient network/server conditions. In that case the refreh loop will just stop working and the token will eventually expire. This changes the token source to keep going until it gets a specific `expiredTokenError` error. This should make it more resilient to network issues. Towards fixing https://github.com/pulumi/pulumi/issues/7094. (This is basically a revert of the revert of https://github.com/pulumi/pulumi/pull/17127, and adds a little bit more logging. We reverted that PR originally because something was causing excessive requests to the service. However I believe what actually caused the excessive requests was https://github.com/pulumi/pulumi/pull/17338. Everything in this PR only runs once every (duration / 8), which is roughly every 40 sec, which won't overwhelm the service). This also adds a little bit of additional logging to shed light on this. --------- Co-authored-by: Fraser Waters <fraser@pulumi.com> Co-authored-by: Will Jones <will@sacharissa.co.uk> |
||
---|---|---|
.. | ||
display | ||
diy | ||
filestate | ||
httpstate | ||
state | ||
apply.go | ||
apply_test.go | ||
backend.go | ||
backend_test.go | ||
cancellation_scope.go | ||
doc.go | ||
errors.go | ||
inmemoryPersister.go | ||
login_manager.go | ||
mock.go | ||
policypack.go | ||
query.go | ||
snapshot.go | ||
snapshot_test.go | ||
stack.go | ||
updates.go | ||
watch.go |