Open dozer75 opened 1 year ago
@StephenWeatherford can you take a look at this and see if there's a bug in the SDK we're using? It seems like @dozer75 is using the right-click deploy experience based on the logs.
Yeah, I don't think refreshing the token has been implemented. Although we haven't really tried to optimize the Azure deployment monitoring code at all, we're not really intending it to be a robust experience at the moment, which is why we output the link to the portal:
5:04:21 PM: View deployment in portal: https://portal.azure.com/#blade/HubsExtension/DeploymentDetailsBlade/overview/id/%2Fsubscriptions%2<subscriptionid>%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2FAPISC-230919-1509.
So that becomes the obvious work-around until we get time to implement refreshing tokens.
@StephenWeatherford how much work is it to add token expiration here?
Bringing back to triage to discuss priority since Stephen doesn't have time to investigate and we have been pushing this sprint to sprint.
The Bicep Deployment Pane seems to be impacted by this. I am running some pretty long vmss customscriptextension and it will timeout.
Bicep version VS Code bicep: v0.21.1
Describe the bug Some resources on Azure takes a LONG time to finish, e.g. setting up API management in Sweden Central (1h 15m, I tried it twice with the same result). This causes Bicep access token to time out during the process and stop working which again causes our automatic deployments to fail.
Sure, you could say that this is an issue in Azure and that resources should not take that long time to deploy, but it is even warned in the API Management documentation that the operation takes a long time, and you will never know since this is out of our control.
My suggestion is that the Bicep CLI should try to refresh the access token either before the expiresIn value or when an authentication error occur.
To Reproduce Steps to reproduce the behavior: Execute a Bicep operation that takes a long time to finish (e.g. API management in swedencentral)
Here is an example script that caused the issue in swedencentral:
Additional context Bicep output in Visual Studio Code