You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment type (Please select at least one environment where you face this issue)
Self-Hosted
Microsoft Hosted
VMSS Pool
Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Operation system
Windows-latest
Task log
n/a
Relevant log output
Setting AZURE_CONFIG_DIR env variable to: D:\a\_temp\.azclitask
Aditional info
The Azure Pipelines Hosted Agent images take extra care making sure that azure-cli is configured, pre-compiled, all required additional packages have been installed and the command index has been built.
By redirecting the AZURE_CONFIG_DIR to the agent's temp directory, all of that goes to waste and the performance difference is quite high. On the Windows Hosted Agents the time to run a simple command is about 1 extra minute than is needed.
Setting the useGlobalConfig: true prevents the overriding of the azure configuration directory.
I'm proposing that when:
the task runs on the hosted agent
the AZURE_CONFIG_DIR environment variable is already set
Then:
AzureCLI@2 will not reset the AZURE_CONFIG_DIR variable
OR:
AzureCLI@2 will log a warning if useGlobalConfig isn't explicitly set to false to indicate the perf improvement that's possible by introducing this setting.
⚠️ Warning: this might be a breaking change if people are mixing useGlobalConfig with both true and false on the hosted agent, in the same job. hence my alternative of logging the suggestion.
The text was updated successfully, but these errors were encountered:
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days
Task name
AzureCLI
Task version
2
Environment type (Please select at least one environment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Operation system
Windows-latest
Task log
n/a
Relevant log output
Aditional info
The Azure Pipelines Hosted Agent images take extra care making sure that azure-cli is configured, pre-compiled, all required additional packages have been installed and the command index has been built.
By redirecting the
AZURE_CONFIG_DIR
to the agent's temp directory, all of that goes to waste and the performance difference is quite high. On the Windows Hosted Agents the time to run a simple command is about 1 extra minute than is needed.Setting the
useGlobalConfig: true
prevents the overriding of the azure configuration directory.I'm proposing that when:
AZURE_CONFIG_DIR
environment variable is already setThen:
AZURE_CONFIG_DIR
variableOR:
useGlobalConfig
isn't explicitly set tofalse
to indicate the perf improvement that's possible by introducing this setting.The method that would be changed:
azure-pipelines-tasks/Tasks/AzureCLIV2/azureclitask.ts
Lines 181 to 193 in 16dcae9
useGlobalConfig
with bothtrue
andfalse
on the hosted agent, in the same job. hence my alternative of logging the suggestion.The text was updated successfully, but these errors were encountered: