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

Fix our continuous pre-releases #1458

Merged
merged 9 commits into from
Mar 1, 2023
Merged

Fix our continuous pre-releases #1458

merged 9 commits into from
Mar 1, 2023

Conversation

emilk
Copy link
Member

@emilk emilk commented Mar 1, 2023

Closes #1457

Summary

Ignore the +{$GITHASH} suffix (that we use for our continuous releases) when parsing rust crate version.

Details

We use -alpha.X-suffixes when we do intentional pre-releases, published to crates.io and PyPI.

We also do continuous releases of wheel on each merge to main. These are distinguished by suffixing our version string with +{$GITHASH}.

This caused issues when trying to parse the crate versions (at compile time). With this PR, we now ignore that suffix.

Why not parse it?

The +build-metadata suffixes of semver are not part of the actual version. It is metadata.

We use the crate version to version our .rrd files, and so we should ignore metadata for that anyway.

We still show the git hash with rerun --version, and include it in our analytics.

Checklist

@emilk emilk added 🧑‍💻 dev experience developer experience (excluding CI) ⛴ release Related to shipping or publishing labels Mar 1, 2023
@emilk emilk marked this pull request as draft March 1, 2023 11:23
@@ -0,0 +1,267 @@
/// We disallow version numbers larger than this in order to keep a few bits for future use.
Copy link
Member Author

Choose a reason for hiding this comment

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

Most of the following is old code, but I renamed the file, and git failed to figure that one out 😭

@emilk emilk marked this pull request as ready for review March 1, 2023 12:56
@@ -90,8 +90,7 @@ def main() -> None:
cargo_version = get_cargo_version(cargo_toml)

if sys.argv[1] == "--patch_prerelease":
git_sha = get_git_sha()
new_version = cargo_version.bump_build(git_sha)
new_version = f"{cargo_version}+{get_git_sha()}"
Copy link
Member Author

Choose a reason for hiding this comment

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

Small change here: the old code would suffix with +GITHASH.1. The new code just adds +GITHASH.

@jleibs jleibs merged commit 55954de into main Mar 1, 2023
@jleibs jleibs deleted the emilk/parse-pre-releases branch March 1, 2023 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) ⛴ release Related to shipping or publishing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

re_build_info is failing on pre-releases
2 participants