-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Upgrade devcontainer go version to 1.24.6 #35298
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
Upgrade devcontainer go version to 1.24.6 #35298
Conversation
Is is really a problem? go should download any newer toolchain version automatically, so if you are on 1.24.5 and go.mod requires 1.24.6, go should download the 1.24.6 toolchain automatically on first invocation. Also, in any case I find this too much of hack, there should only be one place in the repo where we specify the minimum go version, which is go.mod. |
@silverwind Only a "problem" for anyone wanting the devcontainer to Just Work. Unless I was doing something wrong, which is entirely possible, the I agree with this being a hack. |
Do have any logs from when it exits? |
I suspect the bug may be in Lines 199 to 207 in 6619b1e
It only checks 2-part version syntax but we recently changed to 3-part. |
Signed-off-by: Jackson Stewart <[email protected]>
I also found that setting GOTOOLCHAIN to auto gets it to upgrade itself. I think the packaged image sets it to local |
VS Code output:
|
Hmm yeah, |
Looks like the official Golang image has it set. Image references this issue as the proposal for setting it. |
I think we could reasonably set it to |
According to devcontainers/images#921 (comment), devcontainer images only publish once a month, so they lag behind in go patch releases. This is a stopgap solution. Ultimately, I would prefer if we set go.mod to minimum version "1.24.0" and stop updating go.mod on every patch release. |
That's my preference too. Sadly, we cannot, as it flags for several widely used "CVE" scanners, creating a headache as people report false positives. |
Sounds like those scanners misinterpret the |
* giteaofficial/main: exit with success when already up to date (go-gitea#35312) Update to [email protected] (go-gitea#35310) Upgrade devcontainer go version to 1.24.6 (go-gitea#35298)
Addresses go version mismatch when using the devcontainer as a result of this commit (bumps Go version from 1.24.5 to 1.24.6)
The current official devcontainer Go image used in this repository (
1.24-bookworm
) uses 1.24.5 and sets GOTOOLCHAIN to local. This PR overrides it to auto so that build commands automatically update to the correct version.