Skip to content
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

One thing is to make module installation parallel. #2051

Open
thorinb1983 opened this issue Jan 28, 2025 · 0 comments
Open

One thing is to make module installation parallel. #2051

thorinb1983 opened this issue Jan 28, 2025 · 0 comments

Comments

@thorinb1983
Copy link

One thing is to make module installation parallel.
current:
https://github.com/actions/virtual-environments/blob/4de7f89a42529d48d04cc7a7eb85b570b709448c/images/linux/scripts/installers/azpowershell.sh#L15-L18
new:

parallel --jobs 0 --halt soon,fail=1 'pwsh -Command "Save-Module -Name Az -LiteralPath /usr/share/az_{} -RequiredVersion {} -Force -Verbose"' ::: "${versions[@]}"

I'm pretty sure there could be more actions that can be parallelised in this repo, unfortunately it's quite hard to read all the scripts where everything is mixed together with multiple different downloading tools (since that takes most of the time).

Another option would be (if you care about anywhere from seconds to minutes, I have not measured performance gain) to not run PowerShell, since, lets be honest here, its start-up and performance is just not great in comparison to bash.
Either commit to it completely or don't use it at all.

I've never used packer so I don't know it's full capabilities/quirks but it's been quite an effort to port one image to Docker and it took lots of time debugging whole thing. It would have been easier if it was done in pure bash or pure PowerShell.

Originally posted by @catthehacker in actions/runner-images#2320 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant