temporalio / docker-builds

Temporal service Docker images build
https://hub.docker.com/r/temporaliotest/auto-setup
MIT License
30 stars 59 forks source link

Use go's native cross-compilation for binaries #190

Closed tdeebswihart closed 7 months ago

tdeebswihart commented 7 months ago

What was changed

  1. Cross-compilation is done outside of the docker container, and images are copying in pre-built binaries
  2. All external dependencies are vendored using submodules instead of cloning (dockerize) or curling (cli)

Why?

Building this container now takes ~1m locally instead of over an hour on my aarch64 laptop.

Checklist

I tested this locally by running make build test

tdeebswihart commented 7 months ago

General questions:

* We were previously using released versions of cli. Now we're using a submodule. Are we planning to point it only to release tags? How do we manage that?

* Should we ensure that the server embedded in the cli is the same as the server in this image? If we do want to do that, how? go mod replace?

* Should we skip right to the new pre-release cli instead of the old-new one?
  1. No plan so far, but the old method of installation is being deprecated (I asked the SDK team on Friday) so will no longer work going forwards.
  2. Longer-term yes, and probably. I'd like to take that on in a separate PR however as it's not as vital as fixing our builds
  3. I'd be happy to, but we need to discuss with our SDK folks about what the differences are since that may change the UX of our admintools pod
dnr commented 7 months ago
  1. No plan so far, but the old method of installation is being deprecated (I asked the SDK team on Friday) so will no longer work going forwards.

We can still attempt to point to only official releases.

  1. I'd be happy to, but we need to discuss with our SDK folks about what the differences are since that may change the UX of our admintools pod

The old-new cli never had an official non-preview release so this shouldn't be a breaking change. Only tctl was officially supported.

tdeebswihart commented 7 months ago
  1. No plan so far, but the old method of installation is being deprecated (I asked the SDK team on Friday) so will no longer work going forwards.

We can still attempt to point to only official releases.

  1. I'd be happy to, but we need to discuss with our SDK folks about what the differences are since that may change the UX of our admintools pod

The old-new cli never had an official non-preview release so this shouldn't be a breaking change. Only tctl was officially supported.

We should only point to official releases, I agree. And I'll file a ticket to swap to the pre-release new CLI as follow-up work