Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into stack-improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Mar 28, 2024
2 parents 1c31ccb + 307c7bb commit 21d64c2
Show file tree
Hide file tree
Showing 172 changed files with 5,874 additions and 2,374 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/benchmark-test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: Benchmark Tests
on: # yamllint disable-line rule:truthy
workflow_call:
outputs:
workflow_output:
description: "Benchmark Tests output"
value: ${{ jobs.benchmark_test.outputs.test_output_failure }}
workflow_call:
outputs:
workflow_output:
description: "Benchmark Tests output"
value: ${{ jobs.benchmark_test.outputs.test_output_failure }}

jobs:
benchmark_test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ on: # yamllint disable-line rule:truthy
benchmark-test:
description: Benchmark Tests
type: boolean
default: true
required: true
outputs:
build-blade:
description: Build Blade output
Expand Down
33 changes: 29 additions & 4 deletions .github/workflows/deploy-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ on: # yamllint disable-line rule:truthy
type: string
default: "2"
required: true
max_slots:
description: Max Slots
type: string
default: "276480"
required: true
max_enqueued:
description: Max Enqueued
type: string
default: "276480"
required: true
is_london_fork_active:
description: EIP-1559
type: boolean
Expand All @@ -44,6 +54,14 @@ on: # yamllint disable-line rule:truthy
description: Block Time
type: string
required: true
max_slots:
description: Max Slots
type: string
required: true
max_enqueued:
description: Max Enqueued
type: string
required: true
is_london_fork_active:
description: EIP-1559
type: boolean
Expand Down Expand Up @@ -80,7 +98,6 @@ jobs:
check_network:
name: Check if the network is already deployed
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
outputs:
check_output: ${{ steps.check_state_file.outputs.resources }}
rpc_url: ${{ steps.rpc_url.outputs.url }}
Expand Down Expand Up @@ -163,6 +180,8 @@ jobs:
echo "${{ secrets.VAULT_PASSWORD }}" > password.txt
sed 's/devnet/${{ inputs.environment }}/g' inventory/aws_ec2.yml > inventory/aws_ec2.yml.tmp && mv inventory/aws_ec2.yml.tmp inventory/aws_ec2.yml
sed 's/blade_tag: .*/blade_tag: ${{ github.sha }}/g' group_vars/all.yml > group_vars/all.yml.tmp && mv group_vars/all.yml.tmp group_vars/all.yml
sed 's/is_bridge_active: .*/is_bridge_active: ${{ inputs.is_bridge_active }}/g' group_vars/all.yml > group_vars/all.yml.tmp && mv group_vars/all.yml.tmp group_vars/all.yml
sed 's/is_london_fork_active: .*/is_london_fork_active: ${{ inputs.is_london_fork_active }}/g' group_vars/all.yml > group_vars/all.yml.tmp && mv group_vars/all.yml.tmp group_vars/all.yml
sed 's/INFO/${{ vars.LOG_LEVEL }}/g' roles/blade/templates/blade.service > roles/blade/templates/blade.service.tmp && mv roles/blade/templates/blade.service.tmp roles/blade/templates/blade.service
- name: Setup Ansible
working-directory: ansible
Expand All @@ -175,11 +194,11 @@ jobs:
- name: Run Ansible (Bootstrap blade)
if: (steps.previous_data.outputs.previous_data_output == '' || contains(steps.previous_data.outputs.previous_data_output, 'error'))
working-directory: ansible
run: ansible-playbook site.yml --extra-vars "clean_deploy_title=${{ inputs.environment }} blade_repository=${{ github.repository }} block_gas_limit=${{ inputs.block_gas_limit }} block_time=${{ inputs.block_time }} is_london_fork_active=${{ inputs.is_london_fork_active }} is_bridge_active=${{ inputs.is_bridge_active }}"
run: ansible-playbook site.yml --extra-vars "clean_deploy_title=${{ inputs.environment }} blade_repository=${{ github.repository }} block_gas_limit=${{ inputs.block_gas_limit }} block_time=${{ inputs.block_time }} max_slots=${{ inputs.max_slots }} max_enqueued=${{ inputs.max_enqueued }}"
- name: Run Ansible (Restore data)
if: contains(steps.previous_data.outputs.previous_data_output, 'download')
working-directory: ansible
run: ansible-playbook site.yml --extra-vars "clean_deploy_title=${{ inputs.environment }} blade_repository=${{ github.repository }} block_gas_limit=${{ inputs.block_gas_limit }} block_time=${{ inputs.block_time }} s3_bucket=${{ secrets.AWS_S3_BLADE_BUCKET }} restore_data=true"
run: ansible-playbook site.yml --extra-vars "clean_deploy_title=${{ inputs.environment }} blade_repository=${{ github.repository }} s3_bucket=${{ secrets.AWS_S3_BLADE_BUCKET }} restore_data=true"
- name: Ansible Failed
if: failure()
id: ansible_failure
Expand All @@ -191,9 +210,15 @@ jobs:
name: Deploy Notification
needs: [check_network, deploy_network]
uses: ./.github/workflows/notification-deploy-network.yml
if: (always() && inputs.notification)
if: ((success() || failure()) && inputs.notification)
with:
environment: ${{ inputs.environment }}
block_gas_limit: ${{ inputs.block_gas_limit }}
block_time: ${{ inputs.block_time }}
max_slots: ${{ inputs.max_slots }}
max_enqueued: ${{ inputs.max_enqueued }}
is_london_fork_active: ${{ inputs.is_london_fork_active }}
is_bridge_active: ${{ inputs.is_bridge_active }}
deploy_network_terraform_output: ${{ needs.deploy_network.outputs.terraform_output }}
deploy_network_ansible_output: ${{ needs.deploy_network.outputs.ansible_output }}
rpc_url: ${{ needs.check_network.outputs.rpc_url || needs.deploy_network.outputs.rpc_url }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/destroy-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on: # yamllint disable-line rule:truthy
logs:
description: Upload Logs
type: boolean
default: false
default: true
notification:
description: Notification
type: boolean
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/load-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on: # yamllint disable-line rule:truthy
timeout:
description: Time Out
type: string
default: "220s"
default: "1800s"
required: true
rate:
description: Rate
Expand Down Expand Up @@ -136,7 +136,6 @@ jobs:
check_network:
name: Check if the network is already deployed
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
outputs:
rpc_url: ${{ steps.rpc_url.outputs.url }}
steps:
Expand Down Expand Up @@ -228,6 +227,12 @@ jobs:
with:
environment: ${{ inputs.environment }}
scenario: ${{ inputs.scenario }}
timeout: ${{ inputs.timeout }}
rate: ${{ inputs.rate }}
timeUnit: ${{ inputs.timeUnit }}
duration: ${{ inputs.duration }}
preAllocatedVUs: ${{ inputs.preAllocatedVUs }}
maxVUs: ${{ inputs.maxVUs }}
tps_avg: ${{ needs.load_test_scenario.outputs.tps_avg }}
tps_max: ${{ needs.load_test_scenario.outputs.tps_max }}
iterations: ${{ needs.load_test_scenario.outputs.iterations }}
Expand Down
26 changes: 20 additions & 6 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on: # yamllint disable-line rule:truthy
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
force-run:
description: Force Run
type: boolean
default: false

jobs:
check:
Expand All @@ -21,7 +27,7 @@ jobs:
name: CI
uses: ./.github/workflows/ci.yml
needs: check
if: needs.check.outputs.new_commit_count > 0
if: (needs.check.outputs.new_commit_count > 0 || inputs.force-run)
with:
build-blade: true
lint: true
Expand All @@ -35,12 +41,14 @@ jobs:
name: Deploy Network
uses: ./.github/workflows/deploy-network.yml
needs: check
if: needs.check.outputs.new_commit_count > 0
if: (needs.check.outputs.new_commit_count > 0 || inputs.force-run)
with:
environment: nightly
block_gas_limit: "200000000"
block_time: "2"
is_london_fork_active: true
max_slots: "276480"
max_enqueued: "276480"
is_london_fork_active: false
is_bridge_active: true
notification: false
secrets:
Expand Down Expand Up @@ -96,8 +104,8 @@ jobs:
destroy_network:
name: Destroy Network
uses: ./.github/workflows/destroy-network.yml
needs: [deploy_network, load_test_multiple_eoa, load_test_multiple_erc20]
if: always()
needs: [check, deploy_network, load_test_multiple_eoa, load_test_multiple_erc20]
if: (always() && (needs.check.outputs.new_commit_count > 0 || inputs.force-run))
with:
environment: nightly
logs: true
Expand All @@ -113,6 +121,12 @@ jobs:
if: success() || failure()
with:
environment: nightly
block_gas_limit: "200000000"
block_time: "2"
max_slots: "276480"
max_enqueued: "276480"
is_london_fork_active: false
is_bridge_active: true
logs: true
build_blade_output: ${{ needs.ci.outputs.build-blade }}
lint_output: ${{ needs.ci.outputs.lint }}
Expand Down Expand Up @@ -151,7 +165,7 @@ jobs:
notification_load_test_multiple_erc20:
name: Load Test ERC20 Notification
uses: ./.github/workflows/notification-load-test.yml
needs: [load_test_multiple_erc20, notification_nightly]
needs: [load_test_multiple_erc20, notification_nightly, notification_load_test_multiple_eoa]
if: (always() && needs.load_test_multiple_erc20.outputs.load_test_output == 'true')
with:
environment: nightly
Expand Down
Loading

0 comments on commit 21d64c2

Please sign in to comment.