git.delta.rocks / unique-network / refs/commits / 4f6ef612fc53

difftreelog

Merge branch 'develop' into CI-43-try-runtime

Alexander Aksenov2022-08-18parents: #d49036f #032326e.patch.diff
in: master

10 files changed

modified.docker/Dockerfile-try-runtimediffbeforeafterboth
--- a/.docker/Dockerfile-try-runtime
+++ b/.docker/Dockerfile-try-runtime
@@ -34,17 +34,12 @@
 
 ARG PROFILE=release
 ARG FEATURE=
-ARG REPO_URL=
-ARG BRANCH=
 ARG FORK_FROM=
 
+COPY . /unique_parachain
 WORKDIR /unique_parachain
 
 
 RUN echo "Requested features: $FEATURE\n" && \
     echo "Fork from: $FORK_FROM\n" && \
-    echo "Repositry URL: $REPO_URL\n" && \
-    echo "Branch: $BRANCH\n" && \
-    git clone $REPO_URL -b $BRANCH . && \
     cargo run --features=$FEATURE --release -- try-runtime on-runtime-upgrade live --uri $FORK_FROM
- 
\ No newline at end of file
modified.docker/docker-compose.try-runtime.j2diffbeforeafterboth
--- a/.docker/docker-compose.try-runtime.j2
+++ b/.docker/docker-compose.try-runtime.j2
@@ -5,8 +5,6 @@
     build:
       args:
         - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}"
-        - "BRANCH={{ BRANCH }}"
-        - "REPO_URL={{ REPO_URL }}"
         - "FEATURE={{ FEATURE }}"
         - "FORK_FROM={{ FORK_FROM }}"
 
