Skip to content

ci: check new crates are reserved on crates.io before merge (#3185) - #3218

Merged
laskoviymishka merged 2 commits into
apache:0.11.xfrom
dannycjones:backport-0.11.x-check-crates-reserved
Sep 14, 2026
Merged

ci: check new crates are reserved on crates.io before merge (#3185)#3218
laskoviymishka merged 2 commits into
apache:0.11.xfrom
dannycjones:backport-0.11.x-check-crates-reserved

Conversation

@dannycjones

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Backport of #3185 to 0.11.x branch.

Related to #3034.

What changes are included in this PR?

CI will block where any of the publishable crates do not have at least one version on crates.io, to highlight where a maintainer needs to create a crate ahead of a release candidate.

The release guide also has changes related to this in the commit.

Are these changes tested?

N/A

AI Disclosure

Used LLM to assist in backporting this change. Reviewed by me for correctness.

)

* ci: check new crates are reserved on crates.io before merge

Trusted publishing can't create a crate, and the release workflow publishes
the whole workspace in one `cargo publish --workspace` run, which cargo
aborts if any crate already exists at the release version. So the existing
"publish the new crate by hand after the workflow fails" instructions no
longer work.

Add a lint step that fails if a publishable crate is missing from
crates.io, and rewrite the release guide appendix around reserving the
crate with a placeholder version when it is added.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* docs: reserve the crate name with a standalone placeholder crate

Overriding the version inside the workspace fails because iceberg depends
on the new crate at the workspace version. Verified with cargo publish
--dry-run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* ci: match the existing publishable-crate filter; document partial publish recovery

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* docs: clarify that reserving a crate needs a token with the publish-new scope

Owning the existing crates does not imply the token in ~/.cargo/credentials.toml
has publish-new, and crates.io reports a missing scope as a generic
authentication failure. Say so, and point at where to create the token.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* docs: fix stale first-publish note, empty placeholder, and owner invitations

- The release steps still said the publish workflow is expected to fail on
  new crates and linked to a heading that no longer exists.
- `cargo new --lib` generates a non-empty lib.rs; use mkdir and touch.
- `cargo owner --add <user>` sends an invitation that must be accepted.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* ci: fail the crates.io check if the crate list is empty

A failed `cargo metadata` inside `for pkg in $(...)` never trips
`bash -e`, so the loop ran zero times and the step passed without
checking anything. Capture the list first and fail if it is empty.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit cb912c9)
@dannycjones

Copy link
Copy Markdown
Contributor Author

FYI @CTTY

@kevinjqliu kevinjqliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

this is a backport

@kevinjqliu

Copy link
Copy Markdown
Contributor

Error response from daemon: pull access denied for minio/mc, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

looks like we also need the minio PR 😄

@dannycjones
dannycjones marked this pull request as draft September 14, 2026 15:57
@dannycjones

Copy link
Copy Markdown
Contributor Author

Error response from daemon: pull access denied for minio/mc, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

looks like we also need the minio PR 😄

Being RM for 0.11.0 will be simple, I thought... 😄

Thanks @kevinjqliu, opened the backport PR. #3220

@dannycjones
dannycjones marked this pull request as ready for review September 14, 2026 17:21
@dannycjones

Copy link
Copy Markdown
Contributor Author

Ready to merge, thanks all!

@laskoviymishka
laskoviymishka merged commit bc609c8 into apache:0.11.x Sep 14, 2026
19 checks passed
@dannycjones
dannycjones deleted the backport-0.11.x-check-crates-reserved branch September 14, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants