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

e2e: tidy up docker-compose file #81

Merged
merged 2 commits into from
Apr 22, 2024
Merged

Conversation

joshuasing
Copy link
Contributor

Summary
Tidy up e2e/docker-compose.yml file to help with consistency, readability and mainability.

Changes

  • Use double quotes in docker-compose.yml to help with consistency
  • Reorder some blocks to help with readability and maintainability
  • Pin all images to their SHA256 digests
  • Add healthcheck to op-geth-l2 so that op-node/op-proposer only start after op-geth-l2 has generated /l2configs/rollup.json
  • Remove e2e/deployments and remove the volume from op-geth-l2

@joshuasing joshuasing added the area: docker This is a change to a Dockerfile label Apr 16, 2024
@joshuasing joshuasing marked this pull request as draft April 16, 2024 18:49
@joshuasing joshuasing force-pushed the joshua/e2e/docker-compose branch from c7d08e3 to bc0c9b9 Compare April 16, 2024 18:51
@joshuasing joshuasing marked this pull request as ready for review April 17, 2024 11:50
Copy link
Contributor

@jcvernaleo jcvernaleo left a comment

Choose a reason for hiding this comment

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

OK

Copy link
Contributor

@ClaytonNorthey92 ClaytonNorthey92 left a comment

Choose a reason for hiding this comment

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

hey @joshuasing this looks good at first glance, give me some time to test; I am caught up with a few other things at the moment.

 * Use double quotes in docker-compose.yml to help with consistency

 * Reorder some blocks to help with readability and maintainability

 * Pin all images to their SHA256 digests

 * Add healthcheck to op-geth-l2 so that op-node/op-proposer only
   start after op-geth-l2 has generated /l2configs/rollup.json

 * Remove `e2e/deployments` and remove the volume from op-geth-l2
@joshuasing joshuasing force-pushed the joshua/e2e/docker-compose branch from bc0c9b9 to b352bd4 Compare April 18, 2024 12:39
Copy link
Contributor

@ClaytonNorthey92 ClaytonNorthey92 left a comment

Choose a reason for hiding this comment

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

hey @joshuasing , I did some testing to see if we could remove the deployments directory. I did the following:

docker compose -f ./e2e/docker-compose.yml build --no-cache op-geth-l2

that builds the l2 image without using the cache, this guarantees we don't accidentally have deployments cached in an image layer.

then I ran the stack as usual:

docker compose -f ./e2e/docker-compose.yml down -v --remove-orphans
docker compose -f ./e2e/docker-compose.yml  up

and I received the following error:

op-geth-l2-1  | t=2024-04-18T12:41:25+0000 lvl=info msg="Deploy config" path=/git/optimism/packages/contracts-bedrock/deploy-config/devnetL1.json
op-geth-l2-1  | t=2024-04-18T12:41:25+0000 lvl=info msg="Deployment directory" path=/git/optimism/packages/contracts-bedrock/deployments/devnetL1
op-geth-l2-1  | t=2024-04-18T12:41:25+0000 lvl=crit msg="Application failed"   message="cannot find L1StandardBridgeProxy artifact: cannot find deployment: L1StandardBridgeProxy"
op-geth-l2-1 exited with code 1

I believe this was working for you because you had deployments cached in a layer in your l2 image 🤔

I vote we keep deployments in, but we use the COPY directive instead of mounting them as a volume, this way if they change they don't change in the repo

what do you think?

edit: I am realizing that they were mounted as a volume, so I don't think they would be cached in a layer. however it looks like we need them regardless, based on the error message

Copy link
Contributor

@ClaytonNorthey92 ClaytonNorthey92 left a comment

Choose a reason for hiding this comment

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

hey @joshuasing this looks good, thanks for doing this 👍

tested the following, and passing ✅

  • receiving pop payouts for each keystone
  • transactions rolled up to l1 with the correct to address
  • deployments files not modified

@joshuasing joshuasing merged commit eb66345 into main Apr 22, 2024
1 check passed
@joshuasing joshuasing deleted the joshua/e2e/docker-compose branch April 22, 2024 16:10
web3cryptoguy pushed a commit to web3cryptoguy/heminetwork that referenced this pull request Nov 1, 2024
* Use double quotes in docker-compose.yml to help with consistency

* Reorder some blocks to help with readability and maintainability

* Pin all images to their SHA256 digests

* Add healthcheck to op-geth-l2 so that op-node/op-proposer only
  start after op-geth-l2 has generated /l2configs/rollup.json

* Use COPY for `e2e/deployments` in optimism-stack Dockerfile, to
  prevent them from being changed on the file system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docker This is a change to a Dockerfile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants