diff --git a/.github/workflows/load-test.yml b/.github/workflows/load-test.yml index a056c0f29a..d330406ec2 100644 --- a/.github/workflows/load-test.yml +++ b/.github/workflows/load-test.yml @@ -117,6 +117,12 @@ on: # yamllint disable-line rule:truthy max_gas_utilization: description: Maximum Gas Utilization value: ${{ jobs.load_test.outputs.max_gas_utilization }} + txpool_pending: + description: Number of transactions in pending + value: ${{ jobs.txpool_status.outputs.txpool_pending }} + txpool_queued: + description: Number of transactions in queued + value: ${{ jobs.txpool_status.outputs.txpool_queued }} secrets: AWS_ROLE_ARN: required: true @@ -239,9 +245,23 @@ jobs: if: success() id: load_test_results_success run: echo "test_output=true" >> $GITHUB_OUTPUT + txpool_status: + name: Check txpool status after Load Test + runs-on: ubuntu-latest + needs: load_test + outputs: + txpool_pending: ${{ steps.txpool_status_results.outputs.txpool_pending }} + txpool_queued: ${{ steps.txpool_status_results.outputs.txpool_queued }} + steps: + - 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) + echo "txpool_pending=$(echo $txpool_status | jq -r '.pending')" >> $GITHUB_OUTPUT + echo "txpool_queued=$(echo $txpool_status | jq -r '.queued')" >> $GITHUB_OUTPUT notification: name: Load Test Notification - needs: load_test + needs: [load_test, txpool_status] uses: ./.github/workflows/notification-load-test.yml if: (always() && inputs.notification && needs.load_test.outputs.test_output_success == 'true') with: @@ -263,12 +283,14 @@ jobs: avg_gas_per_tx: ${{ needs.load_test.outputs.avg_gas_per_tx }} avg_gas_utilization: ${{ needs.load_test.outputs.avg_gas_utilization }} max_gas_utilization: ${{ needs.load_test.outputs.max_gas_utilization }} + txpool_pending: ${{ needs.txpool_status.outputs.txpool_pending }} + txpool_queued: ${{ needs.txpool_status.outputs.txpool_queued }} secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} destroy_load_test_runner: name: Destroy Load Test Runner environment: ${{ inputs.environment }} - needs: [load_test_runner, load_test] + needs: [load_test_runner, load_test, txpool_status] if: always() runs-on: ubuntu-latest steps: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 596dc23499..805c6a194d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -147,8 +147,14 @@ jobs: deploy_network_terraform_output: ${{ needs.deploy_network.outputs.terraform_output }} deploy_network_ansible_output: ${{ needs.deploy_network.outputs.ansible_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 }} load_test_erc20_output: ${{ needs.load_test_erc20.outputs.load_test_output }} + load_test_erc20_txpool_pending_output: ${{ needs.load_test_erc20.outputs.txpool_pending }} + load_test_erc20_txpool_queued_output: ${{ needs.load_test_erc20.outputs.txpool_queued }} load_test_erc721_output: ${{ needs.load_test_erc721.outputs.load_test_output }} + load_test_erc721_txpool_pending_output: ${{ needs.load_test_erc721.outputs.txpool_pending }} + load_test_erc721_txpool_queued_output: ${{ needs.load_test_erc721.outputs.txpool_queued }} destroy_network_logs_output: ${{ needs.destroy_network.outputs.logs_output }} destroy_network_terraform_output: ${{ needs.destroy_network.outputs.terraform_output }} secrets: @@ -178,6 +184,8 @@ jobs: avg_gas_per_tx: ${{ needs.load_test_eoa.outputs.avg_gas_per_tx }} avg_gas_utilization: ${{ needs.load_test_eoa.outputs.avg_gas_utilization }} max_gas_utilization: ${{ needs.load_test_eoa.outputs.max_gas_utilization }} + txpool_pending: ${{ needs.load_test_eoa.outputs.txpool_pending }} + txpool_queued: ${{ needs.load_test_eoa.outputs.txpool_queued }} secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} notification_load_test_erc20: @@ -204,6 +212,8 @@ jobs: avg_gas_per_tx: ${{ needs.load_test_erc20.outputs.avg_gas_per_tx }} avg_gas_utilization: ${{ needs.load_test_erc20.outputs.avg_gas_utilization }} max_gas_utilization: ${{ needs.load_test_erc20.outputs.max_gas_utilization }} + txpool_pending: ${{ needs.load_test_erc20.outputs.txpool_pending }} + txpool_queued: ${{ needs.load_test_erc20.outputs.txpool_queued }} secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} notification_load_test_erc721: @@ -230,5 +240,7 @@ jobs: avg_gas_per_tx: ${{ needs.load_test_erc721.outputs.avg_gas_per_tx }} avg_gas_utilization: ${{ needs.load_test_erc721.outputs.avg_gas_utilization }} max_gas_utilization: ${{ needs.load_test_erc721.outputs.max_gas_utilization }} + txpool_pending: ${{ needs.load_test_erc721.outputs.txpool_pending }} + txpool_queued: ${{ needs.load_test_erc721.outputs.txpool_queued }} secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/notification-deploy-network.yml b/.github/workflows/notification-deploy-network.yml index 84a2c5a195..fa0f5504a3 100644 --- a/.github/workflows/notification-deploy-network.yml +++ b/.github/workflows/notification-deploy-network.yml @@ -103,22 +103,10 @@ jobs: { "type": "context", "elements": [ - { - "type": "mrkdwn", - "text": "Triggered by: *${{ github.triggering_actor }}*" - }, { "type": "mrkdwn", "text": "Commit: **" - } - ] - }, - { - "type": "divider" - }, - { - "type": "context", - "elements": [ + }, { "type": "mrkdwn", "text": "Environment: *${{ inputs.environment }}*" @@ -129,6 +117,9 @@ jobs: } ] }, + { + "type": "divider" + }, { "type": "context", "elements": [ diff --git a/.github/workflows/notification-destroy-network.yml b/.github/workflows/notification-destroy-network.yml index b9b06b54e9..b9222222ee 100644 --- a/.github/workflows/notification-destroy-network.yml +++ b/.github/workflows/notification-destroy-network.yml @@ -74,10 +74,6 @@ jobs: { "type": "context", "elements": [ - { - "type": "mrkdwn", - "text": "Triggered by: *${{ github.triggering_actor }}*" - }, { "type": "mrkdwn", "text": "Environment: *${{ inputs.environment }}*" diff --git a/.github/workflows/notification-load-test.yml b/.github/workflows/notification-load-test.yml index 52e6a3361f..8ce2a2b6f9 100644 --- a/.github/workflows/notification-load-test.yml +++ b/.github/workflows/notification-load-test.yml @@ -75,6 +75,14 @@ on: # yamllint disable-line rule:truthy description: Maximum Gas Utilization type: string required: true + txpool_pending: + description: Number of transactions in pending + type: string + required: true + txpool_queued: + description: Number of transactions in queued + type: string + required: true secrets: SLACK_WEBHOOK_URL: required: true @@ -94,6 +102,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK succeed_bnt: 'primary' + failed_bnt: 'danger' with: payload: | { @@ -114,7 +123,7 @@ jobs: "type": "plain_text", "text": "Workflow Run" }, - "style": "${{ env.succeed_bnt }}", + "style": "${{ inputs.txpool_pending == '0' && inputs.txpool_queued == '0' && env.succeed_bnt || env.failed_bnt }}" "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" } ] @@ -122,22 +131,10 @@ jobs: { "type": "context", "elements": [ - { - "type": "mrkdwn", - "text": "Triggered by: *${{ github.triggering_actor }}*" - }, { "type": "mrkdwn", "text": "Commit: **" - } - ] - }, - { - "type": "divider" - }, - { - "type": "context", - "elements": [ + }, { "type": "mrkdwn", "text": "Environment: *${{ inputs.environment }}*" @@ -148,6 +145,9 @@ jobs: } ] }, + { + "type": "divider" + }, { "type": "context", "elements": [ @@ -171,13 +171,29 @@ jobs: "type": "mrkdwn", "text": "Batch Size: *${{ inputs.batch_size }}*" }, + { + "type": "mrkdwn", + "text": "Receipts Timeout: *${{ inputs.receipts_timeout }}*" + } { "type": "mrkdwn", "text": "Wait TX Pool To Empty: *${{ inputs.wait_txpool }}*" + } + ] + }, + { + "type": "divider" + }, + { + "type": "context", + "elements": [ + { + "type": "mrkdwn", + "text": "Pending TXs: *${{ inputs.txpool_pending }}*" }, { "type": "mrkdwn", - "text": "Receipts Timeout: *${{ inputs.receipts_timeout }}*" + "text": "Queued TXs: *${{ inputs.txpool_queued }}*" } ] }, diff --git a/.github/workflows/notification-nightly.yml b/.github/workflows/notification-nightly.yml index 395080140b..09f5093dd0 100644 --- a/.github/workflows/notification-nightly.yml +++ b/.github/workflows/notification-nightly.yml @@ -83,14 +83,38 @@ on: # yamllint disable-line rule:truthy description: Load Test EOA output type: string required: true + load_test_eoa_txpool_pending_output: + description: Load Test EOA txpool pending output + type: string + required: true + load_test_eoa_txpool_queued_output: + description: Load Test EOA txpool queued output + type: string + required: true load_test_erc20_output: description: Load Test ERC20 output type: string required: true + load_test_erc20_txpool_pending_output: + description: Load Test ERC20 txpool pending output + type: string + required: true + load_test_erc20_txpool_queued_output: + description: Load Test ERC20 txpool queued output + type: string + required: true load_test_erc721_output: description: Load Test ERC721 output type: string required: true + load_test_erc721_txpool_pending_output: + description: Load Test ERC721 txpool pending output + type: string + required: true + load_test_erc721_txpool_queued_output: + description: Load Test ERC721 txpool queued output + type: string + required: true destroy_network_logs_output: description: Deploy Network - Logs output type: string @@ -143,7 +167,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.deploy_network_terraform_output == '' && inputs.deploy_network_ansible_output == '' && inputs.load_test_eoa_output == 'true' && inputs.load_test_erc20_output == 'true' && inputs.load_test_erc721_output == 'true' && 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.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.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 }}" }, { @@ -160,22 +184,10 @@ jobs: { "type": "context", "elements": [ - { - "type": "mrkdwn", - "text": "Triggered by: *${{ github.triggering_actor }}*" - }, { "type": "mrkdwn", "text": "Commit: **" - } - ] - }, - { - "type": "divider" - }, - { - "type": "context", - "elements": [ + }, { "type": "mrkdwn", "text": "Environment: *${{ inputs.environment }}*" @@ -186,6 +198,9 @@ jobs: } ] }, + { + "type": "divider" + }, { "type": "context", "elements": [ @@ -232,11 +247,11 @@ jobs: }, { "type": "mrkdwn", - "text": "Gossip Message Size: *${{ inputs.gossip_msg_size }}*" + "text": "Log Level: *${{ vars.LOG_LEVEL }}*" }, { "type": "mrkdwn", - "text": "Log Level: *${{ vars.LOG_LEVEL }}*" + "text": "Gossip Message Size: *${{ inputs.gossip_msg_size }}*" } ] }, @@ -296,15 +311,15 @@ jobs: }, { "type": "mrkdwn", - "text": "${{ inputs.load_test_eoa_output == 'true' && env.succeed_job || env.failed_job }} *Load Test EOA*" + "text": "${{ inputs.load_test_eoa_output == 'true' && inputs.load_test_eoa_txpool_pending_output == '0' && inputs.load_test_eoa_txpool_queued_output == '0' && env.succeed_job || env.failed_job }} *Load Test EOA*" }, { "type": "mrkdwn", - "text": "${{ inputs.load_test_erc20_output == 'true' && env.succeed_job || env.failed_job }} *Load Test ERC20*" + "text": "${{ inputs.load_test_erc20_output == 'true' && inputs.load_test_erc20_txpool_pending_output == '0' && inputs.load_test_erc20_txpool_queued_output == '0' && env.succeed_job || env.failed_job }} *Load Test ERC20*" }, { "type": "mrkdwn", - "text": "${{ inputs.load_test_erc721_output == 'true' && env.succeed_job || env.failed_job }} *Load Test ERC721*" + "text": "${{ inputs.load_test_erc721_output == 'true' && inputs.load_test_erc721_txpool_pending_output == '0' && inputs.load_test_erc721_txpool_queued_output == '0' && env.succeed_job || env.failed_job }} *Load Test ERC721*" } ] }