Skip to content

Commit c9b71bc

Browse files
committed
replace existing replay verify with new one
1 parent 16db0cb commit c9b71bc

File tree

3 files changed

+147
-153
lines changed

3 files changed

+147
-153
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# This defines a workflow to replay transactions on the given chain with the latest aptos node software.
2+
# In order to trigger it go to the Actions Tab of the Repo, click "replay-verify" and then "Run Workflow".
3+
#
4+
# On PR, a single test case will run. On workflow_dispatch, you may specify the CHAIN_NAME to verify.
5+
6+
name: "replay-verify"
7+
on:
8+
# Allow triggering manually
9+
workflow_dispatch:
10+
inputs:
11+
GIT_SHA:
12+
required: false
13+
type: string
14+
description: The git SHA1 to test. If not specified, it will use the latest commit on main.
15+
CHAIN_NAME:
16+
required: false
17+
type: choice
18+
options: [testnet, mainnet, all]
19+
default: all
20+
description: The chain name to test. If not specified, it will test both testnet and mainnet.
21+
TESTNET_BUCKET:
22+
required: false
23+
type: string
24+
description: The bucket to use for testnet replay. If not specified, it will use aptos-testnet-backup.
25+
default: aptos-testnet-backup
26+
MAINNET_BUCKET:
27+
required: false
28+
type: string
29+
description: The bucket to use for mainnet replay. If not specified, it will use aptos-mainnet-backup.
30+
default: aptos-mainnet-backup
31+
32+
# cancel redundant builds
33+
concurrency:
34+
# cancel redundant builds on PRs (only on PR, not on branches)
35+
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.sha }}
36+
cancel-in-progress: true
37+
38+
jobs:
39+
determine-test-metadata:
40+
runs-on: ubuntu-latest
41+
steps:
42+
# checkout the repo first, so check-aptos-core can use it and cancel the workflow if necessary
43+
- uses: actions/checkout@v4
44+
- uses: ./.github/actions/check-aptos-core
45+
with:
46+
cancel-workflow: ${{ github.event_name == 'schedule' }} # Cancel the workflow if it is scheduled on a fork
47+
48+
replay-testnet:
49+
if: |
50+
github.event_name == 'schedule' ||
51+
github.event_name == 'push' ||
52+
github.event_name == 'workflow_dispatch' && (inputs.CHAIN_NAME == 'testnet' || inputs.CHAIN_NAME == 'all')
53+
needs: determine-test-metadata
54+
uses: ./.github/workflows/workflow-run-replay-verify.yaml
55+
secrets: inherit
56+
with:
57+
GIT_SHA: ${{ inputs.GIT_SHA }}
58+
# replay-verify config
59+
BUCKET: ${{ inputs.TESTNET_BUCKET || 'aptos-testnet-backup' }}
60+
SUB_DIR: e1
61+
HISTORY_START: 862000000
62+
# to see historical TXNS_TO_SKIP, check out ce6158ac2764ee9d4c8738a85f3bcdc6bd0cadc1
63+
TXNS_TO_SKIP: "0"
64+
# 1195000000-122000000: https://github.com/aptos-labs/aptos-core/pull/13832
65+
RANGES_TO_SKIP: "1195000000-1220000000"
66+
BACKUP_CONFIG_TEMPLATE_PATH: terraform/helm/fullnode/files/backup/gcs.yaml
67+
# workflow config
68+
RUNS_ON: "high-perf-docker-with-local-ssd"
69+
TIMEOUT_MINUTES: 180
70+
MAX_VERSIONS_PER_RANGE: 2000000
71+
72+
replay-mainnet:
73+
if: |
74+
github.event_name == 'schedule' ||
75+
github.event_name == 'push' ||
76+
github.event_name == 'workflow_dispatch' && (inputs.CHAIN_NAME == 'mainnet' || inputs.CHAIN_NAME == 'all' )
77+
needs: determine-test-metadata
78+
uses: ./.github/workflows/workflow-run-replay-verify.yaml
79+
secrets: inherit
80+
with:
81+
GIT_SHA: ${{ inputs.GIT_SHA }}
82+
# replay-verify config
83+
BUCKET: ${{ inputs.MAINNET_BUCKET || 'aptos-mainnet-backup' }}
84+
SUB_DIR: e1
85+
HISTORY_START: 518000000
86+
#TXNS_TO_SKIP: 12253479 12277499 148358668
87+
TXNS_TO_SKIP: "0"
88+
# 1197378568-1198492648: https://github.com/aptos-labs/aptos-core/pull/13832
89+
RANGES_TO_SKIP: "1197378568-1198492648"
90+
BACKUP_CONFIG_TEMPLATE_PATH: terraform/helm/fullnode/files/backup/gcs.yaml
91+
# workflow config
92+
RUNS_ON: "high-perf-docker-with-local-ssd"
93+
TIMEOUT_MINUTES: 180
94+
MAX_VERSIONS_PER_RANGE: 800000
95+
96+
test-replay:
97+
if: ${{ (github.event_name == 'pull_request') && contains(github.event.pull_request.labels.*.name, 'CICD:test-replay')}}
98+
needs: determine-test-metadata
99+
uses: ./.github/workflows/workflow-run-replay-verify.yaml
100+
secrets: inherit
101+
with:
102+
GIT_SHA: ${{ github.event.pull_request.head.sha }}
103+
# replay-verify config
104+
BUCKET: ${{ inputs.TESTNET_BUCKET || 'aptos-testnet-backup' }}
105+
SUB_DIR: e1
106+
HISTORY_START: 862000000
107+
# to see historical TXNS_TO_SKIP, check out ce6158ac2764ee9d4c8738a85f3bcdc6bd0cadc1
108+
TXNS_TO_SKIP: "0"
109+
# 1195000000-1220000000: https://github.com/aptos-labs/aptos-core/pull/13832
110+
RANGES_TO_SKIP: "1195000000-1220000000"
111+
BACKUP_CONFIG_TEMPLATE_PATH: terraform/helm/fullnode/files/backup/gcs.yaml
112+
# workflow config
113+
RUNS_ON: "high-perf-docker-with-local-ssd"
114+
TIMEOUT_MINUTES: 120 # increase test replay timeout to capture more flaky errors
115+
MAX_VERSIONS_PER_RANGE: 2000000

.github/workflows/replay-verify-on-archive.yaml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/workflows/replay-verify.yaml

Lines changed: 32 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,41 @@
33
#
44
# On PR, a single test case will run. On workflow_dispatch, you may specify the CHAIN_NAME to verify.
55

6-
name: "replay-verify"
6+
name: "replay-verify-on-archive"
77
on:
88
# Allow triggering manually
99
workflow_dispatch:
1010
inputs:
11-
GIT_SHA:
12-
required: false
13-
type: string
14-
description: The git SHA1 to test. If not specified, it will use the latest commit on main.
15-
CHAIN_NAME:
16-
required: false
11+
NETWORK:
12+
required: true
1713
type: choice
1814
options: [testnet, mainnet, all]
1915
default: all
2016
description: The chain name to test. If not specified, it will test both testnet and mainnet.
21-
TESTNET_BUCKET:
17+
IMAGE_TAG:
18+
required: false
19+
type: string
20+
description: The image tag of the feature branch to test, if not specified, it will use the latest commit on current branch.
21+
START_VERSION:
2222
required: false
2323
type: string
24-
description: The bucket to use for testnet replay. If not specified, it will use aptos-testnet-backup.
25-
default: aptos-testnet-backup
26-
MAINNET_BUCKET:
24+
description: Optional version to start replaying. If not specified, replay-verify will determines start version itself.
25+
END_VERSION:
2726
required: false
2827
type: string
29-
description: The bucket to use for mainnet replay. If not specified, it will use aptos-mainnet-backup.
30-
default: aptos-mainnet-backup
28+
description: Optional version to end replaying. If not specified, replay-verify will determines end version itself.
3129
pull_request:
3230
paths:
3331
- ".github/workflows/replay-verify.yaml"
34-
- ".github/workflows/workflow-run-replay-verify.yaml"
32+
- ".github/workflows/workflow-run-replay-verify-on-archive.yaml"
3533
schedule:
36-
- cron: "0 22 * * 0,2,4" # The main branch cadence. This runs every Sun,Tues,Thurs
34+
- cron: "0 8 * * 0,2,4" # The main branch cadence. This runs every Sun,Tues,Thurs UTC 08:00
35+
36+
permissions:
37+
contents: read
38+
id-token: write #required for GCP Workload Identity federation which we use to login into Google Artifact Registry
39+
issues: read
40+
pull-requests: read
3741

3842
# cancel redundant builds
3943
concurrency:
@@ -43,7 +47,7 @@ concurrency:
4347

4448
jobs:
4549
determine-test-metadata:
46-
runs-on: ubuntu-latest
50+
runs-on: ubuntu-latest-32-core
4751
steps:
4852
# checkout the repo first, so check-aptos-core can use it and cancel the workflow if necessary
4953
- uses: actions/checkout@v4
@@ -54,68 +58,25 @@ jobs:
5458
replay-testnet:
5559
if: |
5660
github.event_name == 'schedule' ||
57-
github.event_name == 'push' ||
58-
github.event_name == 'workflow_dispatch' && (inputs.CHAIN_NAME == 'testnet' || inputs.CHAIN_NAME == 'all')
61+
github.event_name == 'workflow_dispatch' && (inputs.NETWORK == 'testnet' || inputs.NETWORK == 'all')
5962
needs: determine-test-metadata
60-
uses: ./.github/workflows/workflow-run-replay-verify.yaml
63+
uses: ./.github/workflows/workflow-run-replay-verify-on-archive.yaml
6164
secrets: inherit
6265
with:
63-
GIT_SHA: ${{ inputs.GIT_SHA }}
64-
# replay-verify config
65-
BUCKET: ${{ inputs.TESTNET_BUCKET || 'aptos-testnet-backup' }}
66-
SUB_DIR: e1
67-
HISTORY_START: 862000000
68-
# to see historical TXNS_TO_SKIP, check out ce6158ac2764ee9d4c8738a85f3bcdc6bd0cadc1
69-
TXNS_TO_SKIP: "0"
70-
# 1195000000-122000000: https://github.com/aptos-labs/aptos-core/pull/13832
71-
RANGES_TO_SKIP: "1195000000-1220000000"
72-
BACKUP_CONFIG_TEMPLATE_PATH: terraform/helm/fullnode/files/backup/gcs.yaml
73-
# workflow config
74-
RUNS_ON: "high-perf-docker-with-local-ssd"
75-
TIMEOUT_MINUTES: 180
76-
MAX_VERSIONS_PER_RANGE: 2000000
66+
NETWORK: "testnet"
67+
IMAGE_TAG: ${{ inputs.IMAGE_TAG }}
68+
START_VERSION: ${{ inputs.START_VERSION }}
69+
END_VERSION: ${{ inputs.END_VERSION }}
7770

7871
replay-mainnet:
7972
if: |
8073
github.event_name == 'schedule' ||
81-
github.event_name == 'push' ||
82-
github.event_name == 'workflow_dispatch' && (inputs.CHAIN_NAME == 'mainnet' || inputs.CHAIN_NAME == 'all' )
83-
needs: determine-test-metadata
84-
uses: ./.github/workflows/workflow-run-replay-verify.yaml
85-
secrets: inherit
86-
with:
87-
GIT_SHA: ${{ inputs.GIT_SHA }}
88-
# replay-verify config
89-
BUCKET: ${{ inputs.MAINNET_BUCKET || 'aptos-mainnet-backup' }}
90-
SUB_DIR: e1
91-
HISTORY_START: 518000000
92-
#TXNS_TO_SKIP: 12253479 12277499 148358668
93-
TXNS_TO_SKIP: "0"
94-
# 1197378568-1198492648: https://github.com/aptos-labs/aptos-core/pull/13832
95-
RANGES_TO_SKIP: "1197378568-1198492648"
96-
BACKUP_CONFIG_TEMPLATE_PATH: terraform/helm/fullnode/files/backup/gcs.yaml
97-
# workflow config
98-
RUNS_ON: "high-perf-docker-with-local-ssd"
99-
TIMEOUT_MINUTES: 180
100-
MAX_VERSIONS_PER_RANGE: 800000
101-
102-
test-replay:
103-
if: ${{ (github.event_name == 'pull_request') && contains(github.event.pull_request.labels.*.name, 'CICD:test-replay')}}
74+
github.event_name == 'workflow_dispatch' && (inputs.NETWORK == 'mainnet' || inputs.NETWORK == 'all' )
10475
needs: determine-test-metadata
105-
uses: ./.github/workflows/workflow-run-replay-verify.yaml
76+
uses: ./.github/workflows/workflow-run-replay-verify-on-archive.yaml
10677
secrets: inherit
10778
with:
108-
GIT_SHA: ${{ github.event.pull_request.head.sha }}
109-
# replay-verify config
110-
BUCKET: ${{ inputs.TESTNET_BUCKET || 'aptos-testnet-backup' }}
111-
SUB_DIR: e1
112-
HISTORY_START: 862000000
113-
# to see historical TXNS_TO_SKIP, check out ce6158ac2764ee9d4c8738a85f3bcdc6bd0cadc1
114-
TXNS_TO_SKIP: "0"
115-
# 1195000000-1220000000: https://github.com/aptos-labs/aptos-core/pull/13832
116-
RANGES_TO_SKIP: "1195000000-1220000000"
117-
BACKUP_CONFIG_TEMPLATE_PATH: terraform/helm/fullnode/files/backup/gcs.yaml
118-
# workflow config
119-
RUNS_ON: "high-perf-docker-with-local-ssd"
120-
TIMEOUT_MINUTES: 120 # increase test replay timeout to capture more flaky errors
121-
MAX_VERSIONS_PER_RANGE: 2000000
79+
NETWORK: "mainnet"
80+
IMAGE_TAG: ${{ inputs.IMAGE_TAG }}
81+
START_VERSION: ${{ inputs.START_VERSION }}
82+
END_VERSION: ${{ inputs.END_VERSION }}

0 commit comments

Comments
 (0)