Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

feature: e2e regression testing tool #119

Merged
merged 46 commits into from
Apr 29, 2024
Merged

Conversation

rebelArtists
Copy link
Contributor

@rebelArtists rebelArtists commented Apr 10, 2024

purpose:

  • enable just-in-time (JIT) container builds for any agglayer commit id (simple git actions workflow)
  • fully automatic CDK devnet provisioning via kurtosis + k8s + docker (<15min to fully provision and test integrity of chain with proposed changes)

tests:

all cdk containers deployed and running via local github action runner (minimize cloud bill as deployment entirely ephemeral)
image

query verifiedBatchNumber as e2e proof network is functioning as expected:
image

visualize regression results directly within PR:
image

we hope this provides your team with a strong foundational check that nothing is fundamentally broken for CDK processing e2e

@rebelArtists rebelArtists requested a review from a team as a code owner April 10, 2024 05:18
Copy link

@leovct leovct left a comment

Choose a reason for hiding this comment

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

lgtm!! very nice @rebelArtists! 🔥

.github/workflows/regression-tests.yml Outdated Show resolved Hide resolved
.github/workflows/regression-tests.yml Outdated Show resolved Hide resolved
.github/workflows/regression-test-auto.yml Outdated Show resolved Hide resolved
.github/workflows/regression-test-auto.yml Outdated Show resolved Hide resolved
.github/workflows/regression-test-auto.yml Outdated Show resolved Hide resolved
.github/workflows/regression-test-manual-trigger.yml Outdated Show resolved Hide resolved
.github/workflows/regression-test-manual-trigger.yml Outdated Show resolved Hide resolved
.github/workflows/regression-test-manual-trigger.yml Outdated Show resolved Hide resolved
.github/workflows/regression-test-manual-trigger.yml Outdated Show resolved Hide resolved
uses: docker/setup-buildx-action@v1
- name: Clone and build agglayer image locally
run: |
git clone https://github.com/0xPolygon/agglayer.git
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really needed if the current repo is already agglayer?

Copy link

@leovct leovct Apr 24, 2024

Choose a reason for hiding this comment

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

Is this really needed if the current repo is already agglayer?

good call! and I think we should build the Docker image using Dockerfile.release.

https://github.com/0xPolygon/kurtosis-cdk/blob/main/.github/workflows/regression-tests.yml#L52-L56

Screenshot 2024-04-24 at 10 43 22

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, good call

Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

Really neat 🎩, I find this super lightweight, I think is worth having this here, test e2e in the repo itself.

run: |
git clone https://github.com/0xPolygon/kurtosis-cdk.git
cd kurtosis-cdk
git checkout dan/jit_containers
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we going to merge this?

Copy link

Choose a reason for hiding this comment

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

Yup it's not needed anymore. We would just need to install yq and replace the zkevm_agglayer_image value by the name of the docker image (e.g. agglayer:local).

For reference: https://github.com/0xPolygon/kurtosis-cdk/blob/main/.github/workflows/regression-tests.yml#L102-L115

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed!

- name: Deploy CDK devnet on local github runner
run: |
cd kurtosis-cdk
kurtosis run --enclave cdk-v1 --args-file params.yml .
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use a local params file instead of relying on the version matrix in the kurtosis repo?

Copy link

@leovct leovct Apr 24, 2024

Choose a reason for hiding this comment

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

This file defines the configuration of the entire CDK stack, not just the agglayer. In the context of e2e tests, I think it's interesting to use the kurtosis-cdk configuration file. It allows you to test the agglayer in contact with the latest versions of the other components (because we maintain the tool and we're iterating fast at the moment) and, what's more, you have one less file to maintain. But up to you :)

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@rebelArtists rebelArtists merged commit 29b09df into main Apr 29, 2024
7 checks passed
@rebelArtists rebelArtists deleted the dan/regression_detector branch April 29, 2024 14:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants