-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Release Process #2490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release Process #2490
Changes from 29 commits
11aa7ac
5eea0df
d8b7524
d622a7c
1e5b3b0
becbb79
316579d
11b77b0
6cdfd59
35d87bf
5189616
a769906
6d61040
d9bf9ef
71d9062
4d65917
1cc2780
423d0ab
9d7bdfd
2bdd380
51322b3
2cd25d9
554b247
d11e585
26d5a8a
7de5e5e
ad657d9
7158244
bfad729
1e10077
f8dea0b
3341c6b
3702afb
dce630d
c3014c4
702118b
ae7e73c
7a4b801
6169ee8
d03a2d3
80b81b1
9328f76
e7032c5
818c013
f36af66
d01c07a
ef1f428
d11235f
09e539a
fc28e27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,21 @@ Polkadot. | |
|
|
||
| Cumulus is a set of tools for writing Substrate-based Polkadot parachains. | ||
|
|
||
| ## Releases | ||
|
|
||
| > [!NOTE] | ||
| > Our release process is still Work-In-Progress and may not yet reflect the aspired outline here. | ||
|
|
||
| The Polkadot-SDK has two release channels: `mainline` and `nightly`. Production software is advised to only use `mainline`. `nightly` is meant for tinkerers to try out the latest features. The detailed release process is described in [RELEASE.md](docs/RELEASE.md) | ||
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Mainline | ||
|
|
||
| `mainline` releases have a support duration of **three months**. In this period, the release will not have any breaking changes but only receive bug and security fixes on a **two week** cadence. | ||
liamaharon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Nightly | ||
|
|
||
| `nightly` releases are released every night from the `master` branch, potentially with breaking changes. They have pre-release version numbers in the format `major.0.0-nightlyYYMMDD`. | ||
|
||
|
|
||
| ## Upstream Dependencies | ||
|
|
||
| Below are the primary upstream dependencies utilized in this project: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Audit | ||
|
|
||
| Audits are conducted to ensure the absence of severe or exploitable bugs. Merge Requests are generally merged into the `master` branch without audit. The `audited` tag is used to track the latest audited commit of the `master` branch. This means that audits need to happen in order of being merged. | ||
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| This is an optimistic approach that lets us develop with greater speed, while requiring (possibly) large refactors in the failure case. | ||
|
|
||
| Audits can be deferred if the logic is gated by an `experimental` feature or marked as "Not Production Ready" within the first line of doc. Such changes should be queued manually before these warnings are removed. | ||
|
|
||
| ## General Guidelines for what to Audit | ||
|
|
||
| There is no single one-fits-all rule. Generally we should audit important logic that could immediately be used on production networks. If in doubt; ask in chat or in the Merge Request. | ||
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Requesting an Audit | ||
ggwpez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 1. Add the PR to the project `Security Audit (PRs) - SRLabs` | ||
| 2. Set status to Backlog | ||
| 3. Assign priority, considering the universe of PRs currently in the backlog, or just leave it as TBD | ||
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 4. Add the component | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,154 @@ | ||||||
| # Release | ||||||
|
|
||||||
| The outputs of a release are the `polkadot` and `polkadot-parachain` node binaries, the runtimes for Westend & Rococo and their system parachains, and new crate versions published to `crates.io`. | ||||||
|
|
||||||
| # Setup | ||||||
|
|
||||||
| We have two branches: `master` and `stable`. `master` is the main development branch where normal merge requests are opened. Developers need to mostly only care about this branch. | ||||||
|
||||||
| The `stable` branch contains a version of the code that is ready to be released. Its contents are always audited. Merging to it is restricted to [Backports](#backports). | ||||||
|
||||||
|
|
||||||
ggwpez marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| # Versioning | ||||||
|
|
||||||
| We are releasing multiple different things from this repository in one release, but we don't want to | ||||||
| use the same version for everything. Thus, in the following we explain the versioning story for the | ||||||
| crates, node and Westend & Rococo. To easily refer to a release, it shall be named by its date in | ||||||
| the form `stableYYMMDD`. | ||||||
|
|
||||||
| ## Crate | ||||||
|
|
||||||
| We try to follow SemVer<sup>1</sup> as best as possible for versioning our crates. SemVer requires a piece of software to first declare a public API. The public API of the Polkadot SDK is hereby declared as the sum of all crates' public APIs, with the exception of the following internal crates: | ||||||
|
||||||
| We try to follow SemVer<sup>1</sup> as best as possible for versioning our crates. SemVer requires a piece of software to first declare a public API. The public API of the Polkadot SDK is hereby declared as the sum of all crates' public APIs, with the exception of the following internal crates: | |
| We try to follow [SemVer 2.0.0](https://semver.org/) as best as possible for versioning our crates. SemVer requires a piece of software to first declare a public API. The public API of the Polkadot SDK is hereby declared as the sum of all crates' public APIs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All crates should follow semver. However, we should have crates that can get merged to stable, even when there are breaking changes aka major version bumps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eskimor this is also what I would do to most of the relay chain crates.
We should put some custom metadata into the Cargo.toml telling the tooling that these crates are fine to "break". For the human we should mention this in the description of the Cargo.toml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is a prerequisite to have this done before the pr here gets merged, we can do this over time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created #3031
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about having multiple PRs that modify the same crates. I guess we're supposed to bump them only once within a 3-month period right? This can be a bit cumbersome and prone to human error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes good observation. There was some discussion on if we maybe rather use PrDoc to indicate SemVer bumps, but then we need additional tooling to translate that into crate bumps and it does not play well with other tools.
We would probably need a CI that prevents double bumps, but i agree that it could be a point of friction.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by this.
Shouldn't crate bumping only be necessary when merging to the release branch, and master bumps are just automated nightly releases?
Do you mean to refer to the release branch instead of master branch here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to describe the normal workflow of merging a standard Merge request.
Currently we never touch the Cargo.toml version. But in the future we would need to increment it according to SemVer. This can be a major, minor or patch bump - depending on the change.
Otherwise when would we bump these versions? We dont really "merge" to the release branch, unless its a backport.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding was
- merge to
master: don't need to do bumps on merge. releases will be made nightly bumping the semver with a new-nightlyYYYY-MM-DDsuffix. I don't see benefit of bumping X.Y.Z between nightly releases, because the code will have a breaking bump (from the-nightlychange) soon anyway. - merge to
release: we need to bump according to X.Y.Z semver, because we need to make new releases for the changed crates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how I understood it, where master branch only get nightly releases.
each crates versions like this:
stable
v1.0.0 --------> v1.0.1 ------------------------> v2.0.0 ---------------------- -> ...
^
CLOBBER|
master |
v2.0.0-nightly2023-01-01 -> ... v2.0.0-nightly2023-04-01 -> v3.0.0-nightly2023-04-02 -> ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to bump according to X.Y.Z semver, because we need to make new releases for the changed crates.
But then how do we keep track of these in the meantime? Yes sure we dont need to bump for the nightly releases since they get their own version number overwritten.
We would also need to bullet proof automate these version bump then. I would also like to do this with prdoc and so on, but @bkchr seems to be in favour of just bumping them directly. Note that we dont need to bump multiple times on master if there was no release so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we would still bump only major every 3 months?
In my proposal, yes.
In my proposal:
- Major bumps on
releaseevery 3 months when the Clobber happens. SemVer respected. - Minor bumps on
releaseevery 2 weeks for any crate touched by a backport or any crate depending on such a crate. Backport reviews make an explicit check that they do not make breaking changes. SemVer respected. - Patch bumps on
releasefor out-of-band security fixes which have been reviewed as non-breaking. SemVer respected. - Nightly just has the next major version with a
-nightlysuffix. SemVer respected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding from the forum post is this was the plan yes: master is never bumped manually, it's only bumped by the CI every nightly release.
The nightly is a pre-release, since it has a dash in the version name. It is completely irrelevant for any SemVer considerations and can break at any time.
For example, if a crate version in stable is 1.2.1, master would be set to 2.0.0-nightlyYYYY-MM-DD.
Yes, but only temporarily in the CI. This bump is never actually committed.
Then every 6th release, we remove the -nightlyYYYY-MM-DD from the versions and that becomes our new stable branch.
As you said below, this could introduce major bump without breaking changes. But maybe it would still be a good tradeoff if the other way introduces too much overhead. I mainly dont like it much because it breaks cargo update.
This way, we don't need to worry at all about breaking changes when we merge to master.
We dont have to "worry" about them, but we still have to mark them as breaking.
In my proposal:
Major bumps on release every 3 months when the Clobber happens. SemVer respected.
Just as note: I interpret this as meaning that unnecessary major bump should be avoided, since SemVer does not require them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would really first like to try out the tooling and then see what we should do. I mean the tooling probably already works for most of the things we are doing as breaking changes, like changing a function name or removing a parameter.
Okay then lets try the native bumping without Prdoc for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to update this to clarify manual 'crate bumping' applies to backports into stable not master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? We would bump crates in the MR that merges into master.
Then that version bump could get back ported to stable, but its version should not need any tweaking.
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 8. Do a dry-run release to ensure that it *should* work. |
What should work? Building the binary? Sounds like bullshit to me, again CI is building the stuff all the time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but there are lots of build errors that only arrive when building with cargo publish --dry-run.
For example the location of the README or other relative paths gets messed up within the workspace, since it builds each crate in isolation.
Eventually i dont mind how the release team ensures that it all works, but i think for a start it is fine to have in here.
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically we would need to release all of the crates or not? Or the tool that checks if something changed in a crate, needs to take into consideration the dependency graph. Aka we changed something deep inside the graph and thus all crates that depend on this crate are also bumped.
Which brings up another point, we can not just do what you said in point 3. We only need to bump the version of the crates that changed. We will then also need to depend on some of the older nightly releases in crates. In the end we will end up with every crate being on a different nightly tag, depending on when it was modified the last time. I mean this works, but just highlights again that we need some tooling to ensure that we use the correct crate versions for every crate in some downstream project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically we would need to release all of the crates or not? Or the tool that checks if something changed in a crate, needs to take into consideration the dependency graph.
AFAIK parity-publish does exactly this.
We will then also need to depend on some of the older nightly releases in crates. In the end we will end up with every crate being on a different nightly tag, depending on when it was modified the last time.
Ah crap. Did not think about this.
I mean this works, but just highlights again that we need some tooling to ensure that we use the correct crate versions for every crate in some downstream project.
Yea this sounds like a nightmare. We could also create an overarching polkadot-sdk crate that locks in all crate versions. Otherwise some custom bumper CLI...
I think the release team was building such a CLI to do the bumping in downstream repos.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the problem with merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copying files is not quite the best term.. It just means nuke the working tree with whatever is the most recently audited commit in nightly, instead of trying to do merge conflict resolution or whatever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which would prohibit us from working on stable directly for Polkadot - correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stable cannot have changes that were not in master first. Problem are the git conflicts and nuking is easier.
Which would prohibit us from working on stable directly for Polkadot - correct?
Yes
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ggwpez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean we'll have automation for this? Most likely the backport will have conflicts or even logic changes that don't always result in git conflicts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the trivial case I guess the back port could be made automatically. But in general it would likely be two separate (similar) PRs.
Uh oh!
There was an error while loading. Please reload this page.