Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace releases all packages #1311

Closed
baszalmstra opened this issue Feb 27, 2024 · 4 comments
Closed

Workspace releases all packages #1311

baszalmstra opened this issue Feb 27, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@baszalmstra
Copy link

Bug description

I am working with a repository that contains several crates in a single workspace. I would expect if a change happens to one of the packages that only that package should have to be released.

See this PR created by release-plz that shows some undesired behavior:

  1. All crates in the workspace are bumped, even if there are no changes in the crate.
  2. Some changes do not affect the code at all, (moving dependencies from workspace to individual crates) but the crates are still bumped.

I understand that if other crates depend on that crate they might also require a bump. But if the changed crate's version would still satisfy the dependants requirement I don't think a bump is required.

  • Would you like to work on a fix? Sure!

To Reproduce

Steps to reproduce the behavior:

  1. Take this repository: https://github.com/mamba-org/rattler
  2. Run release-plz update and notice that all crates are updated.

Expected behavior

I would only expect a version bump for creates that:

  1. have code changes (Basically the crates that also show API compatible changes).
  2. depend on other workspace crates that just received an incompatible bump.
@baszalmstra baszalmstra added the bug Something isn't working label Feb 27, 2024
@MarcoIeni
Copy link
Owner

Release-plz force-pushed the release pr 15 minutes after you opened this issue.
I can't reproduce this bug.
Also rattler is a big repository.

Please, submit:

  • commit in the history where I should run release-plz update
  • why the actual release-plz update output is wrong
  • expected release-plz update output (changed Cargo.toml and changelog)

It's even better if you manage to reproduce your issues in a smaller repository (maybe a toy repo you created just for reproducing release-plz issues)!

@baszalmstra
Copy link
Author

Hey @MarcoIeni, sorry I should have been more clear:

* `rattler`: 0.19.0 -> 0.19.1 (✓ API compatible changes)
* `rattler_conda_types`: 0.19.0 -> 0.19.1 (✓ API compatible changes)
* `rattler_digest`: 0.19.0 -> 0.19.1
* `rattler_macros`: 0.19.0 -> 0.19.1
* `rattler_package_streaming`: 0.19.0 -> 0.19.1 (✓ API compatible changes)
* `rattler_networking`: 0.19.0 -> 0.19.1 (✓ API compatible changes)
* `rattler_lock`: 0.19.0 -> 0.19.1 (✓ API compatible changes)
* `rattler_repodata_gateway`: 0.19.0 -> 0.19.1 (✓ API compatible changes)
* `rattler_solve`: 0.19.0 -> 0.19.1 (✓ API compatible changes)
* `rattler_libsolv_c`: 0.19.0 -> 0.19.1
* `rattler_virtual_packages`: 0.19.0 -> 0.19.1 (✓ API compatible changes)
* `rattler_index`: 0.19.0 -> 0.19.1 (✓ API compatible changes)
* `rattler_shell`: 0.19.0 -> 0.19.1 (✓ API compatible changes)

release-plz seems to bump certain packages that haven't changed at all or are still compatible with some of the changes. Note for instance the package rattler_macros. I also noted in the logs:

 2024-02-29T09:11:23.836209Z  INFO  rattler_macros: already up to date

I would expect release plz not to bump any of those crates.

@MarcoIeni
Copy link
Owner

MarcoIeni commented Mar 4, 2024

The pr body shows the rattler_macros crate update (i.e. rattler_macros: 0.19.0 -> 0.19.1 because it has the version.workspace = true in Cargo.toml, but if you look at the changed files, rattler_macros doesn't contain any changes.
However, when you merge the PR, the new version of rattler_macros will be published, because version.workspace changed. So I think it makes sense that it appears in the PR body.

Why do you think release-plz is behaving incorrectly here?

@baszalmstra
Copy link
Author

🤦

Thank you for debugging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants