-
Notifications
You must be signed in to change notification settings - Fork 606
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
Add backup logic for Go installation in Amazon Linux buildspec #4253
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add missing quotation mark to AL23_VERSION
tinnywang
reviewed
Jul 23, 2024
amogh09
reviewed
Jul 23, 2024
sparrc
approved these changes
Jul 29, 2024
tinnywang
approved these changes
Jul 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds backup go installation logic for Amazon Linux buildspec. Between July 16-22 our Go version did not match Amazon Linux's Go version. This caused the AL make target to fail and a lack of All-Dogs AL artifacts. They are building now, but this adds logic to install the latest available Go version, if our specified version is not yet available.
1.22.3
to1.22.5
1.22.4
to1.22.5
PRs that were created or updated between July 16th - July 22nd did not successfully build Amazon Linux 2 or 2023 All-Dogs artifacts because Amazon Linux 2023 version
2023.5.20240708
wasUnable to find a match: golang-1.22.5
.Implementation details
This edit adds logic to the Go installation within the Amazon Linux buildspec file. First, it tries to install the Go version from the amazon-ecs-agent repo’s GO_VERSION file. If that fails, it will find that latest available Go version for the platform instead.
Testing
Testing was performed on a forked branch and personal Isengard account, which mirrors the configuration of the CodeBuild projects in the dev+ci account. See this PR for more details.
Different approach attempted:
Using
source ./scripts/install-golang.sh
to install Go and download it from the source was attempted. The source install script approach does not work for Amazon Linux build jobs, as the environment changes made by that script do not persist to the rest of the build steps running in a separate shell session. Instead, the reliable way to install Go is through the package manager (yum or dnf), which ensures the necessary environment variables are set correctly for the entire build process.Description for the changelog
Adds backup logic to install latest available Go version in Amazon Linux buildspec
Does this PR include breaking model changes? If so, Have you added transformation functions?
No
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.