Open olafurnielsen opened 5 months ago
This step is consuming 10 to 15 percent of our GitHub Actions build minutes and is costing us money. This should be fixed as a high priority please.
Hi @olafurnielsen and @damianh, we've released a new version v2.2.0. In this version, we removed the pre
step and add 2 env variables to enable/disable pre or post cleanup.
v2
is aligned with v2.2.0
now.
Please try the new version. You can also refer to Enable/Disable the cleanup steps.
Just FYI, the time cost is mainly for login context initialization. After we remove pre
step, the main
step may need more time.
Hi @YanaXu
I've been trying the mentioned version, with both AZURE_LOGIN_PRE_CLEANUP and AZURE_LOGIN_POST_CLEANUP set to false and i'm having an average of 1 minute for the login action.
EDIT: Can we use a composite action to cache the login so it doesn't have to be redone every time?
Hi @GoncaloPT , could you help me check these questions?
The login time cost depends on underlying Azure CLI and Azure PowerShell. They needs time to init the login context. However, our daily test on GitHub-hosted runners (utuntu & windows & MacOS) shows the time cost is less than yours (including both Azure CLI login and Azure PowerShell login). Take the time cost yesterday for example. There are 18 logins and the max one is 51 seconds, the min one is 10 seconds and the average is 23 seconds.
Hi @YanaXu, thanks for your reply.
Replying to your questions:
Regarding the time cost you present, I haven't been able to reproduce logins near those ones values.. The full roundtrip of login + fetch one secret from key vault took from 1m:13s up to 1:50s.
Observed behavior: The pre step in azure/login takes up to 1 minute to execute. Very seldom does it take a few seconds to execute. In some of our builds this accounts for half the total build time.
Expected behavior: The step should consistently execute in a few seconds.
Information:
azure/login@v2
Used as:
Resulting in:
What can be done to speed this up?