qiwi / multi-semantic-release

Proof of concept that wraps semantic-release to work with monorepos.
BSD Zero Clause License
86 stars 34 forks source link

Prereleases not updating correctly #75

Closed virus2016 closed 10 months ago

virus2016 commented 2 years ago

Issue type

Expected behavior

When using prerelease, packages that are a dependency on one and other are updated using 1 commit, the prelease version for a should match the version of the new updated dependency.

Actual behavior

The parent dependency is updated as expected however when the next package is triggered and depends on the parent, MSR does to update the dependency but it adds an extra patch?

Example:

Parent package updated to 1.0.0-beta.1 Child package is told to update Parent to 1.0.0-beta.2 (it should be 1.0.0-beta.1)

Steps to reproduce

Create 2 packages Have one dependent on the other Create a prerelease release.rc for both Run MSR

My example below:

image image

Specifications

virus2016 commented 2 years ago

Just to add, works on the first release but if you try again... it will fail.

antongolub commented 2 years ago

@virus2016,

could you plz add a testing fixture for your case?

virus2016 commented 2 years ago

Will do!

virus2016 commented 2 years ago

We can just use the one that is already there. Just writing some tests around this.

virus2016 commented 2 years ago

@antongolub I have added a test case for this issue. I am not sure why it does not update the dependency but it is not what I am experiencing. I might of missed something.

oljekechoro commented 2 years ago

@virus2016, hi! I started working on this issue

virus2016 commented 2 years ago

Do you need me to provide anything else?

oljekechoro commented 2 years ago

@virus2016, It will take more time, because I am new in this package as a maintainer. Could you reproduce your issue in your test case? There was a problem with module caching, I wrote in your PR.

virus2016 commented 2 years ago

@oljekechoro ive tried to recreate the issue above. Here is a sequence to try and help you.

It looks like when the second package reads the first package version it takes 1.0.1 and bumps that rather it should just match the version of the first package was bumped. Does that make sense?

There might be a bigger issue here where that we might need to have an order for which packages go out first. I don't know if MSR already does this. Here are my 2 options below:

Scan and bump all the packages that that have the least dependencies to other local packages first. Example, 3 packages and 2 of them have a dependency on the 3rd, make sure the release order is 3 > 1 > 2.

Another option could be that you could add config that allows us to tell multi semantic release the order in which packages we want the releases to go out in.

I think the last option is the best where you allow config driven rather than a glob and using yarn workspaces.

virus2016 commented 2 years ago

Bump ;-)

oljekechoro commented 2 years ago

@virus2016, sorry, I had to switch to our internal tasks, I will continue as soon as I can

virus2016 commented 2 years ago

No worries ;-) - I had a look but i think this is a complex one @oljekechoro

aarne commented 1 year ago

Considering the state of the project is it correct to assume that this one will not get any attention?

antongolub commented 1 year ago

@aarne,

I'm afraid, I have nothing to reassure you. Our in-house development is forced to abandon the GitHub in favor of a different solution that does not support git notes, which is required for semrel and its extras like multi-semantic-release. Therefore, we are focusing our efforts on the alternative release tools development — zx-bulk-release, zx-semrel. What remains unchanged is that we are ready, as before, to share the results with everyone.

PS I would be happy to find another maintainer for the upstream project.

hanseltime commented 11 months ago

I have a fix for this behavior that I've pushed up as a PR. I would love to get this pushed and released as part of the actual package so please feel free to have any maintainer reach out to me or let me know if it would be better for me to publish out a fork, etc.

Thanks!

prisis commented 11 months ago

@aarne,

I'm afraid, I have nothing to reassure you. Our in-house development is forced to abandon the GitHub in favor of a different solution that does not support git notes, which is required for semrel and its extras like multi-semantic-release. Therefore, we are focusing our efforts on the alternative release tools development — zx-bulk-release, zx-semrel. What remains unchanged is that we are ready, as before, to share the results with everyone.

PS I would be happy to find another maintainer for the upstream project.

Created a fork with all needed patched and found bug tickets in this repo and in https://github.com/dhoulb/multi-semantic-release, fixed in this repo https://github.com/anolilab/multi-semantic-release -> i could provided all changes back, i changed a lot of the structure and removed dead code in the repo and is support all versions of the semantic-release