Skip to content

Commit 31b9520

Browse files
seanchen1991rnbguy
andauthored
chore(ci): Make use of cargo-release's rate-limit setting (#1267)
* Update Cargo.toml and RELEASES.md * Change some wording * use reference-style links * format markdown file * grammar * update text * use release.toml * update RELEASES.md * grammar --------- Co-authored-by: Ranadeep Biswas <mail@rnbguy.at>
1 parent 5dc0b09 commit 31b9520

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

RELEASES.md

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ Our release process is as follows:
44

55
1. In a new branch `release/vX.Y.Z`, update the [changelog](./CHANGELOG.md) to
66
reflect and summarize all changes in the release. This involves:
7-
1. Running `unclog build -u` and copy pasting the output at the top of the
7+
1. Running `unclog build -u` and copy-pasting the output at the top of the
88
`CHANGELOG.md` file, making sure to update the header with the new
99
version.
1010
2. Running `unclog release --editor <editor> vX.Y.Z` to create a summary of
11-
all of the changes in this release.
11+
all the changes in this release.
1212
1. Your text editor will open. Write the release summary, and close the
13-
editor. Make sure to include a comment on whether or not the release
14-
contains consensus-breaking changes.
13+
editor. Make sure to include a comment on whether the release contains
14+
consensus-breaking changes.
1515
2. Add this same summary to `CHANGELOG.md` as well.
1616
3. Committing the updated `CHANGELOG.md` file and `.changelog` directory to
1717
the repo.
@@ -21,8 +21,8 @@ Our release process is as follows:
2121
version of that crate.
2222
1. bump the version in `crates/ibc-derive/Cargo.toml`
2323
2. Publish `ibc-derive` with `cargo publish -p ibc-derive`
24-
4. Bump the versions of all crates to the new version in their Cargo.toml and in
25-
the root `Cargo.toml` as well, and push these changes to the release PR.
24+
4. Bump the versions of all crates to the new version in their `Cargo.toml` and
25+
in the root `Cargo.toml` as well, and push these changes to the release PR.
2626
- If you released a new version of `ibc-derive` in step 3, make sure to
2727
update that dependency.
2828
- Verify that there is no dev-dependency among the workspace crates. This is
@@ -35,28 +35,22 @@ Our release process is as follows:
3535
![alt test](docs/dev-deps-graph.png) The dev dependencies are colored with
3636
blue arrows. Currently, there are no blue arrows, i.e. there is no dev
3737
dependency among the IBC crates. It is advised to avoid any dev dependency
38-
because of release order complicacy (except maybe inside `ibc-testkit`, as
39-
it is the top crate that depends on `ibc` crate and no other crate depends
40-
on it).
41-
- In order to resolve such a situation, the dev dependencies other than
42-
`ibc-testkit` can be manually released to crates.io first so that the
43-
subsequent crates that depend on them can then be released via the release
44-
process. For instructions on how to release a crate on crates.io, refer
45-
[here](https://doc.rust-lang.org/cargo/reference/publishing.html).
46-
5. Beware of [crates-io rate limit][cargo-release-rate-limit]. It is 5 for
47-
publishing new crates and 30 for publishing existing crates. But the number
48-
of our crates has reached 31. So we publish a leaf crate, `ibc-primitives`
49-
manually and release the rest of the 30 crates via CI.
50-
- Release `ibc-primitives` by running:
51-
```sh
52-
cargo release -p ibc-primitives --no-push --no-tag --allow-branch main --execute
53-
```
54-
- Validate the number of crates that need to be released via CI, it can not
55-
be more than 30.
56-
- There should be a 10 minutes delay between the release of `ibc-primitives`
57-
and the release of the rest of the crates on CI.
58-
- If new crates are added, we need to recompute the set of crates that we
59-
want to release via CI. The rest must be released manually.
38+
because of release order complication (except maybe inside `ibc-testkit`,
39+
as it is the top crate that depends on `ibc` crate and no other crate
40+
depends on it).
41+
- To resolve such a situation, the dev dependencies other than `ibc-testkit`
42+
can be manually released to crates.io first so that the subsequent crates
43+
that depend on them can then be released via the release process. For
44+
instructions on how to release a crate on crates.io, refer
45+
[here][publishing].
46+
5. Validate the number of new and existing crates that need to be released via
47+
CI.
48+
1. crates.io imposes a [rate limit][crates-io-rate-limit] of publishing 1
49+
crate per minute after a burst of 10 crates.
50+
2. Also, [`cargo-release`][cargo-release-rate-limit] rejects publishing more
51+
than 5 new crates or 30 existing crates by default. If we need to publish
52+
more than these limits, we need to update `release.toml` at workspace
53+
root.
6054
6. Run `cargo doc -p ibc --all-features --open` locally to double-check that all
6155
the documentation compiles and seems up-to-date and coherent. Fix any
6256
potential issues here and push them to the release PR.
@@ -75,7 +69,7 @@ Our release process is as follows:
7569
locally to publish any missing crates from this release. This step
7670
requires the appropriate privileges to push crates to [crates.io].
7771
2. If there is any new crate published locally, add
78-
[ibcbot](https://crates.io/users/ibcbot) to its owners list.
72+
[ibcbot](https://crates.io/users/ibcbot) to its owners' list.
7973
3. In case problems arise from the source files, fix them, bump a new patch
8074
version (e.g. `v0.48.1`) and repeat the process with its corresponding
8175
new tag.
@@ -94,4 +88,6 @@ All done! 🎉
9488
9589
[crates.io]: https://crates.io
9690
[release.yaml]: https://github.com/cosmos/ibc-rs/blob/main/.github/workflows/release.yaml
97-
[cargo-release-rate-limit]: https://github.com/crate-ci/cargo-release/blob/4b09269/src/steps/mod.rs#L214-L268
91+
[crates-io-rate-limit]: https://github.com/rust-lang/crates.io/pull/1596
92+
[cargo-release-rate-limit]: https://github.com/crate-ci/cargo-release/blob/54ad949/src/config.rs#L493-L498
93+
[publishing]: https://doc.rust-lang.org/cargo/reference/publishing.html

release.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# specifies the rate limit for cargo-release when publishing existing packages
2+
# default value: { new-packages = 5, existing-packages = 30 }
3+
rate-limit = { existing-packages = 40 }

0 commit comments

Comments
 (0)