You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MAINTENANCE.md
+63-73Lines changed: 63 additions & 73 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ complicated.
10
10
This workspace consists of 4 crates:
11
11
-`scylla`: main driver crate to be used by users;
12
12
the only one expected to be added as a dependency and have items imported from (i.e. the only "public" crate).
13
-
Depends on `scylla-cql` and `scylla-macros`.
13
+
Depends on `scylla-cql`.
14
14
-`scylla-macros`: provides derive macros for users to be able to use their structs as UDTs / query parameters.
15
15
-`scylla-cql`: low-level implementation of CQL binary protocol. Depends on `scylla-macros`.
16
16
-`scylla-proxy`: mostly internal crate that aids testing. Depends on `scylla-cql`.
@@ -25,23 +25,21 @@ For sources on semver and semver in rust see:
25
25
-https://rust-lang.github.io/api-guidelines/necessities.html#public-dependencies-of-a-stable-crate-are-stable-c-stable (and some other parts of this book).
26
26
27
27
What needs to be considered for releasing:
28
-
- You mustn't change major version of scylla-cql / scylla-macros dependency in a minor update of scylla crate.
29
-
For example, if scylla 0.13.0 depends on scylla-cql 0.4, then scylla 0.13.1 mustn't depend on scylla-cql 0.5.
30
-
- We typically bump major versions of all 3 main crates (`scylla`, `scylla-cql`, `scylla-macros`) together. I'm not sure if it's necessary - I remember there were
31
-
arguments for that, but I can't remember them.
28
+
- Versions of `scylla-cql` and `scylla-macros` MUST always be the same. `scylla-cql` MUST depend on EXACT version of `scylla-macros` (e.g. `version = "=1.0.0"` in `Cargo.toml`). This ensures that we can change the `_macro_internal` module in minor releases, and generally simplifies reasoning about those 2 crates. If Rust allowed it, they would be one crate.
29
+
- For simplicity of maintenance, and to avoid potential problems with mixed versioning, we decided to always release all 3 crates together, with the same version numbers. Important: it does not allow us to make breaking changes in `scylla-cql`! Older versions of `scylla` will pick up newer versions of `scylla-cql`, e.g. after we release `scylla-cql 1.2`, `scylla 1.0` may start using it.
32
30
33
31
34
32
## Documentation
35
33
36
34
There are 2 places where documentation is published:
37
35
-[docs.rs](https://docs.rs/scylla/latest/scylla/): API docs, generated automatically when publishing a crate to [crates.io](https://crates.io/crates/scylla).
38
-
-[Documentation book](https://rust-driver.docs.scylladb.com/stable/): generated and published by our CI (see [docs-pages.yaml](https://github.com/scylladb/scylla-rust-driver/blob/main/.github/workflows/docs-pages.yaml)) when there is a push to either `main` or to some `v0.*` tag.
36
+
-[Documentation book](https://rust-driver.docs.scylladb.com/stable/): generated and published by our CI (see [docs-pages.yaml](https://github.com/scylladb/scylla-rust-driver/blob/main/.github/workflows/docs-pages.yaml)) when there is a push to either `main` or to some `v*.*.*` tag.
39
37
40
38
Parameters relevant to releasing documentation book are configured in `docs/source/conf.py` and `docs/pyproject.toml` files.
41
39
In `pyproject.toml` there is the `version` field - we do update it but I don't think it affects anything.
42
40
In `docs/conf.py` there are `TAGS`, `BRANCHES`, `LATEST_VERSION`, `UNSTABLE_VERSIONS` and `DEPRECATED_VERSIONS` fields.
43
41
44
-
`TAGS` and `BRANCHES` are lists of tags and branches for which documentation book will be built - those 2 lists add up to a list of versions you see when you click "expand" a version list in the left upper corner of [documentation book](https://rust-driver.docs.scylladb.com/stable/).
42
+
`TAGS` and `BRANCHES` are lists of tags and branches for which documentation book will be built - those 2 lists add up to a list of versions you see when you click (expand) a version list in the left upper corner of [documentation book](https://rust-driver.docs.scylladb.com/stable/).
45
43
46
44
`LATEST_VERSION` selects the element from the above list that will be the default ("stable") version shown when visiting https://rust-driver.docs.scylladb.com/stable/index.html.
47
45
@@ -60,13 +58,19 @@ It however means that **any release requires updating `conf.py` on `main` branch
60
58
61
59
## Branches and tags
62
60
63
-
We maintain a branch per major release (after releasing 1.0 we may change to a branch per minor release - this is yet to be decided). This is done so that we are able to release an update for older major release (e.g. release 0.13.3 after 0.14.0 is released).
64
-
Major version branches are named `branch-0.A.x`, where `A` is a number of the version. Example: branch for `0.14` will be `branch-0.14.x`.
61
+
Historically (before 1.0) we created a branch per major release, called e.g. `branch-0.14.x`. Those branches were used when we wanted to make a bugfix release (e.g. 0.14.1) after a new major (e.g. 0.15) was already released.
62
+
In this case we backported all necessary PRs onto such branch, and we made the release there.
63
+
64
+
After 1.x this became mostly unnecessary, and we won't create any branches unless a situation happens that requires as to. Why?
65
+
- Minor updates of the driver can be applied fearlessly, so we do not expect to have to make patches for older minor releases. If for some reason we have to release such a bugfix for older minor, we can then create a branch at its tag (e.g. create `branch-1.1.x` at tag `v.1.1.2`).
66
+
- Such branches are an additional burden.
67
+
68
+
We may create a branch for a major version when we start to really work on the next one. For example, we may create `branch-1.x` so that we can keep releasing `1.x` versions while making breaking changes related to 2.0 on `main`. This is still to be decided in the future.
65
69
66
70
All new development lands on `main` branch, and may be backported by maintainers to version branches.
67
71
68
-
Each release of `scylla` crate has a corresponding git tag. Tags are named `vA.B.C`, so release `0.14.1` will have tag `v0.14.1`.
69
-
Each such tag has a message of the form `Release 0.X.Y` (e.g. `Release 0.14.0`).
72
+
Each release of `scylla` crate has a corresponding git tag. Tags are named `vA.B.C`, so release `1.2.3` will have tag `v1.2.3`.
73
+
Each such tag has a message of the form `Release X.Y.Z` (e.g. `Release 1.2.3`).
70
74
71
75
Below is a simplified view of how this looks.
72
76
Diagrams created using [mermaid.js](https://mermaid.js.org/). If you view this file on GitHub it should be rendered correctly.
commit id: "Backport fix D " %% Space at the end because mermaid doesn't
95
-
%% allow duplicate labels and totally breaks the graph without this space
96
-
commit id: "Release 0.14.1" tag: "v0.14.1"
97
-
checkout main
95
+
commit id: "Release 2.0.0" tag: "v2.0.0"
98
96
commit id: "Fix D"
97
+
commit id: "Release 2.0.1" tag: "v2.0.1"
99
98
```
100
99
101
100
## Version bump commits
@@ -139,53 +138,44 @@ IMPORTANT: Read this whole document before attempting to do a release.
139
138
Prerequisites:
140
139
- Have write access to GitHub repo (so that you are able to push to main and create a new branch).
141
140
- Have access to our crates on [crates.io](https://crates.io).
142
-
-For each of our 3 crates in this workspace (`scylla-macros`, `scylla-cql`, `scylla`) decide if it needs a new version, and if so, what is the correct version number. See "Crates and versions" section.
141
+
-Decide what the new version should be. Take into consideration that we want to keep versions of all 3 main crates (`scylla-macros`, `scylla-cql`, `scylla`) in sync.
143
142
144
-
### Releasing a major version
145
143
146
-
1. Check out current `main`, e.g. `git fetch; git checkout origin/main`.
147
-
2. Create a new version branch, e.g. `git checkout -b "branch-0.14.x"`.
148
-
3. Create commits that bump version numbers of the crates (see `Version bump commits` section in this document).
149
-
4. Push the new branch to our repo (e.g. `git push origin branch-0.14.x`).
150
-
5. Prepare release notes (see the template at the bottom of this document).
151
-
6. (Optional, but recommended) Create a PR from the new branch to `main` so that another maintainer can review your work.
152
-
Description of this PR should consist of just release notes. **NOTE: Don't merge this PR using GitHub interface - just wait for approval.** The reason is that we want `main` and `branch-XX` to point to the same commit after merge, but Github doesn't have fast-forward merges in GUI - it will however detect such merge done in Git CLI and mark the PR as merged.
153
-
7. Checkout `main` and fast-forward merge the new branch (e.g. `git checkout main; git merge --ff-only branch-0.14.x`).
154
-
6. Create a new tag (e.g. `git tag -a v0.14.0 -m "Release 0.14.0"`).
155
-
9. Push `main` and new tag, preferably using atomic push (e.g. `git push --atomic origin main v0.14.0`). This should build book documentation and publish it on [Documentation book](https://rust-driver.docs.scylladb.com/stable/).
156
-
10. Go to the "Common steps" section below.
157
-
158
-
### Releasing a minor version
159
-
160
-
1. Checkout the correct version branch (e.g. `git checkout "branch-0.14.x"`).
144
+
### Releasing a new version
145
+
146
+
1. Checkout `main`.
161
147
2. Create some new branch (which you'll later push to your fork).
162
-
3. Perform any backports that are missing from the release.
163
148
3. Create commits that bump version numbers of the crates (see `Version bump commits` section in this document).
164
-
4. (Optional, but recommended) Push the branch to your fork and create the PR to the version branch so that another maintainer can review your work.
149
+
4. Prepare release notes (see the template at the bottom of this document).
150
+
5. (Optional, but recommended) Push the branch to your fork and create the PR to `main` so that another maintainer can review your work.
165
151
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.
166
-
5. Checkout version branch (e.g. `git checkout "branch-0.14.x"`) and fast-forward merge your changes (`git merge --ff-only your_branch`).
167
-
6. Create a new tag (e.g. `git tag -a v0.14.1 -m "Release 0.14.1"`).
168
-
7. Push version branch and new tag, preferably using atomic push (e.g. `git push --atomic origin branch-0.14.x v0.14.1`).
169
-
8. Create a new commit on `main` that updates documentation version - see "Documentation" section in this document. This should build book documentation and publish it on [Documentation book](https://rust-driver.docs.scylladb.com/stable/).
170
-
9. Go to the "Common steps" section below.
171
-
172
-
### Common steps
173
-
174
-
1. Verify that documentation book was published at [Documentation book](https://rust-driver.docs.scylladb.com/stable/).
175
-
2. Publish all updated crates to crates.io. Make sure you are using newest stable version of Rust. In the main folder of the repository run `cargo publish -p <crate>` for each crate that is being updated, in correct order (`scylla-macros`, `scylla-cql`, `scylla-proxy`, `scylla`).
176
-
3. Verify that new versions are visible on crates.io and their docs on docs.rs.
177
-
4. Go to https://github.com/scylladb/scylla-rust-driver/releases , click the `Draft new release` button and follow the procedure to create a new release on GitHub. Use the release notes as its description.
178
-
5. (Mandatory for major release, optional for minor release) Publish a post on the forum:
152
+
6. Checkout `main` and fast-forward merge your changes (`git merge --ff-only your_branch`).
153
+
7. Create a new tag (e.g. `git tag -a v1.2.0 -m "Release 1.2.0"`).
154
+
8. Push `main` and the new tag, preferably using atomic push (e.g. `git push --atomic origin main v1.2.0`).
155
+
9. Create a new commit on `main` that updates documentation version - see "Documentation" section in this document. This should build book documentation and publish it on [Documentation book](https://rust-driver.docs.scylladb.com/stable/).
156
+
10. Verify that documentation book was published at [Documentation book](https://rust-driver.docs.scylladb.com/stable/).
157
+
11. Publish all updated crates to crates.io. Make sure you are using newest stable version of Rust. In the main folder of the repository run `cargo publish -p <crate>` for each crate that is being updated, in correct order (`scylla-macros`, `scylla-cql`, `scylla-proxy`, `scylla`).
158
+
12. Verify that new versions are visible on crates.io and their docs on docs.rs.
159
+
13. Go to https://github.com/scylladb/scylla-rust-driver/releases , click the `Draft new release` button and follow the procedure to create a new release on GitHub. Use the release notes as its description.
160
+
14. (Mandatory for major / minor release, optional for patch release) Publish a post on the forum:
179
161
- Go to [Release notes](https://forum.scylladb.com/c/scylladb-release-notes/18) section.
180
162
- Click "New Topic".
181
-
- Title should be `[RELEASE] ScyllaDB Rust Driver <version>`, e.g. `[RELEASE] ScyllaDB Rust Driver 0.14.0`
163
+
- Title should be `[RELEASE] ScyllaDB Rust Driver <version>`, e.g. `[RELEASE] ScyllaDB Rust Driver 1.2.0`
@@ -207,25 +198,24 @@ Guidelines on how to write release notes:
207
198
208
199
- Go over all the PRs / commits since previous release. Usually: `git log --first-parent` to see
209
200
merge commits and commits that are directly on a branch. You can also try filtering
210
-
merged PRs on Github by merge date, but it's cumbersome.
201
+
merged PRs on Github by merge date, but it's cumbersome. Since 1.0 we try to assign each merged PR to a milestone,
202
+
which should make this process much easier - you can just go over e.g. https://github.com/scylladb/scylla-rust-driver/milestone/18?closed=1
211
203
212
-
- Items in release notes will usually correspond 1:1 to PRs / comits - but not always. It is possible that
204
+
- Items in release notes will usually correspond 1:1 to PRs / commits - but not always. It is possible that
213
205
some functionality that should be a single item on the list is split over multiple PRs.
214
206
It is also possible that single PR will be mentioned in two items.
215
207
216
-
- Release notes for a a major version should contain all changes since the previous major version. Release notes for a minor version should contain all changes since previous version.
208
+
- Release notes should contain all items since previous (in terms of semver) version released at the time. Items that were backported will be
209
+
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.
217
210
218
-
- Release notes for **major** version should contain a table with number of commits per contributor.
219
-
You can generate this data with a command
220
-
`git shortlog $(git merge-base main previous_version_tag)..HEAD -s -n`
221
-
(or `git shortlog previous_major_version_tag..HEAD -s -n`, assuming that a major
222
-
version tag is on a commit present in `main` branch, as it should be).
211
+
- Release notes should contain a table with the number of non-backported commits per contributor.
212
+
Depending on the situation you may generate it with `git shortlog $(git merge-base main previous_version_tag)..HEAD -s -n` and manually subtracting
213
+
backported commits, or just `git shortlog previous_version_tag..HEAD -s -n` .
214
+
If it is too much work, or you can't figure out how to calculate it in particular situation, you can skip it.
223
215
This table should not count version bump commits - subtract them from your
224
216
row if you already created them.
225
217
226
-
- Release notes for **minor** version should NOT contain the aforementioned list.
227
-
228
-
- Remember to update the amount of crate downloads and Gtihub stars!
218
+
- Remember to update the amount of crate downloads and GtiHub stars!
229
219
230
220
231
221
## Release notes template
@@ -234,7 +224,7 @@ PR numbers in the list are random, they are just here to emphasize that entries
234
224
should contain links to relevant PR / PRs.
235
225
236
226
```
237
-
The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.X.0,
227
+
The ScyllaDB team is pleased to announce ScyllaDB Rust Driver X.Y.Z,
238
228
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
239
229
240
230
Some interesting statistics:
@@ -244,14 +234,14 @@ Some interesting statistics:
244
234
245
235
## Changes
246
236
247
-
**API cleanups / breaking changes:**
248
-
- Some breaking change 1 ([123](https://github.com/scylladb/scylla-rust-driver/pull/123))
249
-
- Some breaking change 2 ([123](https://github.com/scylladb/scylla-rust-driver/pull/123))
250
-
251
237
**New features / enhancements:**
252
238
- Some new feature 1 ([123](https://github.com/scylladb/scylla-rust-driver/pull/123))
253
239
- Some new feature 2 ([123](https://github.com/scylladb/scylla-rust-driver/pull/123))
254
240
241
+
**Bug fixes:**
242
+
- Some bugfix 1 ([123](https://github.com/scylladb/scylla-rust-driver/pull/123))
243
+
- Some bugfix 2 ([123](https://github.com/scylladb/scylla-rust-driver/pull/123))
0 commit comments