chore: Wait for all nodes to deploy registry [fixes FLU-230] (#177)

This commit is contained in:
Anatolios Laskaris 2023-01-23 13:00:28 +02:00 committed by GitHub
parent 9981043448
commit 451c5be23c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3236 additions and 7461 deletions

19
.github/check-registry.sh vendored Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
PEERS=(
"/ip4/127.0.0.1/tcp/9991/ws/p2p/12D3KooWBM3SdXWqGaawQDGQ6JprtwswEg3FWGvGhmgmMez1vRbR"
"/ip4/127.0.0.1/tcp/9992/ws/p2p/12D3KooWQdpukY3p2DhDfUfDgphAqsGu5ZUrmQ4mcHSGrRag6gQK"
"/ip4/127.0.0.1/tcp/9993/ws/p2p/12D3KooWRT8V5awYdEZm6aAV9HWweCEbhWd7df4wehqHZXAB7yMZ"
"/ip4/127.0.0.1/tcp/9994/ws/p2p/12D3KooWBzLSu9RL7wLP6oUowzCbkCj2AGBSXkHSJKuq4wwTfwof"
"/ip4/127.0.0.1/tcp/9995/ws/p2p/12D3KooWBf6hFgrnXwHkBnwPGMysP3b1NJe5HGtAWPYfwmQ2MBiU"
"/ip4/127.0.0.1/tcp/9996/ws/p2p/12D3KooWPisGn7JhooWhggndz25WM7vQ2JmA121EV8jUDQ5xMovJ"
)
cd ${GITHUB_WORKSPACE}/aqua-tests
for PEER_ADDR in ${PEERS[@]}; do
echo "Checking ${PEER_ADDR}"
if ! npx aqua remote get_interface --addr ${PEER_ADDR} --id registry | jq -ec 'has("function_signatures")'; then
exit 1
fi
done

View File

@ -89,6 +89,13 @@ jobs:
working-directory: aqua-tests
flags: "--save-dev"
- name: Set aqua version in fluence.yml
if: inputs.aqua-version != 'null'
env:
NPM_CONFIG_REGISTRY: "https://npm.fluence.dev"
run: |
sed -i 's/"@fluencelabs\/aqua": .*/"@fluencelabs\/aqua": ${{ inputs.aqua-version }}/g' fluence.yaml
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
@ -135,14 +142,18 @@ jobs:
working-directory: aqua-tests
- name: Wait for registry to be deployed
uses: Wandalen/wretry.action@v1.0.36
env:
PEER_ADDR: /ip4/127.0.0.1/tcp/9991/ws/p2p/12D3KooWBM3SdXWqGaawQDGQ6JprtwswEg3FWGvGhmgmMez1vRbR
uses: nick-fields/retry@v2
with:
command: npx aqua remote get_interface --addr ${PEER_ADDR} --id registry | jq -ec 'has("function_signatures")'
attempt_limit: 5
attempt_delay: 10000
current_path: ${{ github.workspace}}/aqua-tests
timeout_seconds: 20
max_attempts: 5
shell: bash
command: ${{ github.workspace }}/.github/check-registry.sh
- name: Install fluence-cli dependencies
env:
FLUENCE_USER_DIR: "${{ github.workspace }}/tmp/.fluence"
run: npx fluence dep i --no-input
working-directory: aqua-tests
- name: Print Fluence CLI version
run: pytest -s test_fluence_cli_version.py

File diff suppressed because it is too large Load Diff

View File

@ -28,6 +28,7 @@
},
"homepage": "https://github.com/fluencelabs/registry",
"devDependencies": {
"@fluencelabs/aqua": "0.9.3",
"@fluencelabs/cli": "0.2.34",
"@fluencelabs/fluence-network-environment": "1.0.13"
}