anton-rs / op-up

Composable OP Stack Orchestration
https://stack.anton.systems
MIT License
41 stars 2 forks source link

fix(stages): Cloning Abstractions #45

Closed refcell closed 11 months ago

refcell commented 11 months ago

Description

Inside the stages crate, there is a stage/cannon.rs stage for the cannon prestate generation, a stage/allocs.rs Allocs stage for devnet allocs, and a cloning stage to clone the optimism monorepo.

This is a naive, sequential pipeline that starts with the cloning of the monorepo and then proceeds with generating the prestate and allocs.

This ticket is to make the monorepo cloning configurable through the stack.toml, such that under a [stages] table, a user can define something like isolate=true to force each stage to use isolate environments. In an optimism-monorepo exclusive stack, this would force each stage to clone the monorepo and execute it's behavior.

For non-isolated stages, the prestate stage would come first and check that the optimism monorepo is cloned, cloning it if not and leaving it available for all subsequent stages.

refcell commented 11 months ago

See: https://github.com/anton-rs/op-up/pull/43#discussion_r1355765632

merklefruit commented 11 months ago

A couple extra thoughts:

There are a couple solutions:

merklefruit commented 11 months ago

so I did a test on the tarball method, here's the results:

wifi connection: not good not bad, 300mbps down

I didn't expect such a huge difference, I think this is an easy win if we need to have the monorepo locally.

Wdyt @refcell?

refcell commented 11 months ago

so I did a test on the tarball method, here's the results:

wifi connection: not good not bad, 300mbps down

  • git clone took 23s

  • curl tarball took less than 3s

I didn't expect such a huge difference, I think this is an easy win if we need to have the monorepo locally.

Wdyt @refcell?

This is awesome! Would probably make sense to have tarball fetching be the default, and then allow for recursive git cloning via a configurable just in case.

merklefruit commented 11 months ago

Sounds perfect