Azure login token expires while running Ubuntu GitHub workflow
ant0nsc opened this issue · comments
This is a problem very similar to #180 . As part of a GitHub workflow on an Ubuntu runner, we call azure/login
to get a token. We then run a time-consuming pytest
suite, that relies on Azure authentication at some point. Somewhere through the test suite this then starts failing with
Client assertion is not within its valid time range
@YanaXu You were asking in #180 for example workflows with debugging information, here is one such run: https://github.com/microsoft/hi-ml/actions/runs/8390561874/job/22987990866?pr=925
The underlying code changes (switching from SP authentication to using the Azure login action) is here: https://github.com/microsoft/hi-ml/pull/925/files
We are running into a similar but potentially subtly different issue with OIDC in that our workflow fails to get a token after exactly 10 minutes.
I have added a step that following the recommendation from #180 (comment) to refresh the token from within the code but the AzureCliCredential is failing saying we need to logged in.
I have cut a ticket to GitHub to see if they changed some configuration with their runners or the federation service.
Facing this issue as well in one of our pipelines. Example: https://github.com/Azure/peerd/actions/runs/8624201295/job/23671375188#step:5:383
Using the azure/login@v1
task to login using federated credentials.
Hi @ant0nsc, @andre-qumulo, @avtakkar, please see Azure/azure-cli#28708 (comment) for a temporary mitigation to extend the task duration to 60 minutes. Or temporarily logging in every 5 minutes.
This is the same issue as #372. Let's track it there.