Skip to content

Commit

Permalink
fixup: Add additional jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
marun committed Jul 15, 2024
1 parent be80b53 commit 7c79f74
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 4 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/check-bootstrap-mainnet-full-sync.yml
Original file line number Diff line number Diff line change
@@ -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 || '' }}
23 changes: 23 additions & 0 deletions .github/workflows/check-bootstrap-mainnet-state-sync.yml
Original file line number Diff line number Diff line change
@@ -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 || '' }}
26 changes: 26 additions & 0 deletions .github/workflows/check-bootstrap-testnet-full-sync.yml
Original file line number Diff line number Diff line change
@@ -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 || '' }}
3 changes: 0 additions & 3 deletions .github/workflows/check-bootstrap-testnet-state-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion tests/bootstrap/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,16 @@ 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)
defer cancel()
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
}

0 comments on commit 7c79f74

Please sign in to comment.