Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into ao-collator-parent-…
Browse files Browse the repository at this point in the history
…head-data

* origin/master: (51 commits)
  Runtime Upgrade ref docs and Single Block Migration example pallet  (#1554)
  Collator overseer builder unification (#3335)
  Introduce storage attr macro `#[disable_try_decode_storage]` and set it on `System::Events` and `ParachainSystem::HostConfiguration` (#3454)
  Add Polkadotters bootnoders per IBP application (#3423)
  Add documentation around FRAME Origin (#3362)
  Bridge zombienet tests: Check amount received at destination (#3490)
  Snowbridge benchmark tests fix (#3424)
  fix(zombienet): increase timeout in download artifacts (#3376)
  Cleanup String::from_utf8 (#3446)
  [prdoc] Validate crate names (#3467)
  Limit max execution time for `test-linux-stable` CI jobs (#3483)
  Introduce Notification block pinning limit (#2935)
  frame-support: Improve error reporting when having too many pallets (#3478)
  add Encointer as trusted teleporter for Westend (#3411)
  [pallet-xcm] Adjust benchmarks (teleport_assets/reserve_transfer_assets) not relying on ED (#3464)
  Add more debug logs to understand if statement-distribution misbehaving (#3419)
  Remove redundant parachains assigner pallet. (#3457)
  Use generic hash for runtime wasm in resolve_state_version_from_wasm (#3447)
  Runtime: allow backing multiple candidates of same parachain on different cores  (#3231)
  Bridge zombienet tests: move all "framework" files under one folder (#3462)
  ...
  • Loading branch information
ordian committed Feb 28, 2024
2 parents 1ff7a54 + 12ce4f7 commit 8b70d0f
Show file tree
Hide file tree
Showing 581 changed files with 9,355 additions and 3,522 deletions.
1 change: 1 addition & 0 deletions .config/taplo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exclude = [
"polkadot/node/malus/integrationtests/**",
"polkadot/zombienet_tests/**",
"substrate/zombienet/**",
"target/**",
]

# global rules
Expand Down
71 changes: 71 additions & 0 deletions .github/scripts/check-prdoc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env python3

'''
Ensure that the prdoc files are valid.
# Example
```sh
python3 -m pip install cargo-workspace
python3 .github/scripts/check-prdoc.py Cargo.toml prdoc/*.prdoc
```
Produces example output:
```pre
🔎 Reading workspace polkadot-sdk/Cargo.toml
📦 Checking 32 prdocs against 493 crates.
✅ All prdocs are valid
```
'''

import os
import yaml
import argparse
import cargo_workspace

def check_prdoc_crate_names(root, paths):
'''
Check that all crates of the `crates` section of each prdoc is present in the workspace.
'''

print(f'🔎 Reading workspace {root}.')
workspace = cargo_workspace.Workspace.from_path(root)
crate_names = [crate.name for crate in workspace.crates]

print(f'📦 Checking {len(paths)} prdocs against {len(crate_names)} crates.')
faulty = {}

for path in paths:
with open(path, 'r') as f:
prdoc = yaml.safe_load(f)

for crate in prdoc.get('crates', []):
crate = crate['name']
if crate in crate_names:
continue

faulty.setdefault(path, []).append(crate)

if len(faulty) == 0:
print('✅ All prdocs are valid.')
else:
print('❌ Some prdocs are invalid.')
for path, crates in faulty.items():
print(f'💥 {path} lists invalid crate: {", ".join(crates)}')
exit(1)

def parse_args():
parser = argparse.ArgumentParser(description='Check prdoc files')
parser.add_argument('root', help='The cargo workspace manifest', metavar='root', type=str, nargs=1)
parser.add_argument('prdoc', help='The prdoc files', metavar='prdoc', type=str, nargs='*')
args = parser.parse_args()

if len(args.prdoc) == 0:
print('❌ Need at least one prdoc file as argument.')
exit(1)

return { 'root': os.path.abspath(args.root[0]), 'prdocs': args.prdoc }

if __name__ == '__main__':
args = parse_args()
check_prdoc_crate_names(args['root'], args['prdocs'])
10 changes: 9 additions & 1 deletion .github/workflows/check-prdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,12 @@ jobs:
run: |
echo "Checking for PR#${GITHUB_PR}"
echo "You can find more information about PRDoc at $PRDOC_DOC"
$ENGINE run --rm -v $PWD:/repo $IMAGE check -n ${GITHUB_PR}
$ENGINE run --rm -v $PWD:/repo -e RUST_LOG=info $IMAGE check -n ${GITHUB_PR}
- name: Validate prdoc for PR#${{ github.event.pull_request.number }}
if: ${{ !contains(steps.get-labels.outputs.labels, 'R0') }}
run: |
echo "Validating PR#${GITHUB_PR}"
python3 --version
python3 -m pip install cargo-workspace==1.2.1
python3 .github/scripts/check-prdoc.py Cargo.toml prdoc/pr_${GITHUB_PR}.prdoc
25 changes: 10 additions & 15 deletions .github/workflows/release-99_notif-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ on:
jobs:
ping_matrix:
runs-on: ubuntu-latest
environment: release
strategy:
matrix:
channel:
# Internal
- name: 'RelEng: Cumulus Release Coordination'
room: '!NAEMyPAHWOiOQHsvus:parity.io'
pre-releases: true
- name: "RelEng: Polkadot Release Coordination"
room: '!cqAmzdIcbOFwrdrubV:parity.io'
pre-release: true
Expand All @@ -31,18 +29,15 @@ jobs:
pre-release: true

# Public
# - name: '#KusamaValidatorLounge:polkadot.builders'
# room: '!LhjZccBOqFNYKLdmbb:polkadot.builders'
# pre-releases: false
# - name: '#kusama-announcements:matrix.parity.io'
# room: '!FMwxpQnYhRCNDRsYGI:matrix.parity.io'
# pre-release: false
# - name: '#polkadotvalidatorlounge:web3.foundation'
# room: '!NZrbtteFeqYKCUGQtr:matrix.parity.io'
# pre-release: false
# - name: '#polkadot-announcements:matrix.parity.io'
# room: '!UqHPWiCBGZWxrmYBkF:matrix.parity.io'
# pre-release: false
- name: '#polkadotvalidatorlounge:web3.foundation'
room: '!NZrbtteFeqYKCUGQtr:matrix.parity.io'
pre-releases: false
- name: '#polkadot-announcements:parity.io'
room: '!UqHPWiCBGZWxrmYBkF:matrix.parity.io'
pre-releases: false
- name: '#kusama-announce:parity.io'
room: '!FMwxpQnYhRCNDRsYGI:matrix.parity.io'
pre-releases: false

steps:
- name: Matrix notification to ${{ matrix.channel.name }}
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ build-rustdoc:
- .run-immediately
variables:
SKIP_WASM_BUILD: 1
RUSTDOCFLAGS: ""
RUSTDOCFLAGS: "--default-theme=ayu --html-in-header ./docs/sdk/headers/header.html --extend-css ./docs/sdk/headers/theme.css"
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc"
when: on_success
Expand Down
5 changes: 4 additions & 1 deletion .gitlab/pipeline/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ check-toml-format:
export RUST_LOG=remote-ext=debug,runtime=debug
echo "---------- Downloading try-runtime CLI ----------"
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.0/try-runtime-x86_64-unknown-linux-musl -o try-runtime
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.4/try-runtime-x86_64-unknown-linux-musl -o try-runtime
chmod +x ./try-runtime
echo "Using try-runtime-cli version:"
./try-runtime --version
echo "---------- Building ${PACKAGE} runtime ----------"
time cargo build --release --locked -p "$PACKAGE" --features try-runtime
Expand All @@ -133,6 +135,7 @@ check-runtime-migration-westend:
WASM: "westend_runtime.compact.compressed.wasm"
URI: "wss://westend-try-runtime-node.parity-chains.parity.io:443"
SUBCOMMAND_EXTRA_ARGS: "--no-weight-warnings"
allow_failure: true

check-runtime-migration-rococo:
stage: check
Expand Down
1 change: 1 addition & 0 deletions .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ test-linux-stable:
- target/nextest/default/junit.xml
reports:
junit: target/nextest/default/junit.xml
timeout: 90m

test-linux-oldkernel-stable:
extends: test-linux-stable
Expand Down
8 changes: 8 additions & 0 deletions .gitlab/pipeline/zombienet/polkadot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ zombienet-polkadot-functional-0011-async-backing-6-seconds-rate:
--local-dir="${LOCAL_DIR}/functional"
--test="0011-async-backing-6-seconds-rate.zndsl"

zombienet-polkadot-functional-0012-elastic-scaling-mvp:
extends:
- .zombienet-polkadot-common
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}/functional"
--test="0012-elastic-scaling-mvp.zndsl"

zombienet-polkadot-smoke-0001-parachains-smoke-test:
extends:
- .zombienet-polkadot-common
Expand Down
Loading

0 comments on commit 8b70d0f

Please sign in to comment.