Skip to content

Commit

Permalink
Nightly Blade Healthcheck (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
bane authored Jul 4, 2024
1 parent 2688bb3 commit aace548
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ on: # yamllint disable-line rule:truthy
ansible_output:
description: Ansible output
value: ${{ jobs.deploy_network.outputs.ansible_output }}
blade_healthcheck_output:
description: Blade Healthcheck output
value: ${{ jobs.deploy_network.outputs.blade_healthcheck_output }}
secrets:
AWS_ROLE_ARN:
required: true
Expand Down Expand Up @@ -138,6 +141,7 @@ jobs:
outputs:
terraform_output: ${{ steps.terraform_failure.outputs.terraform_output }}
ansible_output: ${{ steps.ansible_failure.outputs.ansible_output }}
blade_healthcheck_output: ${{ steps.blade_healthcheck.outputs.healthcheck }}
rpc_url: ${{ steps.rpc_url.outputs.url }}
steps:
- name: Checkout code
Expand Down Expand Up @@ -219,6 +223,9 @@ jobs:
- name: Set RPC URL
id: rpc_url
run: echo "url=$(terraform output -raw aws_lb_ext_domain | grep -o -E '^ext[^:]*')" >> $GITHUB_OUTPUT
- name: Blade healthcheck
id: blade_healthcheck
run: echo "healthcheck=`curl http://${{ steps.rpc_url.outputs.url }} | jq -r 'select(.name == "blade") | length != 0'`" >> $GITHUB_OUTPUT
notification:
name: Deploy Notification
needs: [check_network, deploy_network]
Expand All @@ -235,6 +242,7 @@ jobs:
gossip_msg_size: ${{ inputs.gossip_msg_size }}
deploy_network_terraform_output: ${{ needs.deploy_network.outputs.terraform_output }}
deploy_network_ansible_output: ${{ needs.deploy_network.outputs.ansible_output }}
deploy_network_blade_healthcheck_output: ${{ needs.deploy_network.outputs.blade_healthcheck_output }}
rpc_url: ${{ needs.check_network.outputs.rpc_url || needs.deploy_network.outputs.rpc_url }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
4 changes: 1 addition & 3 deletions .github/workflows/load-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,10 @@ jobs:
txpool_pending: ${{ steps.txpool_status_results.outputs.txpool_pending }}
txpool_queued: ${{ steps.txpool_status_results.outputs.txpool_queued }}
steps:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Get txpool status
id: txpool_status_results
run: |
txpool_status=$(cast rpc --rpc-url "http://${{ needs.check_network.outputs.rpc_url }}" txpool_status | jq)
txpool_status=$(curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"txpool_status","params":[],"id":1}' http://${{ needs.check_network.outputs.rpc_url }} | jq -r .result)
echo "txpool_pending=$(echo $txpool_status | jq -r '.pending')" >> $GITHUB_OUTPUT
echo "txpool_queued=$(echo $txpool_status | jq -r '.queued')" >> $GITHUB_OUTPUT
notification:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ jobs:
unstake_all_test_output: ${{ needs.sanity_check_tests.outputs.unstake_all_test_output }}
deploy_network_terraform_output: ${{ needs.deploy_network.outputs.terraform_output }}
deploy_network_ansible_output: ${{ needs.deploy_network.outputs.ansible_output }}
deploy_network_blade_healthcheck_output: ${{ needs.deploy_network.outputs.blade_healthcheck_output }}
load_test_eoa_output: ${{ needs.load_test_eoa.outputs.load_test_output }}
load_test_eoa_txpool_pending_output: ${{ needs.load_test_eoa.outputs.txpool_pending }}
load_test_eoa_txpool_queued_output: ${{ needs.load_test_eoa.outputs.txpool_queued }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/notification-deploy-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ on: # yamllint disable-line rule:truthy
description: Deploy Network - Ansible output
type: string
required: true
deploy_network_blade_healthcheck_output:
description: Deploy Network - Blade Healthcheck output
type: string
required: true
rpc_url:
description: JSON-RPC URL
type: string
Expand Down Expand Up @@ -87,7 +91,7 @@ jobs:
"type": "plain_text",
"text": "Workflow Run"
},
"style": "${{ inputs.deploy_network_terraform_output == '' && inputs.deploy_network_ansible_output == '' && env.succeed_bnt || env.failed_bnt }}",
"style": "${{ inputs.deploy_network_terraform_output == '' && inputs.deploy_network_ansible_output == '' && inputs.deploy_network_blade_healthcheck_output == 'true' && env.succeed_bnt || env.failed_bnt }}",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
},
{
Expand All @@ -96,6 +100,7 @@ jobs:
"type": "plain_text",
"text": "JSON-RPC"
},
"style": "${{ inputs.deploy_network_blade_healthcheck_output == 'true' && env.succeed_bnt || env.failed_bnt }}",
"url": "http://${{ inputs.rpc_url }}"
}
]
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/notification-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ on: # yamllint disable-line rule:truthy
description: Deploy Network - Ansible output
type: string
required: true
deploy_network_blade_healthcheck_output:
description: Deploy Network - Blade Healthcheck output
type: string
required: true
load_test_eoa_output:
description: Load Test EOA output
type: string
Expand Down Expand Up @@ -211,7 +215,7 @@ jobs:
"type": "plain_text",
"text": "Workflow Run"
},
"style": "${{ inputs.build_blade_output == '' && inputs.lint_output == '' && inputs.unit_test_output == '' && inputs.e2e_polybft_test_output == '' && inputs.e2e_legacy_test_output == '' && inputs.property_polybft_test_output == '' && inputs.fuzz_test_output == '' && inputs.benchmark_test_output == '' && inputs.sanity_check_tests_output == 'true' && inputs.deploy_network_terraform_output == '' && inputs.deploy_network_ansible_output == '' && inputs.load_test_eoa_output == 'true' && inputs.load_test_eoa_txpool_pending_output == '0' && inputs.load_test_eoa_txpool_queued_output == '0' && inputs.load_test_erc20_output == 'true' && inputs.load_test_erc20_txpool_pending_output == '0' && inputs.load_test_erc20_txpool_queued_output == '0' && inputs.load_test_erc721_output == 'true' && inputs.load_test_erc721_txpool_pending_output == '0' && inputs.load_test_erc721_txpool_queued_output == '0' && inputs.load_test_mixed_output == 'true' && inputs.load_test_mixed_txpool_pending_output == '0' && inputs.load_test_mixed_txpool_queued_output == '0' && inputs.destroy_network_logs_output == '' && inputs.destroy_network_terraform_output == '' && env.succeed_bnt || env.failed_bnt }}",
"style": "${{ inputs.build_blade_output == '' && inputs.lint_output == '' && inputs.unit_test_output == '' && inputs.e2e_polybft_test_output == '' && inputs.e2e_legacy_test_output == '' && inputs.property_polybft_test_output == '' && inputs.fuzz_test_output == '' && inputs.benchmark_test_output == '' && inputs.sanity_check_tests_output == 'true' && inputs.deploy_network_terraform_output == '' && inputs.deploy_network_ansible_output == '' && inputs.deploy_network_blade_healthcheck_output == 'true' && inputs.load_test_eoa_output == 'true' && inputs.load_test_eoa_txpool_pending_output == '0' && inputs.load_test_eoa_txpool_queued_output == '0' && inputs.load_test_erc20_output == 'true' && inputs.load_test_erc20_txpool_pending_output == '0' && inputs.load_test_erc20_txpool_queued_output == '0' && inputs.load_test_erc721_output == 'true' && inputs.load_test_erc721_txpool_pending_output == '0' && inputs.load_test_erc721_txpool_queued_output == '0' && inputs.load_test_mixed_output == 'true' && inputs.load_test_mixed_txpool_pending_output == '0' && inputs.load_test_mixed_txpool_queued_output == '0' && inputs.destroy_network_logs_output == '' && inputs.destroy_network_terraform_output == '' && env.succeed_bnt || env.failed_bnt }}",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
},
{
Expand Down Expand Up @@ -372,7 +376,7 @@ jobs:
"fields": [
{
"type": "mrkdwn",
"text": "${{ inputs.deploy_network_terraform_output == '' && inputs.deploy_network_ansible_output == '' && env.succeed_job || env.failed_job }} *Deploy Network*"
"text": "${{ inputs.deploy_network_terraform_output == '' && inputs.deploy_network_ansible_output == '' && inputs.deploy_network_blade_healthcheck_output == 'true' && env.succeed_job || env.failed_job }} *Deploy Network*"
},
{
"type": "mrkdwn",
Expand Down

0 comments on commit aace548

Please sign in to comment.