-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve performance of az
on ubuntu hosted runners
#8441
Conversation
@ilia-shipitsin FYI. Attached logs show that Ubuntu has the same issue as windows, the performance impact is a lot lower though, but still, this should improve things further: dev.azure.com_jessehouwing_6484ebc3-af16-4af9-aa66-6b3398db7214__apis_build_builds_4830_logs_6.txt Changes are the same as on windows. |
@jessehouwing forgot to mention, please add the |
/azp run ubuntu2004,ubuntu2204 |
Azure Pipelines successfully started running 2 pipeline(s). |
@jessehouwing it looks like |
Hmz Funny... that worked on my machine... Added the creation and setting permissions on that folder. Would it make sense to create and set permissions on that folder earlier in the process of creating the image, instead of setting the permissions trice? Added to |
/azp run ubuntu2004,ubuntu2204 |
Azure Pipelines successfully started running 2 pipeline(s). |
That didn't do the trick. 😥 Would we need to add this too? But then for /opt/az and /opt/az-devops? |
Running a build to verify changes... |
Build succeeded. |
/azp run ubuntu2004,ubuntu2204 |
Commenter does not have sufficient privileges for PR 8441 in repo actions/runner-images |
I wonder if I can, I suppose it won't work. |
Redirects config & cache folders out of user profile Forces installation of keyring package through dummy login/logout Force package load & compilation by calling `--help` on each sub module
c9f6cfc
to
e1d3521
Compare
@jessehouwing is something blocking you on this that I can assist in? |
No clue what this is waiting for. As far as I can tell someone needs to run |
@mikhailkoliada could you trigger the pipeline/merge? |
@vpolikarpov-akvelon Fixed a couple and replied to remaining comments. |
# Conflicts: # images/ubuntu/scripts/build/install-azure-devops-cli.sh
# AZURE_EXTENSION_DIR shell variable defines where modules are installed | ||
# https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-overview | ||
export AZURE_EXTENSION_DIR=/opt/az/azcliextensions | ||
setEtcEnvironmentVariable "AZURE_EXTENSION_DIR" "$AZURE_EXTENSION_DIR" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR seems to have changed the convention away from the setEtcEnvironmentVariable
call back to | tee -a /etc/environment
. I'd be happy to change these calls either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikhailkoliada your thoughts? I'd like to get this closed with the pace at which you folks are updating files, I need to rebase this PR every other day at the moment ;)>
export AZURE_EXTENSION_DIR=/opt/az/azcliextensions | ||
echo "AZURE_EXTENSION_DIR=$AZURE_EXTENSION_DIR" | tee -a /etc/environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines aren't needed, but were introduced by the refactoring of the build scripts.
The environment variable is already set in install-azure-cli.ch
and it makes more sense there, as it's a config setting of az-cli
and not of az-devops
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikhailkoliada your thoughts? I'd like to get this closed with the pace at which you folks are updating files, I need to rebase this PR every other day at the moment ;)>
Ping @mikhailkoliada @jord1e @vpolikarpov-akvelon I really want this thing done. What can we do to move it off the list? I've rebased since the restructure, it looks like some styling things changed, hence my open questions above. I'd like to resolve those ASAP and then close this, it is taking longer than I'd anticipated. |
After observations I do not think we are ready to change this aspect.
|
My initial
And it is implemented on the windows runners already, why would implementing it on Ubuntu change anything summed up in these statements? |
This isn't as much of a change, as much as it is formalizing the default configuration. If not instructed through the environment variable,
I do see high demand for faster runners and faster workflows. Many organizations spend a large amount of time trying to speed up, parallelize and optimize their workflows. That there is no demand specifically for
While I agree the I think it would be possible on the ubuntu image to forego setting the environment variables, still have a reasonable speed improvement. The reason I set the environment variables on the ubuntu runner, is to make the setup aligned to the windows setup, where (due to the removal of the provisioning account) it was deemed preferred to set these environment variables. Note that the current scripts already set a variable for the Azure DevOps extension installation folder. |
Description
Similar to: #8294
The logs show that first invocation on Ubuntu also does a command index rebuild and installs the python keyring package.
This pull request follows the same improvements that were just added to the Windows Hosted Runner.
Expected performance improvement about 10s for calling
az
for the first time.Related issue:
az
behaves similarly on Ubuntu as it did on windows #8442Check list