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

Automatically fallback to darwin/amd64 for Terraform versions before 1.0.2 #409

Merged
merged 3 commits into from
Apr 23, 2024

Conversation

bflad
Copy link
Member

@bflad bflad commented Apr 22, 2024

Reference: https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/

GitHub hosted runners for macos-latest are automatically being upgraded to macOS 14 and arm64 architecture machines. Any workflows that are using the upgraded runner can return an error such as:

Error: Terraform version 0.12.* not available for darwin and arm64

This adds special case logic to automatically fallback to darwin/amd64 when darwin/arm64 is detected and the version is below 1.0.2, which is the first version that had darwin/arm64 release assets. macOS should emulate and run the amd64 binaries until Apple or GitHub removes the emulation support.

…1.0.2

Reference: https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/

GitHub hosted runners for `macos-latest` are automatically being upgraded to macOS 14 and arm64 architecture machines. Any workflows that are using the upgraded runner can return an error such as:

```
Error: Terraform version 0.12.* not available for darwin and arm64
```

This adds special case logic to automatically fallback to darwin/amd64 when darwin/arm64 is detected and the version is below 1.0.2, which is the first version that had darwin/arm64 release assets. macOS should emulate and run the amd64 binaries until Apple or GitHub removes the emulation support.
@bflad bflad added the enhancement New feature or request label Apr 22, 2024
@bflad bflad added this to the v3.1.0 milestone Apr 22, 2024
@bflad bflad requested a review from a team as a code owner April 22, 2024 21:09
Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

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

LGTM, I'm not sure we need to add an extra test case here, I believe these ones should be failing currently?

@bflad
Copy link
Member Author

bflad commented Apr 22, 2024

They do! For example: #404 / https://github.com/hashicorp/setup-terraform/actions/runs/8790489292/job/24122612523

@bflad bflad merged commit 22013f7 into main Apr 23, 2024
66 checks passed
@bflad bflad deleted the bflad/darwin-amd64-before-102 branch April 23, 2024 14:01
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants