Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into sandreim/per_subsystem_task_metrics
Browse files Browse the repository at this point in the history
* master:
  CI: chore (#3957)
  Companion – Update jsonrpsee to 0.4.1 (#4256)
  Add more XCM tracing (#4211)
  Update dependencies for latest substrate master (#4258)
  Bump mick-jaeger from 0.1.4 to 0.1.6 (#4249)
  Bump dlmalloc from 0.2.2 to 0.2.3 (#4250)
  Bump libc from 0.2.106 to 0.2.107 (#4235)
  Bump paste from 1.0.5 to 1.0.6 (#4244)
  Bump serde_json from 1.0.68 to 1.0.69 (#4236)
  • Loading branch information
ordian committed Nov 11, 2021
2 parents dae09bc + 83e5955 commit 57a2e32
Show file tree
Hide file tree
Showing 32 changed files with 538 additions and 502 deletions.
79 changes: 29 additions & 50 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# setting DEPLOY_TAG will only deploy the tagged image
#
# please do not add new jobs without "rules:" and "*-env". There are &rules-test for everything,
# &rules-pr-only preset. And "kubernetes-env" with "docker-env" to set a runner
# &rules-test-and-rococo preset. And "kubernetes-env" with "docker-env" to set a runner
# which executes the job.

stages:
Expand All @@ -15,8 +15,6 @@ stages:
- publish
- deploy

image: paritytech/ci-linux:production

workflow:
rules:
- if: $CI_COMMIT_TAG
Expand All @@ -26,6 +24,7 @@ variables:
GIT_STRATEGY: fetch
GIT_DEPTH: 100
CI_SERVER_NAME: "GitLab CI"
CI_IMAGE: "paritytech/ci-linux:production"
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"
VAULT_SERVER_URL: "https://vault.parity-mgmt-vault.parity.io"
Expand Down Expand Up @@ -57,6 +56,7 @@ default:
- kubernetes-parity-build

.docker-env: &docker-env
image: "${CI_IMAGE}"
retry:
max: 2
when:
Expand All @@ -78,16 +78,16 @@ default:
rules:
- if: $CI_COMMIT_REF_NAME == "rococo-v1"
when: never
- when: always
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs

.pr-only: &rules-pr-only
# these jobs run only on PRs
.rules-test-and-rococo: &rules-test-and-rococo
rules:
- if: $CI_COMMIT_REF_NAME == "rococo-v1"
when: never
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME == "rococo-v1"

#### Vault secrets
.vault-secrets: &vault-secrets
Expand Down Expand Up @@ -144,7 +144,7 @@ check-runtime:
stage: test
image: paritytech/tools:latest
<<: *kubernetes-env
<<: *rules-pr-only
<<: *rules-test
<<: *vault-secrets
variables:
GITLAB_API: "https://gitlab.parity.io/api/v4"
Expand All @@ -153,19 +153,10 @@ check-runtime:
- ./scripts/gitlab/check_runtime.sh
allow_failure: true

check-line-width:
stage: test
image: paritytech/tools:latest
<<: *kubernetes-env
<<: *rules-pr-only
script:
- ./scripts/gitlab/check_line_width.sh
allow_failure: true

cargo-fmt:
stage: test
<<: *kubernetes-env
<<: *rules-pr-only
<<: *docker-env
<<: *rules-test
script:
- cargo +nightly fmt --all -- --check
allow_failure: true
Expand Down Expand Up @@ -239,11 +230,12 @@ check-no-default-features:
spellcheck:
stage: test
<<: *docker-env
<<: *rules-pr-only
<<: *rules-test
script:
- cargo spellcheck --version
# compare with the commit parent to the PR, given it's from a default branch
- git fetch origin +${CI_DEFAULT_BRANCH}:${CI_DEFAULT_BRANCH}
- echo "___Spellcheck is going to check your diff___"
- cargo spellcheck list-files -vvv $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH} -- :^bridges))
- time cargo spellcheck check -vvv --cfg=scripts/gitlab/spellcheck.toml --checkers hunspell --code 1
$(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH} -- :^bridges))
Expand All @@ -254,11 +246,7 @@ build-adder-collator:
<<: *collect-artifacts
<<: *docker-env
<<: *compiler-info
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME == "rococo-v1"
<<: *rules-test-and-rococo
script:
- time cargo build --release --verbose -p test-parachain-adder-collator
- sccache -s
Expand Down Expand Up @@ -294,18 +282,19 @@ check-dependent-cumulus:
DEPENDENT_REPO: cumulus

check-transaction-versions:
# image must be ubuntu:20.04 based to match the linkers, this image has npm installed
image: paritytech/contracts-ci-linux:production
stage: build
<<: *rules-test
<<: *docker-env
<<: *vault-secrets
image: node:15
needs:
- job: test-build-linux-stable
artifacts: true
before_script:
- apt-get -y update; apt-get -y install jq lsof
- npm install --ignore-scripts -g @polkadot/metadata-cmp
# Set git config
- git config remote.origin.url "https://github.com/paritytech/polkadot.git"
- git fetch origin release
script:
- scripts/gitlab/check_extrinsics_ordering.sh
Expand Down Expand Up @@ -334,7 +323,7 @@ build-rustdoc:
- ./crate-docs/
script:
# FIXME: it fails with `RUSTDOCFLAGS="-Dwarnings"` and `--all-features`
- time cargo doc --no-deps --workspace --verbose
- time cargo doc --workspace --verbose
- rm -f ./target/doc/.lock
- mv ./target/doc ./crate-docs
# FIXME: remove me after CI image gets nonroot
Expand Down Expand Up @@ -416,16 +405,12 @@ publish-adder-collator-image:
# service image for Simnet
stage: build
<<: *build-push-image
<<: *rules-test-and-rococo
variables:
<<: *image-variables
# scripts/dockerfiles/collator_injected.Dockerfile
DOCKERFILE: dockerfiles/collator_injected.Dockerfile
IMAGE_NAME: docker.io/paritypr/colander
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME == "rococo-v1"
needs:
- job: build-adder-collator
artifacts: true
Expand All @@ -439,22 +424,20 @@ publish-adder-collator-image:
# this artifact is used in simnet-tests job
dotenv: ./artifacts/collator.env

.update_weights: &update-weights
update_polkadot_weights: &update-weights
stage: build
when: manual
tags:
- weights
variables:
RUNTIME: polkadot
artifacts:
paths:
- ${RUNTIME}_weights_${CI_COMMIT_SHORT_SHA}.patch
script: |
./scripts/run_benches_for_runtime.sh $RUNTIME
git diff -P > ${RUNTIME}_weights_${CI_COMMIT_SHORT_SHA}.patch
update_polkadot_weights:
<<: *update-weights
script:
- ./scripts/run_benches_for_runtime.sh $RUNTIME
- git diff -P > ${RUNTIME}_weights_${CI_COMMIT_SHORT_SHA}.patch
# uses the "shell" executors
tags:
- weights

update_kusama_weights:
<<: *update-weights
Expand Down Expand Up @@ -547,6 +530,7 @@ publish-rustdoc:
- git commit -m "Updated docs for ${CI_COMMIT_REF_NAME}" ||
echo "___Nothing to commit___"
- git push origin gh-pages --force
- echo "___Rustdoc was successfully published to https://paritytech.github.io/polkadot/___"
after_script:
- rm -rf .git/ ./*

Expand All @@ -555,7 +539,6 @@ publish-rustdoc:
deploy-polkasync-kusama:
stage: deploy
rules:
# former .rules-build
- if: $CI_COMMIT_REF_NAME == "rococo-v1"
when: never
- if: $CI_PIPELINE_SOURCE == "schedule"
Expand All @@ -570,13 +553,9 @@ simnet-tests:
stage: deploy
image: "${SIMNET_IMAGE}"
<<: *kubernetes-env
<<: *rules-test-and-rococo
variables:
GH_DIR: "https://github.com/paritytech/polkadot/tree/master/simnet_tests"
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME == "rococo-v1"
needs:
- job: publish-polkadot-image
- job: publish-adder-collator-image
Expand Down
22 changes: 8 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Contributing

`Substrate` projects is a **OPENISH Open Source Project**

## What?

Individuals making significant and valuable contributions are given commit-access to a project to contribute as they see fit. A project is more like an open wiki than a standard guarded open source project.

## Rules

There are a few basic ground-rules for contributors (including the maintainer(s) of the project):
Expand All @@ -16,25 +10,25 @@ There are a few basic ground-rules for contributors (including the maintainer(s)
- A pull-request _must not be merged until CI_ has finished successfully.
- Contributors should adhere to the [house coding style](https://github.com/paritytech/polkadot/wiki/Style-Guide).

#### Merging pull requests once CI is successful:
### Merging pull requests once CI is successful

- A pull request that does not alter any logic (e.g. comments, dependencies, docs) may be tagged [`insubstantial`](https://github.com/paritytech/substrate/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3AA2-insubstantial) and merged by its author.
- A pull request that does not alter any logic (e.g. comments, dependencies, docs) may be tagged [`insubstantial`](https://github.com/paritytech/polkadot/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3AA2-insubstantial) and merged by its author.
- A pull request with no large change to logic that is an urgent fix may be merged after a non-author contributor has reviewed it well.
- All other PRs should sit for 48 hours with the [`pleasereview`](https://github.com/paritytech/substrate/pulls?q=is%3Apr+is%3Aopen+label%3AA0-pleasereview) tag in order to garner feedback.
- All other PRs should sit for 48 hours with the [`pleasereview`](https://github.com/paritytech/polkadot/pulls?q=is:pr+is:open+label:A0-pleasereview) tag in order to garner feedback.
- No PR should be merged until all reviews' comments are addressed.

#### Reviewing pull requests:
### Reviewing pull requests

When reviewing a pull request, the end-goal is to suggest useful changes to the author. Reviews should finish with approval unless there are issues that would result in:

- Buggy behaviour.
- Buggy behavior.
- Undue maintenance burden.
- Breaking with house coding style.
- Pessimisation (i.e. reduction of speed as measured in the projects benchmarks).
- Pessimization (i.e. reduction of speed as measured in the projects benchmarks).
- Feature reduction (i.e. it removes some aspect of functionality that a significant minority of users rely on).
- Uselessness (i.e. it does not strictly add a feature or fix a known issue).

#### Reviews may not be used as an effective veto for a PR because:
### Reviews may not be used as an effective veto for a PR because

- There exists a somewhat cleaner/better/faster way of accomplishing the same feature/fix.
- It does not fit well with some other contributors' longer-term vision for the project.
Expand All @@ -49,4 +43,4 @@ This is an experiment and feedback is welcome! This document may also be subject

## Heritage

These contributing guidelines are modified from the "OPEN Open Source Project" guidelines for the Level project: https://github.com/Level/community/blob/master/CONTRIBUTING.md
These contributing guidelines are modified from the "OPEN Open Source Project" guidelines for the Level project: <https://github.com/Level/community/blob/master/CONTRIBUTING.md>
Loading

0 comments on commit 57a2e32

Please sign in to comment.