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

tests: set GOTOOLCHAIN var for report validation #17734

Merged
merged 1 commit into from Apr 24, 2024

Conversation

MadhavJivrajani
Copy link
Contributor

@MadhavJivrajani MadhavJivrajani commented Apr 8, 2024

Set GOTOOLCHAIN directive in order to successfully run tests
from root. Else, go will try and download a family of releases
(of the form 1.x), which are not published binaries.

Ref: #17733 (comment)

tests/go.mod Outdated Show resolved Hide resolved
@serathius
Copy link
Member

Looks like I didn't keep up with latest Golang features. Don't know toolchain feature enough to make long term decision yet, however short term would be good to be consistent. The choice is either .go-version file with #17733 (comment), or migrate to toolchain.

I think until we decide to remove .go-version file, I would prefer it to be source of go version in the project.

@ahrtr
Copy link
Member

ahrtr commented Apr 9, 2024

Agreed to use .go-version as the single source of truth of the go&toolchain version. Then I think we may want to update the build script to use the .go-version as the toolchain version as well.

Set GOTOOLCHAIN directive in order to successfully run tests
from root. Else, go will try and download a family of releases
(of the form 1.x), which are not published binaries.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
@MadhavJivrajani
Copy link
Contributor Author

Hey all, getting back to this PR

@jmhbnz that's a good point. I've made the change that uses the .go-version file instead to set the GOTOOLCHAIN env var.

Also, as next steps, we could do what Kubernetes does: https://github.com/kubernetes/community/blob/aea3ba11fc4dee0ae21f20c7412c732b79c666eb/contributors/devel/development.md#building-kubernetes-using-a-specific-version-of-go

Maybe have a way of setting the GOTOOLCHAIN env var as a prereq to running tests in general.

@MadhavJivrajani MadhavJivrajani changed the title tests: add toolchain directive to go.mod @MadhavJivrajani tests: set GOTOOLCHAIN var for report validation Apr 23, 2024
@MadhavJivrajani MadhavJivrajani changed the title @MadhavJivrajani tests: set GOTOOLCHAIN var for report validation tests: set GOTOOLCHAIN var for report validation Apr 23, 2024
@ahrtr
Copy link
Member

ahrtr commented Apr 23, 2024

Please feel free to merge this PR if any maintainer wants.

But we need to revisit the go version management. Please read #17857

@serathius
Copy link
Member

serathius commented Apr 24, 2024

Please feel free to merge this PR if any maintainer wants.

But we need to revisit the go version management. Please read #17857

Right, want to merge as the makefile command apparently doesn't work for @MadhavJivrajani ref #17733 (comment)

@serathius serathius merged commit 96d6194 into etcd-io:main Apr 24, 2024
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants