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

Run post-deployment test using deployed artifacts #1372

Merged
merged 35 commits into from
Aug 7, 2023

Conversation

PhilWindle
Copy link
Collaborator

@PhilWindle PhilWindle commented Aug 2, 2023

Description

This PR introduces a new canary app that executes the uniswap e2e test but only using deployed artifacts. The test runs as a final step after deploying a tagged release.

Checklist:

  • I have reviewed my diff in github, line by line.
  • Every change is related to the PR description.
  • I have linked this pull request to the issue(s) that it resolves.
  • There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • The branch has been merged or rebased against the head of its merge target.
  • I'm happy for the PR to be merged at the reviewer's next convenience.

@PhilWindle PhilWindle changed the title Pw/ci deployed artifacts Run post-deployment test using deployed artifacts Aug 3, 2023
@PhilWindle PhilWindle marked this pull request as ready for review August 4, 2023 09:11
Copy link
Collaborator

@spalladino spalladino left a comment

Choose a reason for hiding this comment

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

LGTM except for the tsbuildinfo file. I'd also add a check to make sure the canary is getting built with the npm version that was just published: I'm not sure if npm is eventually consistent, and if you try downloading latest immediately after publishing version N+1 there's a chance you end up getting version N.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this file be ignored?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably

@@ -13,8 +13,7 @@ services:
- '8545:8545'

sandbox:
image: $ECR_URL/aztec-sandbox:cache-$COMMIT_HASH
#image: aztecprotocol/aztec-sandbox
image: aztecprotocol/aztec-sandbox:latest
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this change? Shouldn't we be testing an e2e with the sandbox version that corresponds to the current commit, so we ensure that any changes to sandbox are correct before we publish it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, it's because we're tagging the current commit hash locally as latest in run_tests now, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Correct

Comment on lines +1009 to +1029
build-canary:
machine:
image: ubuntu-2004:202010-01
resource_class: large
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: build canary true

run-canary:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: spot_run_tests canary uniswap_trade_on_l1_from_l2.test.ts docker-compose.yml
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these happening on every build? Or should we set them up to run only on tagged releases?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They only run on tagged releases. The spec for that is further down the file.

@@ -0,0 +1,10 @@
set -e

VERSION=$(npx semver $1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we validate this is a valid VERSION, as we do here?

# We are publishing a tagged commit. Check it's a valid semver.
VERSION=$(npx semver $COMMIT_TAG)
if [ -z "$VERSION" ]; then
echo "$COMMIT_TAG is not a semantic version."
exit 1
fi

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@PhilWindle PhilWindle merged commit 3acb569 into master Aug 7, 2023
@PhilWindle PhilWindle deleted the pw/ci-deployed-artifacts branch August 7, 2023 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants