-
Notifications
You must be signed in to change notification settings - Fork 424
use a script to download premade binaries instead of compiling them #3692
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
base: main
Are you sure you want to change the base?
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test all |
|
/test pull-kcp-lint |
1 similar comment
|
/test pull-kcp-lint |
|
/test pull-kcp-lint |
|
/test pull-kcp-lint |
|
/test all |
|
/test all |
|
/retest |
1 similar comment
|
/retest |
|
/test all |
|
/test all |
I dont quite get this.
I Im a bit lost on how to update the checksums now? |
|
/retest |
|
controller-gen accidentally was left in a superposition where it was a Go module (those are not checksummed), but it still had checksums in the checksum file from my previous testing. I have now corrected it and now the checksums will be updated as described. |
On-behalf-of: @SAP [email protected]
On-behalf-of: @SAP [email protected]
On-behalf-of: @SAP [email protected]
…s with versions appended to them On-behalf-of: @SAP [email protected]
|
@xrstf: The following test failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Summary
This resurrects #3431, but better.
The main issue I could not solve in the previous PR was @embik's wish to have checksums being checked when downloading a tool. It would have been trivial to just record the checksum for the host's specific OS/arch combo, because that's the binary we just downloaded, BUT trouble arises when anyone wants to update a tool like golangci-lint: If all I can do is update the checksum for my own OS/arch combo, then everyone on other machines will suddenly run into issues.
To solve this, the download script now doesn't get the full, final URL passed as an arg, but instead a URL pattern (with placeholders like
{GOOS}). This enables the script to construct the URLs for any other OS/arch combo, download those, calculate the checksums and update all golangci-lint checksums in one go.Since I want to use the same approach in my private projects, I worked on this on my own time and therefore created the repo at Codeberg.
Using it
Unless you want to update a tool, nothing changes for you.
make lintwill still just download golangci-lint and use it.If you want to update a tool, you have to
makecommand to download the tool (make importswould also, for example, work for refreshing golangci-lint) with the env variableUGET_UPDATE=true. This will instruct µget to not install the binary for you, but re-download and re-checksum all variants of the tool that is knows from the checksum file. I.e.UGET_UPDATE=true make lintwill update all golangci-lint checksumshack/tools.checksums. Afterwardsmake lintjust works as expected.What Type of PR Is This?
/kind cleanup
Release Notes