Skip to content

ci: replace publish-crates action with native cargo publish - #6972

Merged
wjones127 merged 1 commit into
lance-format:mainfrom
wjones127:wjones/fix-cargo-publish-workflow
May 28, 2026
Merged

wjones127 merged 1 commit into
lance-format:mainfrom
wjones127:wjones/fix-cargo-publish-workflow

Conversation

@wjones127

Copy link
Copy Markdown
Contributor

Switch the release publish step from albertlockett/publish-crates to cargo publish --workspace, which was stabilized in Rust 1.90 and supports --exclude natively.

Exclude lance-arrow-stats and lance-arrow-scalar from the per-release publish since they are versioned to track Arrow's major (currently 58.0.0) and released on Arrow's cadence, not Lance's. The previous action aborted the entire run whenever either crate's source changed without a version bump, which is what blocked the v7.0.0 Rust publish (#6732 removed a stale half dep from arrow-stats after 58.0.0 was published).

The skip_check_repo workflow_dispatch input is removed since it only configured the previous action.

Followup: bump lance-arrow-stats to 58.0.1 so its crates.io source matches the workspace tree again, then drop the corresponding --exclude from this workflow.

Fixes #6971

Test plan

  • Dispatch cargo-publish.yml with tag: v7.0.0 once this lands; verify all non-excluded workspace crates publish to crates.io

Switch the release publish step from `albertlockett/publish-crates` to
`cargo publish --workspace`, which was stabilized in Rust 1.90 and
supports `--exclude` natively.

Exclude `lance-arrow-stats` and `lance-arrow-scalar` from the
per-release publish since they are versioned to track Arrow's major
(currently 58.0.0) and released on Arrow's cadence, not Lance's. The
previous action aborted the entire run whenever either crate's source
changed without a version bump, which is what blocked the v7.0.0 Rust
publish.

The `skip_check_repo` workflow_dispatch input is removed since it only
configured the previous action.

Fixes lance-format#6971

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@github-actions github-actions Bot added the ci Github Action or Test issues label May 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@wjones127
wjones127 marked this pull request as ready for review May 27, 2026 22:46

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@Xuanwo Xuanwo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@wjones127
wjones127 merged commit 4416069 into lance-format:main May 28, 2026
4 of 5 checks passed
Xuanwo added a commit that referenced this pull request Nov 23, 2026
…arrow (#11294)

cc @westonpace — opening this PR to consolidate `lance-arrow-scalar` and
`lance-arrow-stats` into `lance-arrow` ahead of the `v15.0.0` release.
Happy to hear your thoughts if you still want to keep them as standalone
Arrow-versioned crates!

## Context

While preparing the `v15.0.0` stable release, we hit a hard Rust publish
blocker:

1. **Blocked `v15.0.0` crates.io publish**: `#10397` bumped
`lance-arrow-scalar` and `lance-arrow-stats` to `59.0.0` (pinned via
`=59.0.0` in the root `Cargo.toml`), while crates.io still only has
`58.0.0`. `.github/workflows/cargo-publish.yml` excludes both crates
(`--exclude lance-arrow-stats --exclude lance-arrow-scalar`), and there
is no other publish workflow, so `cargo publish --workspace` fails
immediately when resolving `lance-index`.
2. **Silent source drift on crates.io**: Because these two crates track
Arrow's major version instead of `workspace.package.version` and were
excluded after `#6972`, changes in `#6808` (`ArrowScalar::is_nan`) and
`#7966` (`Decimal128/Decimal256` min/max stats) landed without bumping
`58.0.0`. Rust users installing `lance 8.x–14.0.3` from crates.io
received the stale May `58.0.0` tarball instead of the workspace source,
and `#10102` added further Lance-specific ZoneMap seed NaN tracking on
top.
3. **Zero external usage & single-owner publishing**: On crates.io, both
crates have only internal Lance reverse dependencies
(`lance-arrow-stats`, `lance-index`, `lance`) and a single crate owner
(missing `github:lancedb:release`).
4. **Original goal still holds in `lance-arrow`**: The original
motivation in `#5955` / `#5967` was to avoid pulling DataFusion into
lower-level crates. `lance-arrow` has zero DataFusion dependencies, is
already depended on by `lance-encoding`, `lance-file`, `lance-core`, and
`lance-index`, and follows `workspace.package.version` cleanly.

Since `v15.0.0` is already a breaking major (Arrow 59 / DataFusion 55)
and crates.io SemVer prevents downgrading `59.0.0` back to `15.0.0`
under the old crate names, merging them into `lance-arrow` removes the
dual-track versioning and publish exclusions cleanly.

## Changes

- Move `ArrowScalar` (and its `From` conversions) into
`lance_arrow::scalar::ArrowScalar` (`rust/lance-arrow/src/scalar/`).
- Drop the unused custom binary scalar codec
(`rust/arrow-scalar/src/serde.rs`, 558 lines with zero callers outside
its own unit tests).
- Move `StatisticsAccumulator`, `Statistics`, `NanCounts`, `count_nans`,
and `count_nans_signed` into `lance_arrow::stats`
(`rust/lance-arrow/src/stats.rs` and
`rust/lance-arrow/src/stats/nan.rs`), along with its proptest regression
seeds (`rust/lance-arrow/proptest-regressions/stats.txt`).
- Add `arrow-cast` and `arrow-row` to `rust/lance-arrow/Cargo.toml`
(both are already workspace Arrow dependencies; `lance-arrow` remains
free of DataFusion).
- Update internal callers (`lance-index` zonemap/bloomfilter and
`rust/lance/tests/arrow_ordering.rs`) and remove `rust/arrow-scalar` and
`rust/arrow-stats` from the workspace and all three lockfiles
(`Cargo.lock`, `python/Cargo.lock`, `java/lance-jni/Cargo.lock`).
- Drop `--exclude lance-arrow-stats --exclude lance-arrow-scalar` from
`.github/workflows/cargo-publish.yml`, and update the
`arrow-ordering-compat` path trigger in `.github/workflows/rust.yml` and
`rust/AGENTS.md`.

## Notes on `arrow-ordering-compat`

No ordering expectations in `rust/lance/tests/arrow_ordering.rs`
changed—only the two `use` imports were updated from
`lance_arrow_scalar` / `lance_arrow_stats` to `lance_arrow::scalar` /
`lance_arrow::stats`. Because the base branch's copy of
`arrow_ordering.rs` still references the removed crates, the base-branch
compile check in `arrow-ordering-compat` will need the
`arrow-ordering-reviewed` label once reviewed.

## Verification

- `cargo fmt --all -- --check`
- `cargo test --profile ci --locked -p lance-arrow` (366 passed,
including 34 `scalar::arrow_scalar`, 4 `scalar::convert`, 64 `stats::`,
and 9 doctests)
- `cargo test --profile ci --locked -p lance-index --lib
'scalar::zonemap::tests'` (85 passed) and `'scalar::bloomfilter::tests'`
(36 passed)
- `cargo test --profile ci --locked -p lance --test arrow_ordering` (46
passed)
- `RUSTDOCFLAGS="-D warnings" cargo doc --profile ci --locked --no-deps
-p lance-arrow`
- `cargo clippy --profile ci --locked --all --tests --benches -- -D
warnings`
- `cargo clippy --profile ci --locked -p lance --test arrow_ordering --
-D warnings`
- `cargo package --workspace --no-verify --all-features` and `cargo
publish --workspace --all-features --dry-run --no-verify` (all 28
workspace crates resolve and pass dry-run)
- `cargo metadata --frozen` verified across `Cargo.toml`,
`python/Cargo.toml`, and `java/lance-jni/Cargo.toml`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Github Action or Test issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish Rust crate Failed (build)

4 participants