modified.github/workflows/build-test-master.ymldiffbeforeafterboth
before · .github/workflows/build-test-master.yml
1name: MASTER - Build & Test23# Controls when the action will run.4on:5 # Triggers the workflow on push or pull request events but only for the master branch6  pull_request:7    branches:8      - master9    types:10      - opened11      - reopened12      - synchronize #commit(s) pushed to the pull request13      - ready_for_review1415  # Allows you to run this workflow manually from the Actions tab16  workflow_dispatch:1718#Define Workflow variables19env:20  REPO_URL: ${{ github.server_url }}/${{ github.repository }}2122# A workflow run is made up of one or more jobs that can run sequentially or in parallel23jobs:2425  master-build-and-test:26    # The type of runner that the job will run on27    runs-on: self-hosted-ci282930    name: ${{ matrix.network }} - Build and Test3132    continue-on-error: true         #Do not stop testing of matrix runs failed.3334    strategy:35      matrix:36        include:37          - network: "Opal"38            features: "opal-runtime"39          - network: "Quartz"40            features: "quartz-runtime"41          - network: "Unique"42            features: "unique-runtime"4344    steps:45      - name: Skip if pull request is in Draft46        # `if: github.event.pull_request.draft == true` should be kept here, at47        # the step level, rather than at the job level. The latter is not48        # recommended because when the PR is moved from "Draft" to "Ready to49        # review" the workflow will immediately be passing (since it was skipped),50        # even though it hasn't actually ran, since it takes a few seconds for51        # the workflow to start. This is also disclosed in:52        # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/1753        # That scenario would open an opportunity for the check to be bypassed:54        # 1. Get your PR approved55        # 2. Move it to Draft56        # 3. Push whatever commits you want57        # 4. Move it to "Ready for review"; now the workflow is passing (it was58        #    skipped) and "Check reviews" is also passing (it won't be updated59        #    until the workflow is finished)60        if: github.event.pull_request.draft == true61        run: exit 16263      - name: Clean Workspace64        uses: AutoModality/action-clean@v1.1.06566      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it67      - uses: actions/checkout@v368        with:69          ref: ${{ github.head_ref }}7071      - name: Read .env file72        uses: xom9ikk/dotenv@v1.0.27374      - name: Generate ENV related extend file for docker-compose75        uses: cuchi/jinja2-action@v1.2.076        with:77          template: .docker/docker-compose.tmp-master.j278          output_file: .docker/docker-compose.${{ matrix.network }}.yml79          variables: |80            REPO_URL=${{ github.server_url }}/${{ github.repository }}.git81            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}82            POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}83            FEATURE=${{ matrix.features }}84            BRANCH=${{ github.head_ref }}8586      - name: Show build configuration87        run: cat .docker/docker-compose.${{ matrix.network }}.yml8889      - name: Build the stack90        run: docker-compose -f ".docker/docker-compose-master.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build9192      - uses: actions/setup-node@v393        with:94          node-version: 169596      - name: Run tests97        run: |98          cd tests99          yarn install100          yarn add mochawesome101          echo "Ready to start tests"102          node scripts/readyness.js103          NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}104        env:105          RPC_URL: http://127.0.0.1:9933/106107      - name: Test Report108        uses: phoenix-actions/test-reporting@v8109        id: test-report110        if: success() || failure()    # run this step even if previous step failed111        with:112          name: Tests ${{ matrix.network }}            # Name of the check run which will be created113          path: tests/mochawesome-report/test-*.json    # Path to test results114          reporter: mochawesome-json115          fail-on-error: 'false'116117      - name: Read output variables118        run: |119          echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"120121      - name: Stop running containers122        if: always()                   # run this step always123        run: docker-compose -f ".docker/docker-compose-master.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down
after · .github/workflows/build-test-master.yml
1name: Yarn test para23# Controls when the action will run.4on:5 # Triggers the workflow on push or pull request events but only for the master branch6  pull_request:7    branches:8      - master9    types:10      - opened11      - reopened12      - synchronize #commit(s) pushed to the pull request13      - ready_for_review1415  # Allows you to run this workflow manually from the Actions tab16  workflow_dispatch:1718#Define Workflow variables19env:20  REPO_URL: ${{ github.server_url }}/${{ github.repository }}2122concurrency: 23  group: ${{ github.workflow }}-${{ github.ref }}24  cancel-in-progress: true2526# A workflow run is made up of one or more jobs that can run sequentially or in parallel27jobs:2829  master-build-and-test:30    # The type of runner that the job will run on31    runs-on: [self-hosted-ci,large]32    timeout-minutes: 13803334    name: ${{ matrix.network }}3536    continue-on-error: true         #Do not stop testing of matrix runs failed.3738    strategy:39      matrix:40        include:41          - network: "Opal"42            features: "opal-runtime"43          - network: "Quartz"44            features: "quartz-runtime"45          - network: "Unique"46            features: "unique-runtime"4748    steps:49      - name: Skip if pull request is in Draft50        # `if: github.event.pull_request.draft == true` should be kept here, at51        # the step level, rather than at the job level. The latter is not52        # recommended because when the PR is moved from "Draft" to "Ready to53        # review" the workflow will immediately be passing (since it was skipped),54        # even though it hasn't actually ran, since it takes a few seconds for55        # the workflow to start. This is also disclosed in:56        # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/1757        # That scenario would open an opportunity for the check to be bypassed:58        # 1. Get your PR approved59        # 2. Move it to Draft60        # 3. Push whatever commits you want61        # 4. Move it to "Ready for review"; now the workflow is passing (it was62        #    skipped) and "Check reviews" is also passing (it won't be updated63        #    until the workflow is finished)64        if: github.event.pull_request.draft == true65        run: exit 16667      - name: Clean Workspace68        uses: AutoModality/action-clean@v1.1.06970      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it71      - uses: actions/checkout@v372        with:73          ref: ${{ github.head_ref }}7475      - name: Read .env file76        uses: xom9ikk/dotenv@v1.0.27778      - name: Generate ENV related extend file for docker-compose79        uses: cuchi/jinja2-action@v1.2.080        with:81          template: .docker/docker-compose.tmp-master.j282          output_file: .docker/docker-compose.${{ matrix.network }}.yml83          variables: |84            REPO_URL=${{ github.server_url }}/${{ github.repository }}.git85            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}86            POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}87            FEATURE=${{ matrix.features }}88            BRANCH=${{ github.head_ref }}8990      - name: Show build configuration91        run: cat .docker/docker-compose.${{ matrix.network }}.yml9293      - name: Build the stack94        run: docker-compose -f ".docker/docker-compose-master.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build9596      - uses: actions/setup-node@v397        with:98          node-version: 1699100      - name: Run tests101        run: |102          cd tests103          yarn install104          yarn add mochawesome105          echo "Ready to start tests"106          node scripts/readyness.js107          NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}108        env:109          RPC_URL: http://127.0.0.1:9933/110111      - name: Test Report112        uses: phoenix-actions/test-reporting@v8113        id: test-report114        if: success() || failure()    # run this step even if previous step failed115        with:116          name: Tests ${{ matrix.network }}            # Name of the check run which will be created117          path: tests/mochawesome-report/test-*.json    # Path to test results118          reporter: mochawesome-json119          fail-on-error: 'false'120121      - name: Read output variables122        run: |123          echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"124125      - name: Stop running containers126        if: always()                   # run this step always127        run: docker-compose -f ".docker/docker-compose-master.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down
modified.github/workflows/codestyle.ymldiffbeforeafterboth
--- a/.github/workflows/codestyle.yml
+++ b/.github/workflows/codestyle.yml
@@ -10,6 +10,10 @@
       - synchronize
       - ready_for_review
 
+concurrency: 
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
 jobs:
   rustfmt:
     runs-on: self-hosted-ci
@@ -47,7 +51,7 @@
   clippy:
     if: ${{ false }}
     runs-on: self-hosted-ci
-
+      
     steps:
       - name: Skip if pull request is in Draft
         # `if: github.event.pull_request.draft == true` should be kept here, at
modified.github/workflows/fork-update-withdata.ymldiffbeforeafterboth
--- a/.github/workflows/fork-update-withdata.yml
+++ b/.github/workflows/fork-update-withdata.yml
@@ -1,4 +1,4 @@
-name: Fork Parachain update with data
+name: Upgrade replica
 
 # Controls when the action will run.
 on:
@@ -19,14 +19,19 @@
 env:
   REPO_URL: ${{ github.server_url }}/${{ github.repository }}
 
+concurrency: 
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
 # A workflow run is made up of one or more jobs that can run sequentially or in parallel
 jobs:
 
   fork-update-withdata:
     # The type of runner that the job will run on
-    runs-on: self-hosted-ci
+    runs-on: [self-hosted-ci,large]
+    timeout-minutes: 1380
 
-    name: ${{ matrix.network }} Fork Parachain with data
+    name: ${{ matrix.network }}
 
     continue-on-error: true         #Do not stop testing of matrix runs failed.  As it decided during PR review - it required 50/50& Let's check it with false.
 
modified.github/workflows/forkless-update-nodata.ymldiffbeforeafterboth
--- a/.github/workflows/forkless-update-nodata.yml
+++ b/.github/workflows/forkless-update-nodata.yml
@@ -1,4 +1,4 @@
-name: Forkless Parachain update with no data
+name: Upgrade nodata
 
 # Controls when the action will run.
 on:
@@ -19,6 +19,10 @@
 env:
   REPO_URL: ${{ github.server_url }}/${{ github.repository }}
 
+concurrency: 
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
 # A workflow run is made up of one or more jobs that can run sequentially or in parallel
 jobs:
 
@@ -29,6 +33,7 @@
     runs-on: self-hosted-ci
     outputs:
       matrix: ${{ steps.create_matrix.outputs.matrix }}
+
     steps:
       
       - name: Clean Workspace
@@ -56,9 +61,13 @@
   forkless-update-nodata:
     needs: prepare-execution-marix
     # The type of runner that the job will run on
-    runs-on: self-hosted-ci
+    runs-on: [self-hosted-ci,medium]
+    
+    
 
-    name: ${{ matrix.network }} - Forkless Parachain Upgrade NO data
+    timeout-minutes: 1380
+
+    name: ${{ matrix.network }}
 
     continue-on-error: true         #Do not stop testing of matrix runs failed.  As it decided during PR review - it required 50/50& Let's check it with false.
 
modified.github/workflows/node_build_test.ymldiffbeforeafterboth
--- a/.github/workflows/node_build_test.yml
+++ b/.github/workflows/node_build_test.yml
@@ -1,4 +1,4 @@
-name: Develop - Build & test
+name: Yarn test dev
 
 # Controls when the action will run.
 on:
@@ -19,13 +19,18 @@
 env:
   REPO_URL: ${{ github.server_url }}/${{ github.repository }}
 
+concurrency: 
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
 # A workflow run is made up of one or more jobs that can run sequentially or in parallel
 jobs:
   dev_build_test:
     # The type of runner that the job will run on
-    runs-on: self-hosted-ci
+    runs-on: [self-hosted-ci,medium]
+    timeout-minutes: 1380
 
