Skip to content

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
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Andrea/sha in dev builds #10313

wants to merge 5 commits into from

Conversation

andrea-reale
Copy link
Contributor

@andrea-reale andrea-reale commented Jun 20, 2025

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 becomes 0.24.0-alpha.1+cafebab when
--dev sha is specified. This
also 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?

    • 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.
  • 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?

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+5f7ec0

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 plain --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')

@andrea-reale andrea-reale added exclude from changelog PRs with this won't show up in CHANGELOG.md dataplatform Rerun Data Platform integration labels Jun 20, 2025
Copy link

github-actions bot commented Jun 20, 2025

Latest documentation preview deployed successfully.

Result Commit Link
3eb37a0 https://landing-qzgdrbz32-rerun.vercel.app/docs

Note: This comment is updated whenever you push a commit.

Copy link

github-actions bot commented Jun 20, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
3eb37a0 https://rerun.io/viewer/pr/10313 +nightly +main

Note: This comment is updated whenever you push a commit.

@andrea-reale andrea-reale force-pushed the andrea/sha-in-dev-builds branch 3 times, most recently from 3411f93 to 87ef71c Compare June 20, 2025 12:52
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]>
@andrea-reale andrea-reale force-pushed the andrea/sha-in-dev-builds branch from 87ef71c to 797e641 Compare June 20, 2025 12:54
@andrea-reale andrea-reale force-pushed the andrea/sha-in-dev-builds branch from 797e641 to 2377656 Compare June 20, 2025 13:05
This allows to fix the version once and for all workflows.

Signed-off-by: Andrea Reale <[email protected]>
@andrea-reale andrea-reale force-pushed the andrea/sha-in-dev-builds branch from b5b8e4d to 3eb37a0 Compare June 23, 2025 08:45
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant