From bfaa0d0e6f89afe32a1ba71e10d069d415b67091 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Thu, 24 Nov 2022 12:31:19 +0000 Subject: [PATCH] Merge pull request #720 from UniqueNetwork/ci/node-update-fix Node update fix --- --- a/.docker/docker-compose.tmp-node.j2 +++ b/.docker/docker-compose.tmp-node.j2 @@ -23,10 +23,12 @@ read_only: true expose: - 9944 + - 9945 - 9933 - 9844 ports: - 127.0.0.1:9944:9944 + - 127.0.0.1:9945:9945 - 127.0.0.1:9933:9933 - 127.0.0.1:9844:9844 logging: --- a/.docker/forkless-config/launch-config-forkless-data.j2 +++ b/.docker/forkless-config/launch-config-forkless-data.j2 @@ -107,7 +107,11 @@ "--rpc-cors=all", "--unsafe-rpc-external", "--unsafe-ws-external", - "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug" + "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", + "--", + "--port=31335", + "--ws-port=9745", + "--rpc-port=9734" ] }, { --- a/.docker/forkless-config/launch-config-forkless-nodata.j2 +++ b/.docker/forkless-config/launch-config-forkless-nodata.j2 @@ -102,7 +102,11 @@ "--unsafe-rpc-external", "--unsafe-ws-external", "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", - "--ws-max-connections=1000" + "--ws-max-connections=1000", + "--", + "--port=31335", + "--ws-port=9745", + "--rpc-port=9734" ] }, { @@ -115,7 +119,11 @@ "--unsafe-rpc-external", "--unsafe-ws-external", "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", - "--ws-max-connections=1000" + "--ws-max-connections=1000", + "--", + "--port=31337", + "--ws-port=9747", + "--rpc-port=9737" ] } ] --- a/.docker/forkless-config/launch-config-node-update-only-v3.j2 +++ b/.docker/forkless-config/launch-config-node-update-only-v3.j2 @@ -102,7 +102,11 @@ "--unsafe-rpc-external", "--unsafe-ws-external", "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", - "--ws-max-connections=1000" + "--ws-max-connections=1000", + "--", + "--port=31335", + "--ws-port=9745", + "--rpc-port=9734" ] }, { --- a/.github/workflows/node-only-update.yml +++ b/.github/workflows/node-only-update.yml @@ -80,7 +80,7 @@ REPO_URL=${{ github.server_url }}/${{ github.repository }}.git RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }} - POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }} + POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }} POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }} MAINNET_TAG=${{ matrix.mainnet_tag }} MAINNET_BRANCH=${{ matrix.mainnet_branch }} @@ -181,6 +181,7 @@ path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-before-*.json # Path to test results reporter: mochawesome-json fail-on-error: 'false' + token: ${{ secrets.GITHUB_TOKEN }} # TODO uncomment thease steps after the merge #- name: Run Parallel tests before Node Parachain upgrade @@ -220,7 +221,7 @@ # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-sequential-*.json # Path to test results # reporter: mochawesome-json # fail-on-error: 'false' - + - name: Send SIGUSR1 to polkadot-launch process if: success() || failure() run: | @@ -228,23 +229,36 @@ ContainerID=$(docker ps -aqf "name=node-parachain") PID=$(docker exec node-parachain pidof 'polkadot-launch') sleep 30s - echo -e "Show logs of node-parachain container.\n" - docker logs ${ContainerID} echo -e "\n" echo -e "Restart polkadot-launch process: $PID\n" docker exec node-parachain kill -SIGUSR1 ${PID} echo "SIGUSR1 sent to Polkadot-launch PID: $PID" + sleep 60s + echo -e "Show logs of node-parachain container.\n" docker logs ${ContainerID} - + - name: Get chain logs in case of docker image crashed after Polkadot Launch restart if: failure() # run this step only at failure run: | - docker exec node-parachain cat /polkadot-launch/9944.log - docker exec node-parachain cat /polkadot-launch/9945.log - docker exec node-parachain cat /polkadot-launch/alice.log - docker exec node-parachain cat /polkadot-launch/eve.log - docker exec node-parachain cat /polkadot-launch/dave.log - docker exec node-parachain cat /polkadot-launch/charlie.log + docker exec node-parachain tail -n 1000 /polkadot-launch/9944.log + docker exec node-parachain tail -n 1000 /polkadot-launch/9945.log + docker exec node-parachain tail -n 1000 /polkadot-launch/alice.log + + - name: copy chain log files from container to the host + if: success() || failure() # run this step even if previous step failed + run: | + mkdir -p /tmp/node-only-update + docker cp node-parachain:/polkadot-launch/9944.log /tmp/node-only-update/ + docker cp node-parachain:/polkadot-launch/9945.log /tmp/node-only-update/ + docker cp node-parachain:/polkadot-launch/alice.log /tmp/node-only-update/ + + - name: Upload chain log files + if: success() || failure() + uses: actions/upload-artifact@v3 + with: + name: node-only-update-chain-logs + path: /tmp/node-only-update/ + if-no-files-found: warn - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade. if: success() @@ -290,9 +304,10 @@ echo "Halting script" exit 0 shell: bash - + ## TODO: Remove next two blocks before switch to Parrallel & Sequental tests. Uncoment commented blocks. - name: Run tests after Node Parachain upgrade + if: success() || failure() # run this step even if previous step failed working-directory: ${{ matrix.mainnet_branch }}/tests run: | yarn install @@ -304,15 +319,16 @@ env: RPC_URL: http://127.0.0.1:9933/ - - name: Test Report After Node upgrade - uses: phoenix-actions/test-reporting@v8 - id: test-report-after - if: success() || failure() # run this step even if previous step failed - with: - name: Tests after node upgrade ${{ matrix.network }} # Name of the check run which will be created - path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-after-*.json # Path to test results - reporter: mochawesome-json - fail-on-error: 'false' + # - name: Test Report After Node upgrade + # uses: phoenix-actions/test-reporting@v8 + # id: test-report-after + # if: success() || failure() # run this step even if previous step failed + # with: + # name: Tests after node upgrade ${{ matrix.network }} # Name of the check run which will be created + # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-after-*.json # Path to test results + # reporter: mochawesome-json + # fail-on-error: 'false' + # token: ${{ secrets.GITHUB_TOKEN }} # TODO uncomment thease steps after the merge #- name: Run Parallel tests after Node Parachain upgrade @@ -336,7 +352,7 @@ # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results # reporter: mochawesome-json # fail-on-error: 'false' - + #- name: Run Sequential tests after Node Parachain upgrade # if: success() || failure() # working-directory: ${{ matrix.mainnet_branch }}/tests -- gitstuff