-    name: Build Container, Spin it Up an test
+    name: ${{ matrix.network }}
 
     continue-on-error: true         #Do not stop testing of matrix runs failed.  As it decided during PR review - it required 50/50& Let's check it with false.
 
modified.github/workflows/tests_codestyle.ymldiffbeforeafterboth
--- a/.github/workflows/tests_codestyle.yml
+++ b/.github/workflows/tests_codestyle.yml
@@ -10,6 +10,10 @@
       - synchronize
       - ready_for_review
 
+concurrency: 
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
 jobs:
   code_style:
     runs-on: self-hosted-ci
modified.github/workflows/try-runtime.ymldiffbeforeafterboth
--- a/.github/workflows/try-runtime.yml
+++ b/.github/workflows/try-runtime.yml
@@ -1,4 +1,4 @@
-name: Try Runtime
+name: try-runtime
 
 # Controls when the action will run.
 on:
@@ -19,26 +19,30 @@
 env:
   REPO_URL: ${{ github.server_url }}/${{ github.repository }}
 
+concurrency: 
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
 # A workflow run is made up of one or more jobs that can run sequentially or in parallel
 jobs:
   try-runtime:
     # The type of runner that the job will run on
     runs-on: self-hosted-ci
-
-    name: ${{ matrix.network }} - Try-runtime
+    
+    name: ${{ matrix.network }}
 
     continue-on-error: true         #Do not stop testing of matrix runs failed.  As it decided during PR review - it required 50/50& Let's check it with false.
 
     strategy:
       matrix:
         include:
-          - network: Opal
+          - network: opal
             features: try-runtime,opal-runtime
             fork_from_address: wss://eu-ws-opal.unique.network:443
-          - network: Quartz
+          - network: quartz
             features: try-runtime,quartz-runtime
             fork_from_address: wss://eu-ws-quartz.unique.network:443
-          - network: Unique
+          - network: unique
             features: try-runtime,unique-runtime
             fork_from_address: wss://eu-ws.unique.network:443
 
@@ -79,37 +83,15 @@
           template: .docker/docker-compose.try-runtime.j2
           output_file: .docker/docker-compose.try-runtime.${{ matrix.network }}.yml
           variables: |
-            REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
             RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
             FEATURE=${{ matrix.features }}
-            BRANCH=${{ github.head_ref }}
             FORK_FROM=${{ matrix.fork_from_address }}
 
       - name: Show build configuration
         run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml
 
-
       - name: Build the stack
-        run: docker-compose -f ".docker/docker-compose-try-runtime.yml" -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up -d --build  --force-recreate --timeout 300
-
-
-      - name: Collect Docker Logs
-        if: success() || failure()
-        uses: jwalton/gh-docker-logs@v2.2.0
-        with:
-          dest: './try-runtime-logs.${{ matrix.features }}'
-          images: 'try-runtime' 
-
-      - name: Tar logs
-        if: success() || failure()
-        run: tar cvzf ./try-runtime-logs.${{ matrix.features }}.tgz ./try-runtime-logs.${{ matrix.features }}
-
-      - name: Upload logs to GitHub
-        if: success() || failure()
-        uses: actions/upload-artifact@master
-        with:
-          name: try-runtime-logs.${{ matrix.features }}.tgz
-          path: ./try-runtime-logs.${{ matrix.features }}.tgz
+        run: docker-compose -f ".docker/docker-compose-try-runtime.yml" -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up -d --build  --force-recreate --timeout 300 --remove-orphans
 
       - name: Stop running containers
         if: always()                   # run this step always
modifiednode/cli/Cargo.tomldiffbeforeafterboth
--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -266,6 +266,7 @@
 
 [dependencies.opal-runtime]
 path = '../../runtime/opal'
+optional = true
 
 [dependencies.up-data-structs]
 path = "../../primitives/data-structs"
@@ -320,11 +321,15 @@
 rmrk-rpc = { path = "../../primitives/rmrk-rpc" }
 
 [features]
-default = []
+default = ["opal-runtime"]
 runtime-benchmarks = [
     'unique-runtime?/runtime-benchmarks',
     'quartz-runtime?/runtime-benchmarks',
     'opal-runtime/runtime-benchmarks',
     'polkadot-service/runtime-benchmarks',
 ]
-try-runtime = []
+try-runtime = [
+    'unique-runtime?/try-runtime',
+    'quartz-runtime?/try-runtime',
+    'opal-runtime?/try-runtime',
+]