changing it to return the actual error provides the right information:
Error: Received unexpected error:
failed to refresh token: the MSI endpoint is not available. Failed HTTP request to MSI endpoint:
Get "http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01": context deadline exceeded
Which in my case was a the IMDS endpoint timing out.
This happens very easily when running a set of integration tests concurrently (just a dozen...), each authenticating to the IMDS endpoint.
It seems that IMDS handles them very badly.
Fix
This fixes the error message returned when refreshing the token fails. it currently returns the token :
changing it to return the actual error provides the right information:
Which in my case was a the IMDS endpoint timing out. This happens very easily when running a set of integration tests concurrently (just a dozen...), each authenticating to the IMDS endpoint. It seems that IMDS handles them very badly.
changelog.md
Environment