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

Override ubi9's gotoolchain from local to auto #71

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nvtnlucie
Copy link
Collaborator

@nvtnlucie nvtnlucie commented Nov 15, 2024

This change allows Renovate to renovate different versions of Go. There was also a suggestion to predownload different toolchains, however when i tested this agains dependency from go1.21 and go1.23 it did not redownload anything, can I skip it?

@gnaponie
Copy link
Collaborator

Unfortunately I'm not expert enough in go to reply. Maybe @qixiang and @querti know it better.
Would you be able to link the documentation reference where you saw these info? So I can check it and give me my 50 cents on this.

@qixiang
Copy link
Collaborator

qixiang commented Nov 18, 2024

The ref doc: https://go.dev/doc/toolchain

when i tested this agains dependency from go1.21 and go1.23 it did not redownload anything, can I skip it?

Not sure how did you test it, in theory, if you're running with any go <= 1.23, it should download the newer version of go toolchain in go 1.23 project.

From above linked doc:

For example, when using the go command bundled with Go 1.21.3 in a main module that says go 1.21.9, the go command finds and runs Go 1.21.9 instead. It first looks in the PATH for a program named go1.21.9 and otherwise downloads and caches a copy of the Go 1.21.9 toolchain.

@nvtnlucie
Copy link
Collaborator Author

@qixiang Hmm, I built the image and let Renovate update 2 go.mod files, each with different version written at the top. Renovate does not complain about not having the correct version, nor does it download the latest one, I dont think it requires running go at all.
I am looking at the managers again, there is option to enable to run go mod tidy after an update, maybe thats the problematic part? Ill retest it.

Dockerfile Show resolved Hide resolved
@staticf0x
Copy link
Collaborator

The GOTOOLCHAIN=auto seems to work, it downloads the required Go toolchain version automatically if the system doesn't provide the required version.

Co-authored-by: Riley <[email protected]>
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

Successfully merging this pull request may close these issues.

4 participants