mina icon indicating copy to clipboard operation
mina copied to clipboard

Harfork Pipeline optimization

Open dkijania opened this issue 3 months ago • 4 comments

Issue contains proposals to optimize hardfork package generation pipeline. Example pipeline:

https://buildkite.com/o-1-labs-2/hardfork-package-generation-new/builds/117#019a59ae-2848-452d-bb03-44d2b2c5593b

Currently pipeline is taking ~50 minutes:

  • 15 minutes for building apps and debian
  • 7 minutes to build docker (docker builds are conduct in parallel, however the longest one - rosetta, takes 7 minutes)
  • 32m - package verifications.

There are many areas of improvement. Separate issue is created for package verification (#18153 ) as this is most complex job. Here we are proposing changes to rest of the building jobs:

Building apps and debians:

  1. Ledger generation takes 4 m
  2. setting up buildx emulated docker - 2 m
  3. Copying/LIsting aws files - 3 minutes
  4. Building apps - 2 mins
  5. Building debians 4 min

We can save couple mins not building apps but using already built and cached in hetzner. Then we will only inject hf config. Also upload to aws can be done in parallel. Finally after we will use arm64 native host for building arm64 docker we can skip setup for buildx emulator

Buidling dockers

Here we can explore changing order of some layers so the one that is changing constantly (downloading and installing debians) can be moved at the end of dockerfile. As a result all previous layers will be untouched, which makes them perfect candidate for cache

dkijania avatar Nov 23 '25 22:11 dkijania

Why do we need these?

  1. setting up buildx emulated docker - 2 m
  2. Copying/LIsting aws files - 3 minutes

could we skip them?

I think we don't care about arm64 support being released fast right?

glyh avatar Nov 25 '25 04:11 glyh

  1. we are setting buildx emulated docker to every agent to simplify setup. Now it will be removed since we are using arm64 native machine
  2. We need to upload ledgers to aws

dkijania avatar Dec 07 '25 20:12 dkijania

I mean, we could upload to AWS after packaging is done, or as a parallel task? It doesn't seems to be blocking stuff behind.

glyh avatar Dec 08 '25 03:12 glyh

Yes. That's exactly what I'm trying to implement. Upload those file in non blocking job while Debian's/dockers are building

dkijania avatar Dec 08 '25 06:12 dkijania