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

fix(aws): Fix AWS CLI v2 for Alpine Linux #6279

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

jervi
Copy link
Contributor

@jervi jervi commented Aug 26, 2024

The version of the AWS CLI v2 that is currently installed in the slim docker images (Alpine based) does not work. Trying to execute the aws binary results in a bash: /usr/local/bin/aws: No such file or directory error, even though the binary is present. The error occurs because Alpine Linux doesn't support glibc. To fix this we need to install a version of AWS CLI v2 that is using musl instead of glibc.
Starting from Alpine 3.18, compatible aws-cli binaries are available in the official package repos, meaning we can just apt add it.
I've bumped the version to the latest available for Alpine (2.15.57) and also bumped Alpine itself from 3.16 to 3.20 (since aws-cli v2 wasn't available in 3.16, and only 3.20 supports the newest version of aws-cli).

@spinnakerbot
Copy link
Contributor

The following commits need their title changed:

  • a13f244: Fix AWS CLI v2 for Alpine Linux

Please format your commit title into the form:

<type>(<scope>): <subject>, e.g. fix(kubernetes): address NPE in status check

This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here.

Install a version using musl instead of glibc
@jervi jervi changed the title Fix AWS CLI v2 for Alpine Linux fix(aws): Fix AWS CLI v2 for Alpine Linux Aug 26, 2024
@dbyron-sf
Copy link
Contributor

@jervi would you mind updating the commit message + PR description a bit? Moving from 3.8-alpine3.16 to 3.8-alpine3.20 seems at least worth mentioning. Could you also explain what bug this fixes, and why?

@jervi
Copy link
Contributor Author

jervi commented Aug 27, 2024

Could you also explain what bug this fixes, and why?

I've updated the PR description

@dbyron-sf
Copy link
Contributor

Thank you!

@dbyron-sf dbyron-sf added the ready to merge Approved and ready for a merge label Aug 27, 2024
@mergify mergify bot added the auto merged Merged automatically by a bot label Aug 27, 2024
@mergify mergify bot merged commit 0226100 into spinnaker:master Aug 27, 2024
23 checks passed
@dbyron-sf
Copy link
Contributor

PS This fixes #6156.

@dbyron-sf
Copy link
Contributor

dbyron-sf commented Aug 27, 2024

It's a little bold backporting this when it bumps alpine from 3.16 to 3.20, but since the aws cli is busted in alpine docker images in 1.35, I'ma do it.

@dbyron-sf
Copy link
Contributor

@Mergifyio backport release-1.35.x

Copy link
Contributor

mergify bot commented Aug 27, 2024

backport release-1.35.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Aug 27, 2024
* fix(aws): Fix AWS CLI v2 for Alpine Linux

Install a version using musl instead of glibc

* Fix for legacy key/value format

(cherry picked from commit 0226100)
mergify bot added a commit that referenced this pull request Aug 27, 2024
* fix(aws): Fix AWS CLI v2 for Alpine Linux

Install a version using musl instead of glibc

* Fix for legacy key/value format

(cherry picked from commit 0226100)

Co-authored-by: Jørgen Jervidalo <[email protected]>
@dbyron-sf
Copy link
Contributor

Included in Spinnaker 1.35.4.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Approved and ready for a merge target-release/1.36
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants