Skip to content

Commit 62d218c

Browse files
iulianbarbugithub-actions[bot]alvicsam
authored andcommitted
fix: add missing crates bumps and upgrade parity-publish (#9488)
# Description Adds a few crate bumps associated to PRs which missed to bump them, and updates parity-publish version across the board to 0.10.6 (to support rustc 1.88). Additionally, makes it so that parity-publish-check-compile runs first on all unreleased prdocs to bump associated crates, and only after moving those to an `unreleased` directory, runs on the current PR's prdoc. This is so that we first create a "local release" based on the unreleased prdocs, and then we follow with a "patch" release based on the previous local release, considering only the prdoc pushed with the current PR. If the workflow fails at the end it means current PR missed certain bumps. If we don't do the plan/apply twice we risk to miss bumps due to all prdocs being considered (current PR's prdoc + unreleased ones) when running parity-publish plan/apply, which might result in a set of crate bumps which are sufficient, but once some unreleased prdocs will be moved to a stable prodoc directory, because they will be part of a stable release, then the ones left will not be enough from a bump perspective (e.g. like it happened in #9320). That's why it is important to check every PR that adds a prdoc whether it is self-sufficient from a crates bumping perspective. If no prdoc is provided, the parity-publish does not need to be taken into consideration, but it should also pass nonetheless. ## Integration N/A ## Review Notes There seems to a be a corner case parity-publish can not easily catch. All bumps below are a manifestation of it. More details below: * #8714 - a major bump is necessary for `sp-wasm-interface` - context here: #8714 (comment) * `sp-keystore` was bumped during 2506 in #6010 , and the relevant prdoc got moved to stable2506 dir in #9320. This moved prdoc coexisted alongside other unreleased prdocs, and covered a needed patch bump for `sp-keystore`, that is not easily visible, and also required for crates publishing IIUC: 1. `sp-io` is major bumped because its direct dependency, `sp-state-machine`, was major bumped. 2. `sp-io` has a direct dependency on `sp-core` (minor bumped), and `sp-keystore` (not touched, not bumped by now) 3. `sp-io` fails to compile because it pulls same types from different `sp-core` versions (it implements `Keystore` trait from `sp-keystore` with methods signatures referencing types from `sp-core 38.0.0` by using the `sp-core 0.38.1` - unreleased yet - types, which confuses rustc). * `sp-rpc` needs a bump too due to pulling `sp-core 38.0.0`, like `sp-keystore`, and it is an indirect dependency of `polkadot-cli`, which has also a direct dependency on unreleased `sp-core 38.1.0`, so again, if we don't bump `sp-rpc` (historically it has been bumped only with major, but I think we can go with patch on this one), `polkadot-cli` can't compile. * `sc-storage-monitor` is in a similar situation as `sp-rpc`/`sp-keystore` - `polkadot-cli` depends on `sc-storage-monitor` (which is not bumped, and has a dependency on `sp-core 38.0.0`), but it also depends on `sp-core 38.1.0`. And yet again, something is used in `polkadot-cli` from the two different `sp-core` versions, which confuses rustc. --------- Signed-off-by: Iulian Barbu <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Alexander Samusev <[email protected]>
1 parent b6bf2b4 commit 62d218c

File tree

4 files changed

+46
-5
lines changed

4 files changed

+46
-5
lines changed

.github/workflows/check-semver.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
env:
14-
TOOLCHAIN: nightly-2025-01-26
14+
TOOLCHAIN: nightly-2025-05-09
1515

1616
jobs:
1717
isdraft:
@@ -78,7 +78,7 @@ jobs:
7878
7979
- name: Install parity-publish
8080
# Set the target dir to cache the build.
81-
run: CARGO_TARGET_DIR=./target/ cargo install [email protected].5 --locked -q
81+
run: CARGO_TARGET_DIR=./target/ cargo install [email protected].6 --locked -q
8282

8383
- name: Get original PR number
8484
shell: bash

.github/workflows/publish-check-compile.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,36 @@ jobs:
3838

3939
- name: install parity-publish
4040
run: |
41-
cargo install [email protected].4 --locked -q
41+
cargo install [email protected].6 --locked -q
4242
43-
- name: parity-publish update plan
43+
- name: set current PR's prdoc name in a variable
44+
env:
45+
GITHUB_PR_NUM: ${{ github.event.pull_request.number }}
46+
run: |
47+
echo "CURRENT_PRDOC=pr_${GITHUB_PR_NUM}.prdoc" >> $GITHUB_ENV
48+
49+
- name: parity-publish update plan w/o current prdoc
50+
run: |
51+
mv prdoc/$CURRENT_PRDOC .
52+
parity-publish --color always plan --skip-check --prdoc prdoc/
53+
54+
# The code base is not in master's state (due to commits brought by the
55+
# current PR), but we're interested in all master's prdocs to be applied
56+
# as if master is a stable branch, and in next steps we're following up with
57+
# a patch release of all crates based on some newly added prdocs
58+
# (meaning only the current prdoc).
59+
- name: parity-publish apply plan on the code state prior to current prdoc
60+
run: parity-publish --color always apply --registry
61+
62+
- name: move all prdocs except current one to unstable dir
63+
run: |
64+
mkdir prdoc/unstable
65+
mv prdoc/pr_*.prdoc prdoc/unstable
66+
if [ -f $CURRENT_PRDOC ]; then
67+
mv $CURRENT_PRDOC prdoc
68+
fi
69+
70+
- name: parity-publish update plan just for PR's prdoc
4471
run: parity-publish --color always plan --skip-check --prdoc prdoc/
4572

4673
- name: parity-publish apply plan

.github/workflows/publish-check-crates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
cache-on-failure: true
2828

2929
- name: install parity-publish
30-
run: cargo install [email protected].4 --locked -q
30+
run: cargo install [email protected].6 --locked -q
3131

3232
- name: parity-publish check
3333
run: parity-publish --color always check --allow-unpublished

prdoc/pr_9488.prdoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
title: 'prdoc: add missing crates bumps'
2+
doc:
3+
- audience: Node Dev
4+
description:
5+
Adds a few crate bumps associated to PRs which missed to bump them due to a corner case missed by the release tooling.
6+
crates:
7+
- name: sp-wasm-interface
8+
bump: major
9+
- name: sp-rpc
10+
bump: patch
11+
- name: sc-storage-monitor
12+
bump: patch
13+
- name: sp-keystore
14+
bump: patch

0 commit comments

Comments
 (0)