Agoric / agoric-3-proposals

Proposals run or planned for Mainnet (agoric-3)
Apache License 2.0
0 stars 2 forks source link

make multi-arch opt-in #123

Open turadg opened 7 months ago

turadg commented 7 months ago

Problem to be solved

The default build steps don't work locally.

When adding multiarch building, we adopted Depot remote builder. Because not everyone would be familiar with or have the tool installed, I made it not required. Instead it gives an error message about learning to use Depot:

❯ yarn build

ERROR: docker exporter does not currently support exporting manifest lists

Multiple platforms are configured but Docker does not support multiplatform in one builder.
Until https://github.com/docker/roadmap/issues/371, attempting it will error as above.

Instead use a builder that supports multiplatform such as depot.dev.

But if someone wants to make a single arch build, that's a lot of extra effort.

Design

Make single platform the default and make multiarch opt-in. Make CI opt in.

anilhelvaci commented 5 months ago

What's the current situation in this? Any progress? How are we expected to build locally? cc @turadg @toliaqat

turadg commented 5 months ago

This hasn't been worked on so the current situation is as described.

So far nobody outside Agoric OpCo has needed to build a3p images. What's your need? That could lead to getting this prioritized.

anilhelvaci commented 5 months ago

This hasn't been worked on so the current situation is as described.

Thanks for the clarification.

What's your need? That could lead to getting this prioritized.

We wanted to know our proposal will work with other proposals and we will not break CI when we make our PR. Looking into the cli.ts and docker-bake.hcl again, I believe yarn test might suffice for this.

turadg commented 5 months ago

Righto. If you omit platforms from your proposal's package.json it won't try to to multi-arch.

https://github.com/Agoric/agoric-3-proposals/blob/7646a5ca77c60d3934d3597e23a27dd51a056ca7/packages/synthetic-chain/src/cli/build.ts#L7-L16

anilhelvaci commented 5 months ago

Thanks! 🙏