Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update release checklist #1412

Merged
merged 7 commits into from
Sep 23, 2022
Merged

Update release checklist #1412

merged 7 commits into from
Sep 23, 2022

Conversation

ascjones
Copy link
Collaborator

First, a post-mortem of how I messed up the 4.0.0-alpha.2 release:

  1. Following the existing release checklist, I bumped the versions to alpha.2
  2. For the value of [level] running cargo release, I used the value alpha, following the docs of cargo release --help which suggests to use the pre release label. Our checklist was not clear as to what this value should be.
  3. The effect of this was that it caused the cargo release tool to bump all the versions of the crates again to alpha.3, but crucially not updating the inter-workspace crate dependency versions.
  4. Had I checked the output of the dry run correctly I would have seen these proposed version bumps, but there was a lot of output so all I was looking for was the "Success" at the bottom as documented and didn't scroll up to see those bumps.
  5. Then I ran the release for real, it performed the bumps to alpha.3, successfully published the "leaf" crates but then the dependent crates failed to publish because they still had alpha.2 versions which were never published. Note that this is a case where the dry run succeeded but the publish itself failed.
  6. To fix this I did an immediate new alpha.3 release with the remaining crates.

This PR updates the release process to try and avoid this mistake, instructing the user to provide the exact version to be deployed. Note that it would be possible to use the publish process to bump inter workspace dependencies with --dependent-version upgrade, though this does not work as thoroughly as the existing step to simply find/replace versions.

Another important change is that instead of first merging to master and then releasing, we should first release from the PR branch and then merge. This is because it is possible (as above) for the dry run to succeed but the actual publish to fail and require changes. This requires "locking" the master branch so no commits happen while the release is happening, which I think is feasible in this project with only a handful of devs and not that often commits. However dependabot might be an issue... This is just to ensure that the code bundled to crates.io is the same as the code at the git release tag, so if there is a race condition then a special cherry-picked branch could be created and the release tag made from there.

@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2022

Codecov Report

Merging #1412 (508d22e) into master (cf0c22e) will increase coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1412      +/-   ##
==========================================
+ Coverage   71.94%   71.98%   +0.03%     
==========================================
  Files         187      187              
  Lines        5953     5953              
==========================================
+ Hits         4283     4285       +2     
+ Misses       1670     1668       -2     
Impacted Files Coverage Δ
crates/ink/ir/src/ir/attrs.rs 82.27% <0.00%> (+0.27%) ⬆️
crates/allocator/src/bump.rs 85.12% <0.00%> (+0.82%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@HCastano HCastano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also wrap everything to 90ish characters?

ascjones and others added 3 commits September 23, 2022 15:21
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
@HCastano HCastano merged commit 69f959f into master Sep 23, 2022
@HCastano HCastano deleted the aj/update-release-checklist branch September 23, 2022 15:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants