qa-tests: add the RPC tests to the Sync-from-scratch test#20484
qa-tests: add the RPC tests to the Sync-from-scratch test#20484mriccobene merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Extends the “sync from scratch” QA workflow to run the RPC integration test suite on the freshly-synced archive datadir, reducing reliance on pre-built databases and improving end-to-end coverage of DB-building code paths.
Changes:
- Add a
--skip-backupoption to the local RPC test runner script to allow running against disposable/ephemeral datadirs without chaindata backup/restore. - Update the sync-from-scratch workflow to build
rpcdaemon+integrationbinaries and run RPC integration tests post-sync for supported chains (mainnet, gnosis). - Add caching and artifact upload for RPC test results in the sync-from-scratch workflow.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/scripts/run_rpc_tests_local.sh |
Adds --skip-backup flag to optionally skip chaindata backup/restore during RPC test runs. |
.github/workflows/qa-sync-from-scratch.yml |
Runs RPC integration tests after a successful sync-from-scratch (mainnet/gnosis only), including cache restore and artifact upload. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if ! $SKIP_BACKUP; then | ||
| echo "Backing up chaindata..." | ||
| cp -r "$DATADIR/chaindata" "$BACKUP_DIR/chaindata" | ||
| BACKUP_NEEDED=true | ||
| fi |
There was a problem hiding this comment.
When --skip-backup is enabled, the script still initializes BACKUP_DIR and (if --backup-dir is provided) unconditionally rm -rf’s that directory before later skipping the actual backup. This makes --skip-backup --backup-dir <path> unexpectedly destructive. Consider short-circuiting backup-dir creation/cleanup when --skip-backup is set (and ignoring --backup-dir in that mode), or at minimum skipping the rm -rf path when backups are disabled.
Since the 'sync from scratch' test creates an archive node, we can run the RPC test suite afterwards.
This approach has two benefits:
Firstly, we will not be reliant on a pre-built database, thus avoiding the fragilities inherent in this scenario.
Secondly, we will be testing a database that is entirely the product of the code under test. Please note that when a pre-built database is used for RPC testing, only the code that responds to requests is tested, not the code that builds the database.