git.delta.rocks / unique-network / refs/commits / bfaa0d0e6f89

difftreelog

Merge pull request #720 from UniqueNetwork/ci/node-update-fix

Yaroslav Bolyukin2022-11-24parents: #547c821 #5fcc324.patch.diff
in: master
Node update fix

5 files changed

modified.docker/docker-compose.tmp-node.j2diffbeforeafterboth
23 read_only: true23 read_only: true
24 expose:24 expose:
25 - 994425 - 9944
26 - 9945
26 - 993327 - 9933
27 - 984428 - 9844
28 ports:29 ports:
29 - 127.0.0.1:9944:994430 - 127.0.0.1:9944:9944
31 - 127.0.0.1:9945:9945
30 - 127.0.0.1:9933:993332 - 127.0.0.1:9933:9933
31 - 127.0.0.1:9844:984433 - 127.0.0.1:9844:9844
32 logging:34 logging:
modified.docker/forkless-config/launch-config-forkless-data.j2diffbeforeafterboth
107 "--rpc-cors=all",107 "--rpc-cors=all",
108 "--unsafe-rpc-external",108 "--unsafe-rpc-external",
109 "--unsafe-ws-external",109 "--unsafe-ws-external",
110 "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug"110 "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",
111 "--",
112 "--port=31335",
113 "--ws-port=9745",
114 "--rpc-port=9734"
111 ]115 ]
112 },116 },
113 {117 {
modified.docker/forkless-config/launch-config-forkless-nodata.j2diffbeforeafterboth
102 "--unsafe-rpc-external",102 "--unsafe-rpc-external",
103 "--unsafe-ws-external",103 "--unsafe-ws-external",
104 "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",104 "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",
105 "--ws-max-connections=1000"105 "--ws-max-connections=1000",
106 "--",
107 "--port=31335",
108 "--ws-port=9745",
109 "--rpc-port=9734"
106 ]110 ]
107 },111 },
108 {112 {
115 "--unsafe-rpc-external",119 "--unsafe-rpc-external",
116 "--unsafe-ws-external",120 "--unsafe-ws-external",
117 "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",121 "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",
118 "--ws-max-connections=1000"122 "--ws-max-connections=1000",
123 "--",
124 "--port=31337",
125 "--ws-port=9747",
126 "--rpc-port=9737"
119 ]127 ]
120 }128 }
121 ]129 ]
modified.docker/forkless-config/launch-config-node-update-only-v3.j2diffbeforeafterboth
102 "--unsafe-rpc-external",102 "--unsafe-rpc-external",
103 "--unsafe-ws-external",103 "--unsafe-ws-external",
104 "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",104 "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",
105 "--ws-max-connections=1000"105 "--ws-max-connections=1000",
106 "--",
107 "--port=31335",
108 "--ws-port=9745",
109 "--rpc-port=9734"
106 ]110 ]
107 },111 },
108 {112 {
modified.github/workflows/node-only-update.ymldiffbeforeafterboth
76 with:76 with:
77 template: .docker/docker-compose.tmp-node.j277 template: .docker/docker-compose.tmp-node.j2
78 output_file: .docker/docker-compose.node.${{ matrix.network }}.yml78 output_file: .docker/docker-compose.node.${{ matrix.network }}.yml
79 variables: |79 variables: |
80 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git80 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
81 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}81 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
82 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}82 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
83 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }} 83 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}
84 POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}84 POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}
85 MAINNET_TAG=${{ matrix.mainnet_tag }}85 MAINNET_TAG=${{ matrix.mainnet_tag }}
86 MAINNET_BRANCH=${{ matrix.mainnet_branch }}86 MAINNET_BRANCH=${{ matrix.mainnet_branch }}
87 NETWORK=${{ matrix.network }}87 NETWORK=${{ matrix.network }}
88 BRANCH=${{ github.head_ref }}88 BRANCH=${{ github.head_ref }}
8989
90 - name: Show build configuration90 - name: Show build configuration
91 run: cat .docker/docker-compose.node.${{ matrix.network }}.yml91 run: cat .docker/docker-compose.node.${{ matrix.network }}.yml
181 path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-before-*.json # Path to test results181 path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-before-*.json # Path to test results
182 reporter: mochawesome-json182 reporter: mochawesome-json
183 fail-on-error: 'false'183 fail-on-error: 'false'
184 token: ${{ secrets.GITHUB_TOKEN }}
184185
185 # TODO uncomment thease steps after the merge186 # TODO uncomment thease steps after the merge
186 #- name: Run Parallel tests before Node Parachain upgrade187 #- name: Run Parallel tests before Node Parachain upgrade
223 224
224 - name: Send SIGUSR1 to polkadot-launch process225 - name: Send SIGUSR1 to polkadot-launch process
225 if: success() || failure()226 if: success() || failure()
226 run: |227 run: |
227 #Get PID of polkadot-launch228 #Get PID of polkadot-launch
228 ContainerID=$(docker ps -aqf "name=node-parachain")229 ContainerID=$(docker ps -aqf "name=node-parachain")
229 PID=$(docker exec node-parachain pidof 'polkadot-launch')230 PID=$(docker exec node-parachain pidof 'polkadot-launch')
230 sleep 30s231 sleep 30s
231 echo -e "Show logs of node-parachain container.\n"232 echo -e "\n"
232 docker logs ${ContainerID}233 echo -e "Restart polkadot-launch process: $PID\n"
233 echo -e "\n"
234 echo -e "Restart polkadot-launch process: $PID\n"234 docker exec node-parachain kill -SIGUSR1 ${PID}
235 docker exec node-parachain kill -SIGUSR1 ${PID}235 echo "SIGUSR1 sent to Polkadot-launch PID: $PID"
236 sleep 60s
236 echo "SIGUSR1 sent to Polkadot-launch PID: $PID"237 echo -e "Show logs of node-parachain container.\n"
237 docker logs ${ContainerID}238 docker logs ${ContainerID}
238 239
239 - name: Get chain logs in case of docker image crashed after Polkadot Launch restart240 - name: Get chain logs in case of docker image crashed after Polkadot Launch restart
240 if: failure() # run this step only at failure241 if: failure() # run this step only at failure
241 run: |242 run: |
242 docker exec node-parachain cat /polkadot-launch/9944.log243 docker exec node-parachain tail -n 1000 /polkadot-launch/9944.log
243 docker exec node-parachain cat /polkadot-launch/9945.log244 docker exec node-parachain tail -n 1000 /polkadot-launch/9945.log
244 docker exec node-parachain cat /polkadot-launch/alice.log245 docker exec node-parachain tail -n 1000 /polkadot-launch/alice.log
245 docker exec node-parachain cat /polkadot-launch/eve.log246
246 docker exec node-parachain cat /polkadot-launch/dave.log247 - name: copy chain log files from container to the host
247 docker exec node-parachain cat /polkadot-launch/charlie.log 248 if: success() || failure() # run this step even if previous step failed
249 run: |
250 mkdir -p /tmp/node-only-update
251 docker cp node-parachain:/polkadot-launch/9944.log /tmp/node-only-update/
252 docker cp node-parachain:/polkadot-launch/9945.log /tmp/node-only-update/
253 docker cp node-parachain:/polkadot-launch/alice.log /tmp/node-only-update/
254
255 - name: Upload chain log files
256 if: success() || failure()
257 uses: actions/upload-artifact@v3
258 with:
259 name: node-only-update-chain-logs
260 path: /tmp/node-only-update/
261 if-no-files-found: warn
248262
249 - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.263 - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.
250 if: success()264 if: success()
292 shell: bash306 shell: bash
293 307
294 ## TODO: Remove next two blocks before switch to Parrallel & Sequental tests. Uncoment commented blocks.308 ## TODO: Remove next two blocks before switch to Parrallel & Sequental tests. Uncoment commented blocks.
295 - name: Run tests after Node Parachain upgrade
296 working-directory: ${{ matrix.mainnet_branch }}/tests
297 run: |
298 yarn install
299 yarn add mochawesome
300 node scripts/readyness.js
301 echo "Ready to start tests"
302 yarn polkadot-types
303 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-after-${NOW}
304 env:
305 RPC_URL: http://127.0.0.1:9933/
306
307 - name: Test Report After Node upgrade309 - name: Run tests after Node Parachain upgrade
308 uses: phoenix-actions/test-reporting@v8
309 id: test-report-after
310 if: success() || failure() # run this step even if previous step failed310 if: success() || failure() # run this step even if previous step failed
311 with:
312 name: Tests after node upgrade ${{ matrix.network }} # Name of the check run which will be created311 working-directory: ${{ matrix.mainnet_branch }}/tests
313 path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-after-*.json # Path to test results312 run: |
313 yarn install
314 yarn add mochawesome
315 node scripts/readyness.js
316 echo "Ready to start tests"
317 yarn polkadot-types
318 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-after-${NOW}
314 reporter: mochawesome-json319 env:
315 fail-on-error: 'false'320 RPC_URL: http://127.0.0.1:9933/
321
322 # - name: Test Report After Node upgrade
323 # uses: phoenix-actions/test-reporting@v8
324 # id: test-report-after
325 # if: success() || failure() # run this step even if previous step failed
326 # with:
327 # name: Tests after node upgrade ${{ matrix.network }} # Name of the check run which will be created
328 # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-after-*.json # Path to test results
329 # reporter: mochawesome-json
330 # fail-on-error: 'false'
331 # token: ${{ secrets.GITHUB_TOKEN }}
316332
317 # TODO uncomment thease steps after the merge333 # TODO uncomment thease steps after the merge
318 #- name: Run Parallel tests after Node Parachain upgrade334 #- name: Run Parallel tests after Node Parachain upgrade