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

Vault requires go 1.22.5 to build; found 1.22.2. #27894

Closed
borjaOrtizLlamas opened this issue Jul 29, 2024 · 7 comments
Closed

Vault requires go 1.22.5 to build; found 1.22.2. #27894

borjaOrtizLlamas opened this issue Jul 29, 2024 · 7 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@borjaOrtizLlamas
Copy link

borjaOrtizLlamas commented Jul 29, 2024

Describe the bug
I am building vault with some patches and i am having this error:

==> Checking that build is using go version >= 1.22.5...
go: downloading go1.22.2 (linux/amd64)
Vault requires go 1.22.5 to build; found 1.22.2.

logs:

make[2]: Entering directory '/builds/ISE/mirrors/vault/build/vault-1.17.2'
==> Checking that build is using go version >= 1.22.5...
go: downloading go1.22.2 (linux/amd64)
Vault requires go 1.22.5 to build; found 1.22.2.
make[2]: *** [Makefile:266: check-go-version] Error 1
make[2]: Leaving directory '/builds/ISE/mirrors/vault/build/vault-1.17.2'
make[1]: *** [debian/rules:15: override_dh_auto_build] Error 2
make[1]: Leaving directory '/builds/ISE/mirrors/vault/build/vault-1.17.2'
make: *** [debian/rules:8: build] Error 2

To Reproduce
Build with make
prep: check-go-version clean

Expected behavior
Finish the build

@heatherezell
Copy link
Contributor

Are you able to try downloading Go 1.22.5 and see if the error persists? Thanks!

@heatherezell heatherezell added waiting-for-response dependencies Pull requests that update a dependency file labels Jul 29, 2024
@borjaOrtizLlamas
Copy link
Author

i already have it, the problem i found its here

https://github.com/hashicorp/vault/blob/main/api/auth/aws/go.mod#L5

If i change it to 1.25, it works. Do you think is also my system?

@heatherezell
Copy link
Contributor

i already have it, the problem i found its here

https://github.com/hashicorp/vault/blob/main/api/auth/aws/go.mod#L5

If i change it to 1.25, it works. Do you think is also my system?

No, that's pretty clear - thanks for the report! I'll take it back to the team. :)

borjaOrtizLlamas added a commit to borjaOrtizLlamas/vault that referenced this issue Jul 31, 2024
borjaOrtizLlamas added a commit to borjaOrtizLlamas/vault that referenced this issue Jul 31, 2024
@borjaOrtizLlamas
Copy link
Author

Tell me if this change pass all tests, unless with the unitary works. Dont know with the conformance.

@banks
Copy link
Member

banks commented Jul 31, 2024

Hi @borjaOrtizLlamas, I'm trying to understand the issue here - I don't think Go should prevent you building because there is an older toolchain in a submodule. If they all have to be perfectly in sync then ours and many projects release processes are all broken so that would be a bigger issue!

Also, I can build this on the same version of Go as you without issues and so can our CI!

That said, I'm not super familiar with this new toolchain stuff so I'm just trying to figure it out from https://go.dev/doc/toolchain

There is says:

In the standard configuration, the go command uses its own bundled toolchain when that toolchain is at least as new as the go or toolchain lines in the main module or workspace.

Which I think means this should be fine since you have have a version of Go toolchain that is newer it should just use that and be happy.

It seems like Go is downloading the older version to satisfy this toolchain command, but it should presumably only use that older version for building that module 🤔 .

It could be that our go version check in Makefile is interacting with this new toolchain behaviour badly and needs a fix, but I'm curious why I and others are not seeing the same thing you are in that case.

Can you confirm whether you have GOTOOLCHAIN set in env?

When you said Build with make which make target are you using? I can run prep and dev fine on the same Go version.

You also mentioned patches, can you build main without your patches or do you get the same result (just to rule out changes to dependencies etc. caused by your changes)?

@banks
Copy link
Member

banks commented Jul 31, 2024

Oh I see the logs include https_proxy=http://itproxy.1and1.org:3128/ make so presumably that is the command you are seeing cause an issue. Can you confirm whether you are doing that from the root of the repo or just trying to build a specific go module under SDK? It works for me from the root at least.

@stevendpclark
Copy link
Contributor

Hello @borjaOrtizLlamas, since there hasn't been any follow up on the issue for over a month, I'm going to assume we can close this out without the proposed fixes.

If I'm incorrect and you are still encountering the issue, please re-open this issue with a follow up to the questions/comments above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

4 participants