Skip to content
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

chore: Release Zebra 1.0.0-beta.15 #5194

Merged
merged 6 commits into from
Sep 19, 2022
Merged

chore: Release Zebra 1.0.0-beta.15 #5194

merged 6 commits into from
Sep 19, 2022

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Sep 19, 2022

Closes #5011

Versioning

Which Crates to Increment

To check if any of the top-level crates need version increments:

  1. Go to the zebra GitHub code page: https://github.com/ZcashFoundation/zebra
  2. Check if the last commit was a Zebra version bump, or something else

Alternatively you can:

  • Use the github compare tool and check the main branch against the last tag (Example)
  • Use git diff --stat <previous-release-tag> origin/main

Once you know which crates have changed:

  • Increment the crates that have new commits since the last version update
  • Increment any crates that depend on crates that have changed
  • Keep a list of the crates that haven't been incremented, to include in the PR

How to Increment Versions

Zebra follows semantic versioning.

Semantic versions look like: MAJOR.MINOR.PATCH[-TAG.PRE-RELEASE]

Reviewing Version Bumps

Check for missed changes by going to:
https://github.com/ZcashFoundation/zebra/tree/<commit-hash>/
Where <commit-hash> is the hash of the last commit in the version bump PR.

If any Zebra or Tower crates have commit messages that are not a version bump, we have missed an update.
Also check for crates that depend on crates that have changed. They should get a version bump as well.

Version Locations

Once you know which versions you want to increment, you can find them in the:

Version Tooling

You can use fastmod to interactively find and replace versions.

For example, you can do something like:

fastmod --extensions rs,toml,md --fixed-strings '1.0.0-beta.11' '1.0.0-beta.12'
fastmod --extensions rs,toml,md --fixed-strings '0.2.26' '0.2.27' tower-batch tower-fallback

If you use fastmod, don't update versions in CHANGELOG.md.

README

We should update the README to:

  • Remove any "Known Issues" that have been fixed
  • Update the "Build and Run Instructions" with any new dependencies.
    Check for changes in the Dockerfile since the last tag: git diff <previous-release-tag> docker/Dockerfile.

Checkpoints

With every release and for performance reasons, we want to update the zebra checkpoints. More information on how to do this can be found in the zebra-checkpoints README.

To do this you will need a synchronized zcashd node. You can request help from other zebra team members to submit this PR if you can't make it yourself at the moment of the release.

Change Log

Important: Any merge into main deletes any edits to the draft changelog.
Once you are ready to tag a release, copy the draft changelog into CHANGELOG.md.

We follow the Keep a Changelog format.

We use the Release Drafter workflow to automatically create a draft changelog.

To create the final change log:

  • Copy the draft changelog into CHANGELOG.md
  • Delete any trivial changes. Keep the list of those, to include in the PR
  • Combine duplicate changes
  • Edit change descriptions so they are consistent, and make sense to non-developers
  • Check the category for each change
    • Prefer the "Fix" category if you're not sure

Change Categories

From "Keep a Changelog":

  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for soon-to-be removed features.
  • Removed for now removed features.
  • Fixed for any bug fixes.
  • Security in case of vulnerabilities.

Create the Release

Create the Release PR

After you have the version increments, the updated checkpoints and the updated changelog:

  • Make sure the PR with the new checkpoint hashes is already merged.
  • Push the version increments and the updated changelog into a branch
    (name suggestion, example: v1.0.0-alpha.0-release)
  • Create a release PR by adding &template=release-checklist.md to the
    comparing url (Example).
    • Add the list of deleted changelog entries as a comment to make reviewing easier.
    • Also add the list of not-bumped crates as a comment (can use the same comment as the previous one).
  • Turn on Merge Freeze.
  • Once the PR is ready to be merged, unfreeze it here.
    Do not unfreeze the whole repository.

Create the Release

  • Once the PR has been merged,
    create a new release using the draft release as a base,
    by clicking the Edit icon in the draft release
  • Set the tag name to the version tag,
    for example: v1.0.0-alpha.0
  • Set the release to target the main branch
  • Set the release title to Zebra followed by the version tag,
    for example: Zebra 1.0.0-alpha.0
  • Replace the prepopulated draft changelog in the release description by the final
    changelog you created; starting just after the title ## [Zebra ... of
    the current version being released, and ending just before the title of
    the previous release.
  • Mark the release as 'pre-release', until it has been built and tested
  • Publish the pre-release to GitHub using "Publish Release"

Build and Binary Testing

  • After tagging the release, test that the exact cargo install command in README.md works
    (--git behaves a bit differently to --path)
  • Test that the newly built Zebra starts correctly, by running ~/.cargo/bin/zebrad
  • Wait until the Docker binaries have been built on main, and the quick tests have passed.
    (You can ignore the full sync and lightwalletd tests, because they take about a day to run.)
  • Publish the release to GitHub by disabling 'pre-release', then clicking "Publish Release"
  • Wait until the Docker images have been published
  • Turn off Merge Freeze for the whole repository

If the build fails after tagging:

  1. Fix the build
  2. Increment versions again, following these instructions from the start
  3. Update README.md with a new git tag
  4. Update CHANGELOG.md with details about the fix
  5. Tag a new release

@teor2345 teor2345 added A-docs Area: Documentation A-dependencies Area: Dependency file updates C-enhancement Category: This is an improvement P-High 🔥 labels Sep 19, 2022
@teor2345 teor2345 requested review from a team as code owners September 19, 2022 06:00
@teor2345 teor2345 self-assigned this Sep 19, 2022
@teor2345 teor2345 requested a review from a team as a code owner September 19, 2022 06:00
@teor2345 teor2345 requested review from dconnolly and upbqdn and removed request for a team September 19, 2022 06:00
@teor2345 teor2345 changed the title Beta 15 release chore: Release Zebra 1.0.0-beta.15 Sep 19, 2022
@teor2345
Copy link
Contributor Author

Here's how I made the release PR:

  • All crates needed version bumps
  • I didn't update the checkpoints, they were just updated last week

I combined or deleted these PRs in the draft changelog:

@codecov
Copy link

codecov bot commented Sep 19, 2022

Codecov Report

Merging #5194 (bd6f0b8) into main (202dc43) will increase coverage by 0.12%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5194      +/-   ##
==========================================
+ Coverage   79.14%   79.27%   +0.12%     
==========================================
  Files         307      307              
  Lines       39218    39218              
==========================================
+ Hits        31040    31090      +50     
+ Misses       8178     8128      -50     

Copy link
Member

@upbqdn upbqdn left a comment

Choose a reason for hiding this comment

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

All looks good. I'm requesting changes just because of two small typos.

upbqdn
upbqdn previously approved these changes Sep 19, 2022
@upbqdn
Copy link
Member

upbqdn commented Sep 19, 2022

I realized it's easier to approve the PR since we don't merge PRs until all conversations are resolved anyway. (It's funny because I've been doing it this way for ages. I don't know what I was thinking when I was requesting the changes.)

dconnolly and others added 2 commits September 19, 2022 16:03
Co-authored-by: Marek <mail@marek.onl>
Co-authored-by: Marek <mail@marek.onl>
Copy link
Contributor

@dconnolly dconnolly left a comment

Choose a reason for hiding this comment

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

Reviewed and tested cargo install --locked --git https://github.com/ZcashFoundation/zebra --branch beta-15-release zebra on macOS 12.6 on an M1, installed and ran successfully

@mergify mergify bot merged commit f8ead71 into main Sep 19, 2022
@mergify mergify bot deleted the beta-15-release branch September 19, 2022 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Area: Dependency file updates A-docs Area: Documentation C-enhancement Category: This is an improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tag Zebra 1.0.0-beta.15 release
3 participants