diff --git a/.github/workflows/check-bootstrap-mainnet-full-sync.yml b/.github/workflows/check-bootstrap-mainnet-full-sync.yml new file mode 100644 index 000000000000..df92798a006c --- /dev/null +++ b/.github/workflows/check-bootstrap-mainnet-full-sync.yml @@ -0,0 +1,23 @@ +name: 'Check Bootstrap (mainnet,full-sync)' + +on: + # TODO(marun) Add a schedule + workflow_dispatch: + +jobs: + check_bootstrap_mainnet_full_sync: + name: Check Bootstrap (mainnet,full-sync) + runs-on: avalanche-avalanchego + timeout-minutes: 4320 # 3 days + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Check bootstrap (mainnet,full-sync) + uses: ./.github/actions/check-bootstrap + with: + network_id: 1 # mainnet + state_sync_enabled: false + prometheus_id: ${{ secrets.PROMETHEUS_ID || '' }} + prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }} + loki_id: ${{ secrets.LOKI_ID || '' }} + loki_password: ${{ secrets.LOKI_PASSWORD || '' }} diff --git a/.github/workflows/check-bootstrap-mainnet-state-sync.yml b/.github/workflows/check-bootstrap-mainnet-state-sync.yml new file mode 100644 index 000000000000..0d0f34e068a1 --- /dev/null +++ b/.github/workflows/check-bootstrap-mainnet-state-sync.yml @@ -0,0 +1,23 @@ +name: 'Check Bootstrap (mainnet,state-sync)' + +on: + # TODO(marun) Add a schedule + workflow_dispatch: + +jobs: + check_bootstrap_mainnet_state_sync: + name: Check Bootstrap (mainnet,state-sync) + runs-on: avalanche-avalanchego + timeout-minutes: 4320 # 3 days + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Check bootstrap (mainnet,state-sync) + uses: ./.github/actions/check-bootstrap + with: + network_id: 1 # mainnet + state_sync_enabled: true + prometheus_id: ${{ secrets.PROMETHEUS_ID || '' }} + prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }} + loki_id: ${{ secrets.LOKI_ID || '' }} + loki_password: ${{ secrets.LOKI_PASSWORD || '' }} diff --git a/.github/workflows/check-bootstrap-testnet-full-sync.yml b/.github/workflows/check-bootstrap-testnet-full-sync.yml new file mode 100644 index 000000000000..f83221c7f073 --- /dev/null +++ b/.github/workflows/check-bootstrap-testnet-full-sync.yml @@ -0,0 +1,26 @@ +name: 'Check Bootstrap (testnet,full-sync)' + +on: + # TODO(marun) Add a schedule + workflow_dispatch: + + # TODO(marun) For testing only - remove before merge + pull_request: + +jobs: + check_bootstrap_testnet_full_sync: + name: Check Bootstrap (testnet,full-sync) + runs-on: avalanche-avalanchego + timeout-minutes: 4320 # 3 days + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Check bootstrap (testnet,full-sync) + uses: ./.github/actions/check-bootstrap + with: + network_id: 5 # testnet + state_sync_enabled: false + prometheus_id: ${{ secrets.PROMETHEUS_ID || '' }} + prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }} + loki_id: ${{ secrets.LOKI_ID || '' }} + loki_password: ${{ secrets.LOKI_PASSWORD || '' }} diff --git a/.github/workflows/check-bootstrap-testnet-state-sync.yml b/.github/workflows/check-bootstrap-testnet-state-sync.yml index 802f64c53629..55c108df9406 100644 --- a/.github/workflows/check-bootstrap-testnet-state-sync.yml +++ b/.github/workflows/check-bootstrap-testnet-state-sync.yml @@ -4,9 +4,6 @@ on: # TODO(marun) Add a schedule workflow_dispatch: - # TODO(marun) For testing only - remove before merge - pull_request: - jobs: check_bootstrap_testnet_state_sync: name: Check Bootstrap (testnet,state-sync) diff --git a/tests/bootstrap/main.go b/tests/bootstrap/main.go index 289a7846b4cd..c6dee4f6c4b4 100644 --- a/tests/bootstrap/main.go +++ b/tests/bootstrap/main.go @@ -94,7 +94,7 @@ func checkBootstrap(avalanchegoPath string, networkID uint32, stateSyncEnabled b log.Print("Waiting for node to indicate bootstrap complete by reporting healthy\n") - // Avoid checking too often to avoid log spam + // Avoid checking too often to prevent log spam healthCheckInterval := 1 * time.Minute ctx, cancel = context.WithTimeout(context.Background(), maxDuration) @@ -102,5 +102,8 @@ func checkBootstrap(avalanchegoPath string, networkID uint32, stateSyncEnabled b if err := tmpnet.WaitForHealthyWithInterval(ctx, node, healthCheckInterval); err != nil { return fmt.Errorf("node failed to become healthy before timeout: %w", err) } + + log.Print("Bootstrap completed successfully!\n") + return nil }