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

chore(ci): towards ci3 #10751

Merged
merged 790 commits into from
Dec 17, 2024
Merged

chore(ci): towards ci3 #10751

merged 790 commits into from
Dec 17, 2024

Conversation

ludamad
Copy link
Collaborator

@ludamad ludamad commented Dec 15, 2024

CI3 is a conceptual goal for uniting the CI flow and the dev flow as much as possible, adding more depth to the bootstrap and build scripts to be able to handle our needs.

This PR introduces all the work on CI3 so far, but still has an earthly caller shell to make sure we can minimize the number of variables that have changed at once.

There is a lot of changes in this PR.
See https://github.com/AztecProtocol/aztec-packages/pull/10711/files for a subset of the changes without yarn.lock etc noise.

The big picture:

  • The CI build has been made much less stateful. ci.yml now uses the ci3 bootstrap pattern, without fully moving off the earthly targets just yet.
  • The S3 cache mechanism is now the main cache mechanism. Note there is no persistent disk now supporting the build.
    There is a global cache on S3, readable without auth, that caches them for 10 days. We no longer think of the build in terms of docker/buildkit layers but instead as chunks that have different rebuild patterns that match files in the monorepo.
  • Moving to yarn 4.5.2.

Niceties:

  • faster builds due to script improvements and distributed cache uploading by default
  • work is more properly isolated in chunks from the above effort
  • spot recovery is implemented, retrying with on-demand
  • we no longer use github runners, side-stepping lots of edge-cases, and instead rely on our builder realizing there is no work to do / hitting a timeout via shutdown -P
  • Docker images are no longer copied from the builder, meaning a large class of flake is gone.

Non-niceties:

  • The earthly setup is much less granular. There is two stages that have their own one-layer builds. The earthly cache is fairly redundant, using the S3 cache for most meaningful caching. (earthly will not be used in ci.yml in the future)
  • Some CI files are now duplicated, we will do a follow-on pass to get rid of earthly helpers, build-system, etc
  • CI currently also downloads the CI image fresh each time, will change
  • we are currently pushing images to dockerhub with no expiration, should move to ECR
  • noir-projects currently retries once in the Earthfile as a last minute issue was hit, will be fixed in a follow-up
  • Issues: ci3 #10775

WORKFLOW AFTER THIS PR:

  • Run ./bootstrap.sh in root to bootstrap with cache, ./bootstrap.sh full otherwise
  • Run earthly +ci in root to
  • Put ci3 in your cache and note the ways to interact with ci in that folder
  • Note the new commands in ./bootstrap.sh like test-kind-network
  • In yarn-project to run a single e2e test now use test:e2e. test just runs the unit tests as per other projects.

@@ -84,13 +84,8 @@ else
echo "Adding validator $ADDRESS..."
for i in {1..3}; do
node --no-warnings "$REPO"/yarn-project/aztec/dest/bin/index.js add-l1-validator --validator $ADDRESS --rollup $ROLLUP_CONTRACT_ADDRESS && break
sleep 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This seemed to be a necessary fix

@@ -3,7 +3,6 @@ tests:
bench_prover:
env:
HARDWARE_CONCURRENCY: '32'
COMPOSE_FILE: 'scripts/docker-compose-no-sandbox.yml'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This wasn't working, but it works fine anyway

@charlielye charlielye merged commit dee6ba3 into cl/ci3 Dec 17, 2024
7 of 8 checks passed
@charlielye charlielye deleted the ad/ci2.5+blobs branch December 17, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bench-all CI: Enables this CI job. e2e-all CI: Enables this CI job. network-all Run this CI job.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants