Skip to content

Commit

Permalink
add image-tag to cancel group
Browse files Browse the repository at this point in the history
  • Loading branch information
areshand committed Dec 16, 2024
1 parent b5acafa commit efbed8e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/replay-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ permissions:
# cancel redundant builds
concurrency:
# cancel redundant builds on PRs (only on PR, not on branches)
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.sha }}
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.sha }}-${{ inputs.IMAGE_TAG || 'latest' }}
cancel-in-progress: true

jobs:
Expand Down
1 change: 0 additions & 1 deletion execution/executor-benchmark/src/transaction_committer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ where

pub fn run(&mut self) {
info!("Start with version: {}", self.start_version);

while let Ok(msg) = self.block_receiver.recv() {
let CommitBlockMessage {
block_id,
Expand Down
10 changes: 10 additions & 0 deletions testsuite/replay-verify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ The main script for executing replay verify tests. This script is responsible fo
- Running replay verification tests against specified networks (testnet/mainnet)
- Verifying transaction execution matches expected results
- Handling test orchestration and reporting
``` test with cli
cd testsuite/replay-verify
poetry shell
python main.py --image_tag YOUR_IMAGE_TAG --network testnet
```

### archive_disk_utils.py

Expand All @@ -19,5 +24,10 @@ A utility script for managing archive storage disks used in replay verification.
- Provisions Google Cloud Storage disks for storing blockchain archive data
- Supports both testnet and mainnet networks
- Is called by GitHub Actions workflows to automatically manage storage resources
```test with cli
cd testsuite/replay-verify
poetry shell
python archive_disk_utils.py --network mainnet
```


10 changes: 9 additions & 1 deletion testsuite/replay-verify/archive_disk_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def generate_disk_name(run_id: str, snapshot_name: str, pvc_id: int) -> str:
@retry(
stop=stop_after_attempt(3),
wait=wait_exponential(multiplier=1, min=4, max=10),
retry=retry_if_exception_type((ApiException, Exception)),
retry=retry_if_exception_type(ApiException),
before_sleep=lambda retry_state: logger.warning(
f"Retrying initial disk creation after error: {retry_state.outcome.exception()}"
),
Expand Down Expand Up @@ -493,6 +493,14 @@ def parse_args() -> argparse.Namespace:
return args


@retry(
stop=stop_after_attempt(3),
wait=wait_exponential(multiplier=1, min=4, max=10),
retry=retry_if_exception_type((ApiException, Exception)),
before_sleep=lambda retry_state: logger.warning(
f"Retrying creating pvc from snapshot after error: {retry_state.outcome.exception()}"
),
)
def create_one_pvc_from_snapshot(
pvc_name: str, snapshot_name: str, namespace: str, label: str
) -> str:
Expand Down
10 changes: 9 additions & 1 deletion testsuite/replay-verify/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ def start(self) -> None:
)
time.sleep(RETRY_DELAY)

@retry(
stop=stop_after_attempt(MAX_RETRIES),
wait=wait_fixed(RETRY_DELAY),
retry=retry_if_exception_type(ApiException),
before_sleep=lambda retry_state: logger.warning(
f"Retry {retry_state.attempt_number}/{MAX_RETRIES} failed: {retry_state.outcome.exception()}"
),
)
def delete_pod(self):
response = self.client.delete_namespaced_pod(
name=self.name,
Expand All @@ -259,7 +267,7 @@ def get_pod_exit_code(self):
retry=retry_if_exception_type(ApiException),
before_sleep=lambda retry_state: logger.warning(
f"Retry {retry_state.attempt_number}/{MAX_RETRIES} failed: {retry_state.outcome.exception()}"
)
),
)
def get_pod_status(self):
pod_status = self.client.read_namespaced_pod_status(
Expand Down

0 comments on commit efbed8e

Please sign in to comment.