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

Update go install for minimal images to use the existing go version #1450

Merged
merged 16 commits into from
Jul 3, 2024

Conversation

rcrozean
Copy link
Member

Issue #, if available:

Description of changes:
Since EKS Distro is deprecating EKS Go and don't want to continue building the RPMs for the versions upstream is supporting, we can use the existing golang installed on the builder base to install the newest versions. In this pr I am preserving the old eksgo install function but renaming them to ::eksgo::*. The new function calls go install and go download to install and unpack the newest version of golang produced by upstream following managing multiple golang installs. This followed with a prowjob to auto bump the versions.yaml and null the golang minimal images (#1449) is the proposed new method for installing golang on the builder base

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from rcrozean. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions github-actions bot added the minimal-image Changes related to the minimal-images or tooling label Jun 17, 2024
@rcrozean rcrozean force-pushed the goInstallGo branch 2 times, most recently from f93e008 to 54e8a39 Compare June 17, 2024 21:38
for arch in ${archs/,/ }; do
local filename="$outputDir/${arch}/go$version.${arch/\//-}.tar.gz"
if [ ! -f $filename ]; then
curl -sSLf --retry 5 "https://go.dev/dl/go$version.${arch/\//-}.tar.gz" -o $filename --create-dirs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would probably be best to check the checksums here. if you want to follow the pattern we use elsewhere, we could check those in or download them from go.dev, like we did the rpm shas above. again but not strictly required but would be at least slightly better

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the additions for checking the sha and here is the local output.

+ curl -sSLf --retry 5 https://go.dev/dl/go1.22.4.linux-amd64.tar.gz -o /tmp/test/linux/amd64/go1.22.4.linux-amd64.tar.gz --create-dirs
++ curl -sSLf --retry 5 'https://go.dev/dl/?mode=json'
++ jq -r --arg tar go1.22.4.linux-amd64.tar.gz '.[].files[] | if .filename == $tar then .sha256 else "" end'
++ xargs
+ sha256sum=ba79d4526102575196273416239cca418a651e049c2b099f3159db85e7bade7d
++ sha256sum /tmp/test/linux/amd64/go1.22.4.linux-amd64.tar.gz
++ cut '-d ' -f1
+ [[ ba79d4526102575196273416239cca418a651e049c2b099f3159db85e7bade7d != \b\a\7\9\d\4\5\2\6\1\0\2\5\7\5\1\9\6\2\7\3\4\1\6\2\3\9\c\c\a\4\1\8\a\6\5\1\e\0\4\9\c\2\b\0\9\9\f\3\1\5\9\d\b\8\5\e\7\b\a\d\e\7\d ]]

@eks-distro-bot
Copy link
Collaborator

eks-distro-bot commented Jul 3, 2024

@rcrozean: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
eks-distro-base-tooling-presubmits-windows e264c81 link true /test eks-distro-base-tooling-presubmits-windows

Full PR test history. Your PR dashboard.

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.

@rcrozean rcrozean merged commit 67cf584 into aws:main Jul 3, 2024
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder-base lgtm minimal-image Changes related to the minimal-images or tooling size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants