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

micromamba/mamba --version displays pre-release version names + establishes pre-release versions name scheme #3639

Merged
merged 9 commits into from
Dec 6, 2024

Conversation

Klaim
Copy link
Member

@Klaim Klaim commented Nov 27, 2024

Part of the effort for #3638

While I started this just to allow displaying the pre-release versions in micromamba/mamba --version, this required also changing the release scripts to provide the relevant information to the source code. As part of that change I setup the discussed pre-release version naming scheme with validation in the release scripts.

Also deprecates mamba::version_arr() and umamba::version_arr() functions which seem unusued. If there is a need for information about the version, I'll add another more precise function as a replacement, or we'll just remove these.

@Klaim Klaim added the release::enhancements For enhancements PRs or implementing features label Nov 27, 2024
@Klaim Klaim self-assigned this Nov 27, 2024
@Klaim Klaim force-pushed the klaim/pre-release-version branch from d130b82 to b618cb7 Compare November 28, 2024 14:12
@Klaim Klaim marked this pull request as ready for review November 28, 2024 14:51
@Klaim
Copy link
Member Author

Klaim commented Nov 29, 2024

Note that this version accepts a minimum of 3 dot-separated fields but does not limit the number of dots over 3, so schemes with and without additional dots are considered "valid" by the validation script.

)
)

VALID_VERSION_PRERELEASE_TYPES = ("alpha", "beta")
Copy link
Member

Choose a reason for hiding this comment

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

What about rc and dev?

@Hind-M
Copy link
Member

Hind-M commented Dec 2, 2024

Adding this as a reference.

@jjerphan
Copy link
Member

jjerphan commented Dec 2, 2024

Adding this as a reference.

This piece of conda.models.VersionOrder's docstring is also relevant (it is linked in the section Hind shared).

@Klaim Klaim force-pushed the klaim/pre-release-version branch 2 times, most recently from 08aa760 to 75c1a46 Compare December 2, 2024 15:52
Copy link
Member

@JohanMabille JohanMabille left a comment

Choose a reason for hiding this comment

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

This PR does not include the changes so that umamba --version shows pre-release versions, right?

@Klaim
Copy link
Member Author

Klaim commented Dec 4, 2024

This PR does not include the changes so that umamba --version shows pre-release versions, right?

It does (if it doesnt, its a bug in this pr): --version is implemented there and implemented in terms of the define which is generated by the scripts modified here.

In the previous code, the version name was parsed, the major minor and patch number were extracted, then the version string define was re-built from that. In this PR we just print the validated name that was used, so it will be whatever you passed to the script as long as it has been validated.

Note that it's not visible in this PR because I didnt use a pre-release version, but if you want I can use it with -dev1 as we are in development versions right now, to make it very clear from the CI?

@Klaim Klaim force-pushed the klaim/pre-release-version branch from f370833 to d1a81f8 Compare December 4, 2024 10:51
@Klaim
Copy link
Member Author

Klaim commented Dec 4, 2024

For clarity and because it's one of the intended usage, I added a commit that sets the version to 2.0.5.dev0
It is important to note that to do that I had to run the release scripts and then remove the generated changelogs. I think it would be useful to modify (in another PR) release.py to be called standalone (currently it relies on the modified changelog from update_changelog.py and make it allow just changing the version in the generated headers without changing anything else, to be able to switch the version to devN just after a release.
Another future improvement would be to have a way to add the commit id to a dev version, so that we can identify which commit matches the micromamba binary, in case someone uses such binary and reports issue. Anyway that's future improvements.

@Klaim
Copy link
Member Author

Klaim commented Dec 4, 2024

I just realized that the cmake scripts are taking the version name from the major.minor.patch numbers only, so cmake believes this is 2.0.5. @JohanMabille @jjerphan Should I fix that in this PR or another one?

@Klaim
Copy link
Member Author

Klaim commented Dec 4, 2024

@JohanMabille Confirmed that version name is complete in micromamba --version : https://github.com/mamba-org/mamba/actions/runs/12158203081/job/33905615645?pr=3639#step:10:13

@JohanMabille
Copy link
Member

@JohanMabille Confirmed that version name is complete in micromamba --version : https://github.com/mamba-org/mamba/actions/runs/12158203081/job/33905615645?pr=3639#step:10:13

Yeah my bad, I misread the code.

@JohanMabille
Copy link
Member

I just realized that the cmake scripts are taking the version name from the major.minor.patch numbers only, so cmake believes this is 2.0.5. @JohanMabille @jjerphan Should I fix that in this PR or another one?

I think it can be done in a dedicated PR

@Klaim
Copy link
Member Author

Klaim commented Dec 4, 2024

Note that I've re-launched already 3 times the failing CI run with the vcpkg command (which failed so far when trying to acquire a package); not sure what's going on exactly.

@JohanMabille
Copy link
Member

This was a vcpkg issue, not related to mamba.

@JohanMabille JohanMabille merged commit 633d8d0 into mamba-org:main Dec 6, 2024
34 checks passed
@jjerphan jjerphan deleted the klaim/pre-release-version branch December 6, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release::enhancements For enhancements PRs or implementing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants