The following document includes information how to release cpp-rs-driver and other information / procedures useful for maintainers. It is heavily inspired by https://github.com/scylladb/scylla-rust-driver/blob/v1.2.0/MAINTENANCE.md.
TODO (no docs written yet)
Note: Due to API compatibility, cpp-driver docs apply to cpp-rs-driver in general. Though, some discrepancies should be well-documented in cpp-rs-driver (some of them are already mentioned in cassandra.h).
There are two places to be addressed when bumping the version of the driver.
scylla-rust-wrapper/Cargo.toml->versionfield should be adjustedinclude/cassandra.h-> there areCASS_VERSION_[MAJOR/MINOR/PATCH/SUFFIX]definitions which should be adjusted accordingly
IMPORTANT: Read this whole document before attempting to do a release.
Prerequisites:
- Have write access to GitHub repo (so that you are able to push to master and create a new branch).
- Decide what the new version should be.
- Checkout
master. - Create some new branch (which you'll later push to your fork).
- (Optional, but recommended) Create a commit with changes applied by running
cargo update. This will update the dependencies inCargo.lockfile, which we keep track of in the repository. - Create commit that bumps version numbers of the driver (see
Version bump commitsection in this document). - Prepare release notes (see the template at the bottom of this document).
- (Optional, but recommended) Push the branch to your fork and create the PR to
masterso that another maintainer can review your work. Description of this PR should consist of just release notes. NOTE: Preferably merge this PR with CLI as described in next step. If you really want to use GitHub UI only use REBASE merge. This is to make all commits appear on the version branch, without any merge commits / squash commits. - Checkout
masterand fast-forward merge your changes (git merge --ff-only your_branch). - Create a new tag (e.g.
git tag -a v1.2.0 -m "Release 1.2.0"). - Push
masterand the new tag, preferably using atomic push (e.g.git push --atomic origin master v1.2.0). - Remove
versionfile if present. This file contains version information (X.Y.Z.<DATE>.<COMMIT_ID>) and should be generated from scratch when releasing new version. The file will be re-generated automatically by instructions described in the next steps. - Go to https://github.com/scylladb/cpp-rs-driver/releases , click the
Draft new releasebutton and follow the procedure to create a new release on GitHub. Use the release notes as its description. - After the release is published, the
Attach Packages to Releaseworkflow (.github/workflows/release-upload-packages.yml) automatically builds fresh packages using CPack and uploads every artifact to the release. Verify that the workflow finished successfully and that RPM/DEB/MSI/PKG/DMG files are attached. - (Mandatory for major / minor release, optional for patch release) Publish a post on the forum:
- Go to Release notes section.
- Click "New Topic".
- Title should be
[RELEASE] ScyllaDB CPP RS Driver <version>, e.g.[RELEASE] ScyllaDB CPP RS Driver 0.5.0 - Tags:
release,drivers,driver-release. - Content of the post should just be release notes.
- Click "Create Topic"
- Posts in "Release notes" section often need additional confirmation. You can write to current forum admin to expedite this.
You're done!
PR titles are written for maintainers, but release notes entries are written for users. It means that they should not be the same - and if they are then they are probably not good as either PR titles or release notes entries.
For that reason we hand-write our release notes, and link to relevant PRs in the entries.
Some old release notes that you can take inspiration from when writing new ones:
- https://github.com/scylladb/cpp-rs-driver/releases/tag/v0.2.0
- https://github.com/scylladb/cpp-rs-driver/releases/tag/v0.3.0
- https://github.com/scylladb/cpp-rs-driver/releases/tag/v0.4.0
The template for release notes can be found in the section below.
Guidelines on how to write release notes:
-
Go over all the PRs / commits since previous release. Usually:
git log --first-parentto see merge commits and commits that are directly on a branch. You can also try filtering merged PRs on GitHub by merge date, but it's cumbersome. Since 0.5 we try to assign each merged PR to a milestone, which should make this process much easier - you can just go over e.g. https://github.com/scylladb/cpp-rs-driver/milestone/6?closed=1 -
Items in release notes will usually correspond 1:1 to PRs / commits - but not always. It is possible that some functionality that should be a single item on the list is split over multiple PRs. It is also possible that single PR will be mentioned in two items.
-
Release notes should contain all items since previous (in terms of semver) version released at the time. Items that were backported will be duplicated between release notes for at least 2 different versions that way. This is fine, the backport should just be marked as such in release notes.
-
Release notes should contain a table with the number of non-backported commits per contributor. Depending on the situation you may generate it with
git shortlog --no-merges $(git merge-base master previous_version_tag)..HEAD -s -nand manually subtracting backported commits, or justgit shortlog --no-merges previous_version_tag..HEAD -s -n. If it is too much work, or you can't figure out how to calculate it in particular situation, you can skip it. This table should not count version bump commits - subtract them from your row if you already created them. -
Remember to update the amount of crate downloads and GitHub stars!
PR numbers in the list are random, they are just here to emphasize that entries should contain links to relevant PR / PRs.
The ScyllaDB team is pleased to announce ScyllaDB CPP RS Driver X.Y.Z, an API-compatible rewrite of https://github.com/scylladb/cpp-driver as a wrapper for the Rust driver. It will fully replace the CPP driver, which is already reaching its End of Life.
**The current driver version should be considered Beta**.
Some minor features still need to be included. See Limitations section in README.md.
The underlying Rust driver used version: A.B.C.
## Changes
**New features / enhancements:**
- Some new feature 1 ([297](https://github.com/scylladb/cpp-rs-driver/pull/297))
- Some new feature 2 ([297](https://github.com/scylladb/cpp-rs-driver/pull/297))
**Bug fixes:**
- Some bugfix 1 ([297](https://github.com/scylladb/cpp-rs-driver/pull/297))
- Some bugfix 2 ([297](https://github.com/scylladb/cpp-rs-driver/pull/297))
**Documentation:**
- Doc update 1 ([297](https://github.com/scylladb/cpp-rs-driver/pull/297))
- Doc update 2 ([297](https://github.com/scylladb/cpp-rs-driver/pull/297))
**CI / developer tool improvements:**
- Update 1 ([297](https://github.com/scylladb/cpp-rs-driver/pull/297))
- Update 2 ([297](https://github.com/scylladb/cpp-rs-driver/pull/297))
**Others:**
- Update 1 ([297](https://github.com/scylladb/cpp-rs-driver/pull/297))
- Update 2 ([297](https://github.com/scylladb/cpp-rs-driver/pull/297))
Congrats to all contributors and thanks everyone for using our driver!
----------
The source code of the driver can be found here:
- [https://github.com/scylladb/cpp-rs-driver](https://github.com/scylladb/cpp-rs-driver)
Contributions are most welcome!
Thank you for your attention, please do not hesitate to contact us if you have any questions, issues, feature requests, or are simply interested in our driver!
Contributors since the last release:
| commits | author |
|---------|-------------------|
| 45 | Lucille Perkins |
| 34 | Rachel Burton |
| 17 | Mercedes Marks |