-
Notifications
You must be signed in to change notification settings - Fork 535
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
Optimize by allowing latest versions installed to be used #39
Comments
If adding multiple preinstalled Go versions to ubuntu-latest or windows-latest, etc. isn't approved, maybe ubuntu-latest-go or windows-latest-go has a better shot at getting approved? This would be useful for any language that releases often (like Rust, having ubuntu-latest-rust). |
We don't even need to do the symlink approach. image generation just needs to have more versions pre-installed in the cache layout. If that's done, it will be instant for the version hits (common ones on the image) and only take the 10 second hit if it's a miss. Also, if you want to use the preinstalled go, then just don't use setup-go action and that one will be in your path. Be aware - that one slides on you as new versions come out. |
Do you have an issue number? |
Nope, this is the only issue I opened with GitHub. I didn't know if better approaches were available to setup-go behind the scenes. |
I think that's the main reason why one would want to use the setup-go action rather than just use whatever Go version is in the But as @x448 said, the performance penalty, especially for quick workflows, of 10s vs. 1s without setup-go is a quite big. |
Ouch, I just discovered that, e.g. Ubuntu 18.04 image, defaults to Go 1.12 (while also having Go 1.11 and Go 1.13 pre-installed) despite Go 1.13 being out since Sep 3, 2019. Furthermore, all minor revisions of installed Go versions are out-dated:
All never minor releases of the respective Go versions contain fixes for security vulnerabilities, so this is also a security issue. So, currently, using setup-go is basically a necessity. |
@bryanmacfarlane on March 16, actions/virtual-environments released ubuntu image with latest version of each of the last 4 big releases of Go (1.11.x to 1.14.x). It would be great if actions/setup-go can leverage this to eliminate the 10 second lag. Ubuntu 1804 (20200316 update) released by actions/virtual-environments lists:
BTW, the release notes for Windows Server 2019 image (released on March 19) only mentions |
The correct fix to cut out the 10s is for image gen to populate the cache with n - x latest versions. |
A related issue: if you don’t specify Currently, it silently short-circuits and doesn’t add |
@ydnar if you don't specify a version it shouldn't install anything. The scenario is you want to use the existing go in the path but you want problem matchers installed and/or proxy configured etc.. See: If you give a version spec of something like |
That’s OK. Could it at least add |
@ydnar - can you log a separate issue for $GOBIN if version not specified? I think that's a good suggestion ... I'll also update docs to make that clearer. |
@bryanmacfarlane does the |
I need to create an issue in virtual-environments and chat with them |
Hello, |
@x448 - I'm going to close since the latest versions are added to the image and should be resolved immediately with no downloads. You can also switch to the |
The output I always get:
Am I missing some config? |
@salarali , your config is correct. Please pay attention that cached versions on image are updated with minor delay (1-2 weeks).
Image should be updated early next week and your builds will start to pickup new version from cache |
Currently, using setup-go can take roughly 10 seconds.
Having setup-go update a symlink to point to a preinstalled Go should take less than 1 second. The current way of installing Go can continue to be used for versions not preinstalled.
The ubuntu-latest image lists Go 1.11, 1.12, 1.13, 1.14 in their release notes.
The text was updated successfully, but these errors were encountered: