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 acceptance tests post-merge with large cached state #1282

Merged
merged 51 commits into from
Nov 12, 2020
Merged

Conversation

dconnolly
Copy link
Contributor

@dconnolly dconnolly commented Nov 12, 2020

Motivation

We want to run integration tests that test codepaths particular to post-Sapling activation, which often requires a big cache of state (GBs or so).

Solution

This post-merge pipeline (because of GH Actions secret issues) builds a container image full of the test binaries, spins up a gcloud VM with a new disk mounted at /zebrad-cache inside the test container containing Zebra state synced on mainnet to approximately 1M+ blockheight, and then runs the acceptance tests. If the tests are configured to look in that directory for state, it will be used to 'resume' sync. All test output is streamed to the GH Actions UI for the 'CD' workflow. The VM and the disks are then deleted after the tests are run.

The code in this pull request has:

  • Documentation Comments
    Unit Tests and Property Tests

Review

This will be used by #1229

Related Issues

#745

Follow Up Work

This is using one Dockerfile to do the build we've been doing for a while then copy the test binaries into one image and zebrad binary into another, and then use those in two different parallel 'deploy' jobs. This part alone may be taking more time than we really need for an image that we only 'deploy' for testing, I've learned a lot more about our options and pro/cons about using this infra, I may come back to this and see if literally checking out the code on a large VM, building the tests, running the tests against the drives, and then throwing everything away, saves time at several places.

@dconnolly dconnolly added A-infrastructure Area: Infrastructure changes A-devops Area: Pipelines, CI/CD and Dockerfiles labels Nov 12, 2020
@dconnolly dconnolly added this to the First Alpha Release milestone Nov 12, 2020
@dconnolly dconnolly self-assigned this Nov 12, 2020
@dconnolly dconnolly requested a review from a team November 12, 2020 02:25
@dconnolly dconnolly merged commit 8b5b1b4 into main Nov 12, 2020
@dconnolly dconnolly deleted the cloudbuild branch November 12, 2020 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles A-infrastructure Area: Infrastructure changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant