Skip to content

Conversation

@ojuschugh1
Copy link
Contributor

@ojuschugh1 ojuschugh1 commented Aug 22, 2025

What does this PR try to resolve?

This PR fixes issue #15754 where workspace publish failures provided non-actionable error messages. Previously, when publishing a workspace failed (due to rate limiting or other errors), users only saw generic errors like [ERROR] failed to publish to registry without knowing which package failed or what packages remained to be published.

How to test and review this PR?

Testing: Run cargo test workspace_publish_rate_limit_error to see the improved behavior, then cargo test publish to ensure all tests pass.

Review:

  • Commit 1: Adds test demonstrating current problematic behavior
  • Commit 2: Implements fix and updates test to expect improved output

The fix transforms error messages from generic failed to publish to registry to actionable failed to publish 'package_a' v0.1.0; the following crates have not been published yet: package_b v0.1.0, package_c v0.1.0. This improvement applies consistently across all publish error scenarios, giving users clear information about what went wrong and what remains to be done.

@rustbot rustbot added A-interacts-with-crates.io Area: interaction with registries Command-publish labels Aug 22, 2025
@weihanglo
Copy link
Member

I don't understand why we have a couple of similar PR open for the same issue. Shouldn't we consolidate all the discussions in a single place?

@ojuschugh1 ojuschugh1 force-pushed the non_actionable_error branch from f4a4804 to 207cf91 Compare August 23, 2025 11:43
@ojuschugh1 ojuschugh1 marked this pull request as ready for review August 23, 2025 12:06
@rustbot
Copy link
Collaborator

rustbot commented Aug 23, 2025

r? @epage

rustbot has assigned @epage.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 23, 2025
@epage epage force-pushed the non_actionable_error branch 2 times, most recently from 62c6c15 to d2a6dcb Compare August 25, 2025 19:57
@epage epage changed the title Fix Non-actionable error messages Add more context to publish-failed error message Aug 26, 2025
@epage epage added this pull request to the merge queue Aug 26, 2025
Merged via the queue into rust-lang:master with commit 0bfd820 Aug 26, 2025
48 of 50 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 26, 2025
bors added a commit to rust-lang/rust that referenced this pull request Aug 27, 2025
Update cargo submodule

3 commits in 623d536836b4cde09ce38609232a024d5b25da81..a6c58d43051d01d83f55a3e61ef5f5b2b0dd6bd9
2025-08-22 19:05:52 +0000 to 2025-08-26 23:05:12 +0000
- test: avoid hardcoded target spec json (rust-lang/cargo#15880)
- test(add): Cover some frontmatter corner cases (rust-lang/cargo#15886)
- Add more context to publish-failed error message (rust-lang/cargo#15879)

r? ghost
bors added a commit to rust-lang/rust that referenced this pull request Aug 27, 2025
Update cargo submodule

3 commits in 623d536836b4cde09ce38609232a024d5b25da81..a6c58d43051d01d83f55a3e61ef5f5b2b0dd6bd9
2025-08-22 19:05:52 +0000 to 2025-08-26 23:05:12 +0000
- test: avoid hardcoded target spec json (rust-lang/cargo#15880)
- test(add): Cover some frontmatter corner cases (rust-lang/cargo#15886)
- Add more context to publish-failed error message (rust-lang/cargo#15879)

r? ghost
@rustbot rustbot added this to the 1.91.0 milestone Aug 27, 2025
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 30, 2025
Update cargo submodule

3 commits in 623d536836b4cde09ce38609232a024d5b25da81..a6c58d43051d01d83f55a3e61ef5f5b2b0dd6bd9
2025-08-22 19:05:52 +0000 to 2025-08-26 23:05:12 +0000
- test: avoid hardcoded target spec json (rust-lang/cargo#15880)
- test(add): Cover some frontmatter corner cases (rust-lang/cargo#15886)
- Add more context to publish-failed error message (rust-lang/cargo#15879)

r? ghost
rust-cloud-vms bot pushed a commit to makai410/rustc_public that referenced this pull request Oct 12, 2025
Update cargo submodule

3 commits in 623d536836b4cde09ce38609232a024d5b25da81..a6c58d43051d01d83f55a3e61ef5f5b2b0dd6bd9
2025-08-22 19:05:52 +0000 to 2025-08-26 23:05:12 +0000
- test: avoid hardcoded target spec json (rust-lang/cargo#15880)
- test(add): Cover some frontmatter corner cases (rust-lang/cargo#15886)
- Add more context to publish-failed error message (rust-lang/cargo#15879)

r? ghost
makai410 pushed a commit to makai410/rust that referenced this pull request Nov 10, 2025
Update cargo submodule

3 commits in 623d536836b4cde09ce38609232a024d5b25da81..a6c58d43051d01d83f55a3e61ef5f5b2b0dd6bd9
2025-08-22 19:05:52 +0000 to 2025-08-26 23:05:12 +0000
- test: avoid hardcoded target spec json (rust-lang/cargo#15880)
- test(add): Cover some frontmatter corner cases (rust-lang/cargo#15886)
- Add more context to publish-failed error message (rust-lang/cargo#15879)

r? ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-interacts-with-crates.io Area: interaction with registries Command-publish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants