Skip to content

Commit

Permalink
[PICA-34] - Upgrade to polkadot v0.9.30 (#2913)
Browse files Browse the repository at this point in the history
#### Intro

Upgrade polkadot from v0.9.27 to v0.9.30 as a checkpoint, then to
v0.9.33 (latest version without workspace dependencies)

Require ComposableFi/composable-ibc#176 to be merged
first.

#### Migrations
- v0.9.28
    - [x] paritytech/polkadot#5582
        - Nomination not present in our runtimes
- v0.9.29
    - [x] paritytech/substrate#12095
        - Nomination not present in our runtimes
- v0.9.30
    - [x] paritytech/substrate#12034
        - BagList/Staking not present in our runtimes
    - [x] paritytech/polkadot#5930
        - Nomination/BagList/Staking not present in our runtimes
    - [x] paritytech/substrate#12230
        - Staking not present in our runtimes
    - [x] paritytech/polkadot#5996
        - Staking not present in our runtimes
    - [x] paritytech/substrate#12083
        - Contracts not present in our runtimes

Signed-off-by: cor <cor@pruijs.dev>
Co-authored-by: cor <cor@pruijs.dev>
  • Loading branch information
hussein-aitlahcen and cor authored Jan 18, 2023
1 parent 4034f5c commit 2ec221a
Show file tree
Hide file tree
Showing 283 changed files with 12,185 additions and 8,568 deletions.
137 changes: 42 additions & 95 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ jobs:
command: nix -- build .#spell-check
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"

# This isn't templated, since checkout needs to happen before templating occurs.
# This isn't templated, since checkout needs to happen before templating occurs.
docs-check:
name: "Docs check"
runs-on:
Expand Down Expand Up @@ -318,19 +318,19 @@ jobs:
# Marker status code in case of network failure.
STATUS_TRANSIENT_FAILURE=200
# Maximum retries in case of network failures.
RETRIES=5
CMD="cachix watch-exec --jobs 16 --compression-level $CACHIX_COMPRESSION_LEVEL composable-community nix -- build .#docs-static --no-update-lock-file --show-trace -L 2> >(tee -a $LOG_FILE >&2)"
RETRIES=5
CMD="cachix watch-exec --jobs 16 --compression-level $CACHIX_COMPRESSION_LEVEL composable-community nix -- build .#docs-static --no-update-lock-file --show-trace -L 2> >(tee -a $LOG_FILE >&2)"
# Marker that a network error occurred.
BAD="HTTP error 200 ('')"
BAD="HTTP error 200 ('')"
LOG_FILE=/tmp/out.log
function run() {
eval "${CMD?}"
STATUS_CODE=$?
if [[ $STATUS_CODE -ne 0 ]] ; then
C=$(grep -c "HTTP error 200" $LOG_FILE)
if [[ $C -gt 0 ]]; then
STATUS_CODE=$STATUS_TRANSIENT_FAILURE
if [[ $C -gt 0 ]]; then
STATUS_CODE=$STATUS_TRANSIENT_FAILURE
fi
fi
}
Expand All @@ -347,7 +347,7 @@ jobs:
((try=try+1))
done
exit $((STATUS_CODE))
exit $((STATUS_CODE))
shell: "bash"
working-directory: ./docs
- uses: FirebaseExtended/action-hosting-deploy@0f248036885ae672f78587669fa2923f0ef6cac2
Expand Down Expand Up @@ -539,7 +539,7 @@ jobs:
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: |
PREVIEW_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
PREVIEW_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
echo "preview-url=${PREVIEW_URL}" >> $GITHUB_OUTPUT
id: deploy
- name: Comment PR
Expand Down Expand Up @@ -652,80 +652,27 @@ jobs:
command: nix -- run .#benchmarks-once-${{ matrix.runtime }}
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"

check-simnode:
name: "Simnode"
needs: package-simnode-tests
runs-on:
- self-hosted
- linux
- x64
- sre
concurrency:
group: check-simnode-${{ matrix.runtime }}-${{ github.ref }}
cancel-in-progress: true
strategy:
matrix:
runtime: [picasso, composable]
container:
image: niteo/nixpkgs-nixos-22.05:316b762afdb9e142a803f29c49a88b4a47db80ee
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.DEPLOY_DALI }}
export_default_credentials: true
- uses: "./.github/templates/watch-exec"
with:
pre-run: |
FILENAME=$(date -d yesterday +'%m-%d-%Y').zip
GS_BUCKET="${{ matrix.runtime }}-data-store"
gsutil cp gs://$GS_BUCKET/"$FILENAME" .
unzip -o "$FILENAME" -d /tmp/db
command: nix -- run .#simnode-tests-${{ matrix.runtime }}
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
nix-env: nixpkgs.python3 nixpkgs.unzip

local-integration-tests:
name: "Local integration tests"
runs-on:
- self-hosted
- linux
- x64
- sre
concurrency:
group: local-integration-tests-${{ matrix.runtime }}-${{ github.ref }}
cancel-in-progress: true
strategy:
matrix:
runtime: [dali, picasso]
container:
image: niteo/nixpkgs-nixos-22.05:316b762afdb9e142a803f29c49a88b4a47db80ee
steps:
- uses: actions/checkout@v3
- uses: "./.github/templates/watch-exec"
with:
command: nix -- build .#check-${{ matrix.runtime }}-integration-tests
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"

package-simnode-tests:
name: "Package Simnode Tests"
runs-on:
- self-hosted
- linux
- x64
- sre
concurrency:
group: package-simnode-tests-${{ matrix.runtime }}-${{ github.ref }}
cancel-in-progress: true
container:
image: niteo/nixpkgs-nixos-22.05:316b762afdb9e142a803f29c49a88b4a47db80ee
steps:
- uses: actions/checkout@v3
- uses: "./.github/templates/watch-exec"
with:
command: nix -- build .#simnode-tests
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# local-integration-tests:
# name: "Local integration tests"
# runs-on:
# - self-hosted
# - linux
# - x64
# - sre
# concurrency:
# group: local-integration-tests-${{ matrix.runtime }}-${{ github.ref }}
# cancel-in-progress: true
# strategy:
# matrix:
# runtime: [dali, picasso]
# container:
# image: niteo/nixpkgs-nixos-22.05:316b762afdb9e142a803f29c49a88b4a47db80ee
# steps:
# - uses: actions/checkout@v3
# - uses: "./.github/templates/watch-exec"
# with:
# command: nix -- build .#check-${{ matrix.runtime }}-integration-tests
# token: "${{ secrets.CACHIX_AUTH_TOKEN }}"

package-composable-node:
name: "Package Composable node"
Expand Down Expand Up @@ -794,7 +741,7 @@ jobs:
- sre
strategy:
matrix:
node: [statemine, bifrost]
node: [statemine, bifrost]
concurrency:
group: ${{ github.workflow }}-package-${{ matrix.node }}-node-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -806,7 +753,7 @@ jobs:
with:
command: nix -- build .#${{ matrix.node }}-node
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"

package-acala-node:
name: "Package Acala node"
runs-on:
Expand Down Expand Up @@ -876,7 +823,7 @@ jobs:
name: "Cache devnet all dev local"
strategy:
matrix:
runtime: [devnet-dali-complete, devnet-picasso-complete, devnet-dali, devnet-centauri]
runtime: [devnet-dali-complete, devnet-picasso-complete, devnet-dali, devnet-centauri]
needs:
- package-polkadot-node
- package-acala-node
Expand Down Expand Up @@ -934,19 +881,19 @@ jobs:
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: frontend
working-directory: frontend
- name: Lint Pablo
run: yarn --filter=pablo lint
working-directory: frontend
- name: Test Pablo
run: yarn --filter=pablo test
working-directory: frontend
working-directory: frontend
- name: Lint Picasso
run: yarn --filter=picasso lint
working-directory: frontend
- name: Test Picasso
run: yarn --filter=picasso test
working-directory: frontend
working-directory: frontend

cmc-api:
name: "Package CMC API"
Expand Down Expand Up @@ -1037,7 +984,7 @@ jobs:
- x64
- sre
concurrency:
group: ${{ github.workflow }}-package-zombienet-${{ github.ref }}
group: ${{ github.workflow }}-package-zombienet-${{ github.ref }}
cancel-in-progress: true
container:
image: niteo/nixpkgs-nixos-22.05:316b762afdb9e142a803f29c49a88b4a47db80ee
Expand Down Expand Up @@ -1142,7 +1089,7 @@ jobs:
echo "experimental-features = nix-command flakes" > /etc/nix/nix.conf
echo "sandbox = relaxed" >> /etc/nix/nix.conf
echo "narinfo-cache-negative-ttl = 0" >> /etc/nix/nix.conf
shell: "bash"
shell: "bash"
- uses: cachix/cachix-action@f5f67badd061acb62b5c6e25e763572ca8317004
with:
skipPush: true
Expand All @@ -1154,7 +1101,7 @@ jobs:
name: ${{ env.CACHIX_COMPOSABLE }}
- run: |
nix run .#devnet-integration-tests
effects-gate:
name: "Effect gate, automatically merged if passed"
runs-on:
Expand All @@ -1169,7 +1116,9 @@ jobs:
- package-polkadot-node
- package-composable-node
- test-running-of-pallet-benchmarks
- local-integration-tests
# FIXUP(hussein): reenable once v0.9.30 -> v0.9.33
# - local-integration-tests

- unit-tests
- check-devnet
- check-nix-long
Expand All @@ -1181,8 +1130,6 @@ jobs:
- cargo-fmt-check
- taplo-check
- prettier-check
# Simnode is flaky, enable once not flaky
# - check-simnode
- benchmarks-check
- spell-check
- docs-check
Expand Down Expand Up @@ -1302,4 +1249,4 @@ jobs:
_For more info on how to use Nix, check out our [Nix docs](https://docs.composable.finance/nix.html)_
Note that the initial build may take about one hour if it has not been cached by our CI yet. Once it is cached, builds should take about one minute. We currently do not provide build caches for ARM machines such as M1 Macs, but building on ARM is supported.
tag: 'Nix commands for this PR'
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
- name: 'Dependency Review'
uses: actions/dependency-review-action@v2
with:
# The following two GHSAs are ignored because they are casued by the static Docusaurus build.
# Please remove when Docusaurus gets updated.
allow-ghsas: GHSA-pfrx-2q88-qq97, GHSA-w5p7-h5w8-2hfq, GHSA-wcg3-cvx6-7396
# GHSA-pfrx-2q88-qq97, GHSA-w5p7-h5w8-2hfq, GHSA-wcg3-cvx6-7396 are ignored because they are casued by the static Docusaurus build. Please remove when Docusaurus gets updated.
# GHSA-969w-q74q-9j8v, GHSA-44mr-8vmm-wjhg, GHSA-wh6w-3828-g9qf are ignored because they are transitive dependencies still used by the master branch of Substrate. Please remove when Substrate update the according dependencies.
allow-ghsas: GHSA-pfrx-2q88-qq97, GHSA-w5p7-h5w8-2hfq, GHSA-wcg3-cvx6-7396, GHSA-969w-q74q-9j8v, GHSA-44mr-8vmm-wjhg, GHSA-wh6w-3828-g9qf
6 changes: 3 additions & 3 deletions REVIEWERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Ideas in this document are taken from [Google's Engineering Practices](https://g

# Creating a PR

- Make sure you read the [contributing guidelines](https://github.com/ComposableFi/composable/blob/main/docs/CONTRIBUTING.md).
- Make sure you read the [contributing guidelines](https://github.com/ComposableFi/composable/blob/main/docs/CONTRIBUTING.md).

- Always branch off of `main` for both feature (`feat`) and `bugfix` branches. If you are working together with other developers on a feature and want to each have your your branch, create a `feat/{feature}/{GITHUB_USERNAME}` branch. Once the `feat/{feature}` branch has been deleted, we may delete all nested branches(!).

- Commits must be signed, as well as that all code should pass our automated checks and tests. Code will not be reviewed until all checks succeed.
- Commits must be signed, as well as that all code should pass our automated checks and tests. Code will not be reviewed until all checks succeed.

- Fill in the PR template, and make sure to describe your changes well. The developer reviewing your work may be out of the loop on the need of the change, and unfamiliar with the product itself. Linking to a ticket or issue is also acceptable.

Expand All @@ -36,4 +36,4 @@ In order of importance for code quality:

# Handling Feedback

Explanations written only in the code review tool are not helpful to future code readers. They are acceptable only in a few circumstances, such as when you are reviewing an area you are not very familiar with and the developer explains something that normal readers of the code would have already known. Unless the reviewer's comment was completely incorrect, any non-`nit` comments should result in a new commit fixing the code, or adding a comment describing the code.
Explanations written only in the code review tool are not helpful to future code readers. They are acceptable only in a few circumstances, such as when you are reviewing an area you are not very familiar with and the developer explains something that normal readers of the code would have already known. Unless the reviewer's comment was completely incorrect, any non-`nit` comments should result in a new commit fixing the code, or adding a comment describing the code.
Loading

0 comments on commit 2ec221a

Please sign in to comment.