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

RFC: Remove BUILDPLATFORM #1350

Merged
merged 6 commits into from
Mar 18, 2024
Merged

RFC: Remove BUILDPLATFORM #1350

merged 6 commits into from
Mar 18, 2024

Conversation

72636c
Copy link
Member

@72636c 72636c commented Dec 18, 2023

I'm pretty split on this one. It should be largely inconsequential for the general case where an engineer is running Apple Silicon locally and building for a Graviton environment, but it has some implications when these platforms are not aligned.

https://docs.docker.com/build/guide/multi-platform/#platform-build-arguments

https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/


This is my understanding:

Preferring BUILDPLATFORM:

  • Quicker to build when local platform differs from deployment target
  • Local behaviour is more likely differ from CI
  • Locally built image may not be deployable during disaster recovery

Preferring to hardcode amd64 or arm64:

  • Slower to build when local platform differs from deployment target
  • Local behaviour is less likely to differ from CI
  • Locally built image should be deployable during disaster recovery
  • More explicit in the Dockerfile

Preferring no --platform / TARGETPLATFORM:

  • Slower to build when local platform differs from deployment target
  • Local behaviour is less likely to differ from CI
  • Locally built image should be deployable during disaster recovery
  • Somewhat implicit and depends on tooling support for the --platform build option

I'm pretty split on this one. It should be largely inconsequential for
the general case where an engineer is running Apple Silicon locally and
building for a Graviton environment, but it has some implications when
these platforms are not aligned.

Preferring `BUILDPLATFORM`:

- Quicker to build when local platform differs from deployment target
- Local behaviour is more likely differ from CI
- Locally built image may not be deployable during disaster recovery

Preferring to hardcode `amd64` or `arm64`:

- Slower to build when local platform differs from deployment target
- Local behaviour is less likely to differ from CI
- Locally built image should be deployable during disaster recovery
@72636c 72636c requested review from a team as code owners December 18, 2023 05:14
Copy link

changeset-bot bot commented Dec 18, 2023

🦋 Changeset detected

Latest commit: b3d5821

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
skuba Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@72636c
Copy link
Member Author

72636c commented Mar 17, 2024

Came back around to this and landed on the same conclusion, so I'll get this merged once I write up a changeset, then look at improving guidance in https://seek-oss.github.io/skuba/docs/deep-dives/arm64.html for existing x86 projects.

@72636c 72636c enabled auto-merge (squash) March 18, 2024 05:51
@72636c 72636c merged commit f137372 into master Mar 18, 2024
18 checks passed
@72636c 72636c deleted the buildplatform branch March 18, 2024 05:52
@seek-oss-ci seek-oss-ci mentioned this pull request Mar 18, 2024
72636c added a commit that referenced this pull request Mar 18, 2024
@72636c 72636c mentioned this pull request Mar 18, 2024
72636c added a commit that referenced this pull request Mar 18, 2024
* RFC: Refresh ARM64 guide

Follows on from #1350.

* Do not imply vCurrent is ARM-exclusive

Co-authored-by: Aaron Moat <amoat@seek.com.au>

* Add a changeset

---------

Co-authored-by: Aaron Moat <amoat@seek.com.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants