-
Notifications
You must be signed in to change notification settings - Fork 507
Andrea/sha in dev builds #10313
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
Draft
andrea-reale
wants to merge
5
commits into
main
Choose a base branch
from
andrea/sha-in-dev-builds
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Andrea/sha in dev builds #10313
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latest documentation preview deployed successfully.
Note: This comment is updated whenever you push a commit. |
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
3411f93
to
87ef71c
Compare
Problem: all builds between one pre-release and the next have the same name today, e.g., 0.24.0-alpha.1+dev. One implication is that the wheels we build between pre-releases will also share the same version. This makes it hard to upgrade locally installed versions between pre-releases using automation (pip, pixi). This change addresses the problem by *optionally* adding a commit short-sha component to the build metadata so that `0.24.0-alpha.1+dev` becomes `0.24.0-alpha.1+dev.cafebab` when `--dev with-sha` is specified. This also help quickly identifying the commit a nightly build was build from. Why optionally and not always? The change ends up in the Cargo.toml file upon release and stays then until the next release. We do not want a specific commit sha to end up in our repo's Cargo.toml. Examples: ``` pixi run python scripts/ci/crates.py get-version 0.24.0-alpha.1+dev% pixi run python scripts/ci/crates.py version --bump auto --dry-run bump (root) from 0.24.0-alpha.1+dev to 0.24.0-alpha.2+dev pixi run python scripts/ci/crates.py version --bump auto --dev sha --dry-run bump (root) from 0.24.0-alpha.1+dev to 0.24.0-alpha.2+c5f7ec0 pixi run python scripts/ci/crates.py version --dev sha --dry-run bump (root) from 0.24.0-alpha.1+dev to 0.24.0-alpha.1+c5f7ec0 pixi run python scripts/ci/crates.py version --dev --dry-run bump (root) from 0.24.0-alpha.1+dev to 0.24.0-alpha.1+dev pixi run python scripts/ci/crates.py version --dev static --dry-run bump (root) from 0.24.0-alpha.1+dev to 0.24.0-alpha.1+dev pixi run python scripts/ci/crates.py version --dev foo --dry-run crates.py version: error: argument --dev: invalid choice: 'foo' (choose from 'static', 'sha') ``` Signed-off-by: Andrea Reale <[email protected]>
Signed-off-by: Andrea Reale <[email protected]>
Signed-off-by: Andrea Reale <[email protected]>
87ef71c
to
797e641
Compare
Signed-off-by: Andrea Reale <[email protected]>
797e641
to
2377656
Compare
This allows to fix the version once and for all workflows. Signed-off-by: Andrea Reale <[email protected]>
b5b8e4d
to
3eb37a0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dataplatform
Rerun Data Platform integration
exclude from changelog
PRs with this won't show up in CHANGELOG.md
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related
What
Problem: all builds between one pre-release and the next have the
same name today, e.g., 0.24.0-alpha.1+dev. One implication is that
the wheels we build between pre-releases will also share the same
version. This makes it hard to upgrade locally installed versions
between pre-releases using automation (pip, pixi).
This change addresses the problem by optionally adding a commit
short-sha component to the build metadata so that
0.24.0-alpha.1+dev
becomes0.24.0-alpha.1+cafebab
when--dev sha
is specified. Thisalso help quickly identifying the commit a nightly build was
build from.
When we build wheels on github, we then add the sha whenever we are dealing with a dev build.
Faq
Q: Why only optionally add the sha rather than always?
A: We do we need to fiddle with Cargo versions? Can't we just override the version of the builds by passing some parameter to the wheel builder?
maturin
takes the version from cargo by design, and does not support yet overriding it: Add a way to override the resultant Python package version PyO3/maturin#2163Examples: