Skip to content

Commit

Permalink
Enable Genesis mode - transitory approach
Browse files Browse the repository at this point in the history
  • Loading branch information
saratomaz committed Jan 26, 2025
1 parent 9203720 commit aa65815
Show file tree
Hide file tree
Showing 5 changed files with 7,493 additions and 23 deletions.
20 changes: 10 additions & 10 deletions .buildkite/node_sync_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ echo " ==== importing packages from nix (https://search.nixos.org/packages)"
python3 -c "import requests, pandas, psutil, pymysql;"

env=$1
build_mode=$2
node_rev1=$3
tag_no1=$4
node_topology1=$5
node_start_arguments1=$6
node_rev2=$7
tag_no2=$8
node_topology2=$9
node_start_arguments2=${10}
node_rev1=$2
tag_no1=$3
node_topology1=$4
node_start_arguments1=$5
node_rev2=$6
tag_no2=$7
node_topology2=$8
node_start_arguments2=$9
use_genesis_mode=${10}

echo " ==== start sync test"
python ./sync_tests/tests/node_sync_test.py -b "$build_mode" -e "$env" -t1 "$tag_no1" -t2 "$tag_no2" -r1 "$node_rev1" -r2 "$node_rev2" -n1 "$node_topology1" -n2 "$node_topology2" -a1="$node_start_arguments1" -a2="$node_start_arguments2"
python ./sync_tests/tests/node_sync_test.py -e "$env" -t1 "$tag_no1" -t2 "$tag_no2" -r1 "$node_rev1" -r2 "$node_rev2" -n1 "$node_topology1" -n2 "$node_topology2" -a1="$node_start_arguments1" -a2="$node_start_arguments2" -g "${use_genesis_mode}"

echo "--- Prepare for adding sync test results to the AWS Database"
python ./sync_tests/tests/node_write_sync_values_to_db.py -e "$env"
2 changes: 1 addition & 1 deletion .buildkite/node_sync_tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- label: ':drum_with_drumsticks: Run the Cardano node sync test on Mainnet using a Linux machine'
commands:
- nix develop --accept-flake-config .#python --command python ./sync_tests/tests/node_sync_test.py -b "${build_mode}" -e "${env}" -t1 "${tag_no1}" -t2 "${tag_no2}" -r1 "${node_rev1}" -r2 "${node_rev2}" -n1 "${node_topology1}" -n2 "${node_topology2}" -a1 "${node_start_arguments1}" -a2 "${node_start_arguments2}"
- nix develop --accept-flake-config .#python --command python ./sync_tests/tests/node_sync_test.py -e "${env}" -t1 "${tag_no1}" -t2 "${tag_no2}" -r1 "${node_rev1}" -r2 "${node_rev2}" -n1 "${node_topology1}" -n2 "${node_topology2}" -a1 "${node_start_arguments1}" -a2 "${node_start_arguments2}" -g "${use_genesis_mode}"
timeout_in_minutes: 3000
agents:
system: x86_64-linux
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/node_sync_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ on:
- preview
- shelley-qa
default: preprod
build_mode:
description: "build-mode"
type: choice
options:
- nix
default: nix
tag_no1:
description: "Initial sync - Graph axis label"
required: true
Expand Down Expand Up @@ -56,6 +50,10 @@ on:
description: "Upgrade node - Extra arguments when starting the node"
required: false
default: "None"
use_genesis_mode:
description: "Use Ouroboros Genesis mode"
type: boolean
default: false


jobs:
Expand Down Expand Up @@ -100,7 +98,6 @@ jobs:
BLOCKFROST_API_KEY: ${{ secrets.BLOCKFROST_API_KEY }}
BUILD_ENV_VARS: '{
"env":"${{ github.event.inputs.environment }}",
"build_mode":"${{ github.event.inputs.build_mode }}",
"node_rev1":"${{ steps.get_tag.outputs.node_rev1 }}",
"node_rev2":"${{ github.event.inputs.node_rev2 }}",
"tag_no1":"${{ github.event.inputs.tag_no1 }}",
Expand All @@ -109,6 +106,7 @@ jobs:
"node_topology2":"${{ github.event.inputs.node_topology2 }}",
"node_start_arguments1":"${{ github.event.inputs.node_start_arguments1 }}",
"node_start_arguments2":"${{ github.event.inputs.node_start_arguments2 }}",
"use_genesis_mode":"${{ github.event.inputs.use_genesis_mode }}",
"BLOCKFROST_API_KEY":"${{ secrets.BLOCKFROST_API_KEY }}",
"AWS_DB_USERNAME":"${{ secrets.AWS_DB_USERNAME }}",
Expand Down Expand Up @@ -165,15 +163,15 @@ jobs:
run: |
nix develop --accept-flake-config .#python --command python -m sync_tests.tests.node_sync_test \
-e ${{ matrix.env }} \
-b ${{ github.event.inputs.build_mode }} \
-t1 "${{ github.event.inputs.tag_no1 }}" \
-t2 "${{ github.event.inputs.tag_no2 }}" \
-r1 "${{ github.event.inputs.node_rev1 }}" \
-r2 "${{ github.event.inputs.node_rev2 }}" \
-n1 "${{ github.event.inputs.node_topology1 }}" \
-n2 "${{ github.event.inputs.node_topology2 }}" \
-a1="${{ github.event.inputs.node_start_arguments1 }}" \
-a2="${{ github.event.inputs.node_start_arguments2 }}"
-a2="${{ github.event.inputs.node_start_arguments2 }}"\
-g="${{ github.event.inputs.use_genesis_mode }}"
- name: Write the test results into the database
env:
Expand Down
Loading

0 comments on commit aa65815

Please sign in to comment.