From 11dcc13b84e4965b3ff3b377fddaa4296050d7e5 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 1 Jul 2022 01:14:30 +1000 Subject: [PATCH] fix(ci): make full sync go all the way to the tip (#4709) * Checkout zebra in each job to avoid warnings But put TODOs where we might be able to skip checkouts * Split log following into sprout checkpoints, sapling/orchard checkpoints, and full validation * Make job IDs shorter * Use /dev/stderr because docker doesn't have a tty * remove pipefail * Revert "remove pipefail" This reverts commit a7ee37bebdc107a4215e7dd307b189d925969234. * Make tee ignore errors writing to a grep pipe * Avoid launching multiple docker instances for duplicate jobs * Ignore broken pipe error messages and statuses * fix(ci): docker wait not finding container We had this issue before, I can't recall if this was a parsing error between GitHub Actions and gcloud `--command` parsing, but we had to change this into two pieces. This implementation keeps it how we did it before https://github.com/ZcashFoundation/zebra/blob/9b9578c99975952a291006dde8d2828fd3e97799/.github/workflows/test.yml#L235-L243 * docs: remove pending TODO We can't remove `actions/checkout` nor set `create_credentials_file` to `false` as next steps won't be able to authenticate to GCP. We can surely remove `actions/checkout` and leave `create_credentials_file` as `true`, but this will raise a warning on each step, and there's no benefit of doing so. * Show `docker wait` and `gcloud ssh` output * If `docker wait` fails, get the exit code using `docker inspect` * Make full sync tests go all the way to the tip Co-authored-by: Conrado Gouvea Co-authored-by: Gustavo Valverde --- zebrad/tests/acceptance.rs | 6 +++--- zebrad/tests/common/sync.rs | 6 ------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index d8a4509c9..727b5e7d8 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -135,8 +135,8 @@ use common::{ sync::{ create_cached_database_height, sync_until, MempoolBehavior, LARGE_CHECKPOINT_TEST_HEIGHT, LARGE_CHECKPOINT_TIMEOUT, MEDIUM_CHECKPOINT_TEST_HEIGHT, STOP_AT_HEIGHT_REGEX, - STOP_ON_LOAD_TIMEOUT, SYNC_FINISHED_REGEX, SYNC_FINISHED_REGEX_TMP_STOP_EARLY, - TINY_CHECKPOINT_TEST_HEIGHT, TINY_CHECKPOINT_TIMEOUT, + STOP_ON_LOAD_TIMEOUT, SYNC_FINISHED_REGEX, TINY_CHECKPOINT_TEST_HEIGHT, + TINY_CHECKPOINT_TIMEOUT, }, }; @@ -882,7 +882,7 @@ fn full_sync_test(network: Network, timeout_argument_name: &str) -> Result<()> { // Use the checkpoints to sync quickly, then do full validation until the chain tip true, // Finish when we reach the chain tip - SYNC_FINISHED_REGEX_TMP_STOP_EARLY, + SYNC_FINISHED_REGEX, ) } else { eprintln!( diff --git a/zebrad/tests/common/sync.rs b/zebrad/tests/common/sync.rs index 6dda7d840..f0e6fca16 100644 --- a/zebrad/tests/common/sync.rs +++ b/zebrad/tests/common/sync.rs @@ -45,12 +45,6 @@ pub const STOP_AT_HEIGHT_REGEX: &str = "stopping at configured height"; pub const SYNC_FINISHED_REGEX: &str = r"finished initial sync to chain tip, using gossiped blocks .*sync_percent.*=.*100\."; -/// Temporary workaround for slow syncs - stop at 97%. -/// -/// TODO: revert this change (#4456) -pub const SYNC_FINISHED_REGEX_TMP_STOP_EARLY: &str = - r"estimated progress to chain tip .*sync_percent.*=.*97\."; - /// The maximum amount of time Zebra should take to reload after shutting down. /// /// This should only take a second, but sometimes CI VMs or RocksDB can be slow.