Skip to content

test(python): pin a compat beta older than the build under test - #10012

Merged
Xuanwo merged 7 commits into
lance-format:mainfrom
LuciferYang:fix/compat-beta-older-than-build
Oct 24, 2026
Merged

Xuanwo merged 7 commits into
lance-format:mainfrom
LuciferYang:fix/compat-beta-older-than-build

Conversation

@LuciferYang

@LuciferYang LuciferYang commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

The compat matrix is three recent stable majors plus one beta, and _fetch_last_beta_release filled the beta slot with the newest pre-release on the index. The release automation bumps main's version in the same commit that tags and publishes a beta, so once that beta is on the index it carries the version main is building, and the slot labels the build's own version as the older build. That is the state right after every beta release: main builds 14.0.0-beta.19 and the index's newest pre-release is 14.0.0b19.

_fetch_last_beta_release now picks the newest pre-release older than the build under test, so the slot is always strictly older than the version being built. Pre-releases are recognized with Version.is_prerelease instead of a substring search, an index entry that does not parse is skipped, and when nothing older is available the slot stays empty instead of falling back to a stable release. Reading the build's own version needs pylance, which compat-pair.yml and nightly_run.yml do not install on the host, so a missing pylance is reported as that rather than as a failed index query; the slot is then empty there, and neither workflow's tests read it.

This corrects what the slot means; it does not stop a compat case that asserts an older build lacks a feature from failing once the first beta with that feature is older than main. #10011 was such a case, and #10003 fixed it by giving the case a version threshold, which is what any such case needs regardless of this change. The cost is that a pull request's compat run no longer reads its data with the most recently published beta, only with the one before it.

Fixes #10011.

How was this patch tested

test_beta_slot_takes_the_newest_release_older_than_the_build covers the shapes the index can present: the published beta equal to the build, a beta newer than the build, versions out of order, a stable release newer than the betas, an unparseable entry, and nothing older to pin. Reverting the ordering, the pre-release filter or the parse guard each turns a case red. test_beta_slot_measures_against_the_installed_build covers the default bound, where lance.__version__ reports Cargo's 14.0.0-beta.16 and the index has the normalized 14.0.0b16. The last two tests cover a host with no pylance.

The release automation bumps main's version in the commit that cuts a
beta, so from the moment that beta is published it carries the version
every branch is also building. The beta slot took the newest pre-release
on the index, which is that one, so a compat test's older build was the
build under test.

@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.

@github-actions github-actions Bot added A-python Python bindings chore labels Oct 15, 2026
Review follow-up. Reading the build's own version needs pylance, and the
hosts that only drive provisioned venvs do not install it, so an
ImportError there was landing in the index query's except arm and
reporting a failed fury.io fetch. It is read before that arm now, and an
empty beta slot says why it is empty.

Also pins the two pieces of the selection no case covered: a stable
release is not a pre-release however recent it is, and an unparseable
version on the index is skipped rather than ending the search. The
default bound, lance.__version__ in Cargo's pre-release spelling, is now
exercised too.
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added K-approved Latest Gatekeeper recommendation permits acceptance. K-risk Latest Gatekeeper recommendation includes a non-blocking risk. labels Oct 15, 2026
…ormat

Being older than the build under test is not the same as predating the
row-address-domain migration. The pinned release moves forward with every
beta, so a 14.0.0b17 build pins 14.0.0b16, which reads the format the
current build writes and uses the index; the case asserted that no pinned
build does. It now expects the index to be used from the first release
that reads that format.
@lance-gatekeeper lance-gatekeeper Bot removed K-risk Latest Gatekeeper recommendation includes a non-blocking risk. K-approved Latest Gatekeeper recommendation permits acceptance. labels Oct 15, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added K-approved Latest Gatekeeper recommendation permits acceptance. K-risk Latest Gatekeeper recommendation includes a non-blocking risk. labels Oct 15, 2026
…e format

Correction to the previous commit. A pinned build that reads the
row-address domain does not necessarily use the index: in the
upgrade/downgrade round trip it reads after the current build has
compacted, and on a stable-row-id dataset compaction leaves the BTREE
covering no fragments until the next optimize. Expecting the index there
fails upgrade_downgrade once the pinned beta reaches 14.0.0b16. Such a
build now only has to answer correctly; the fallback assertion for
pre-migration builds is unchanged.
@lance-gatekeeper lance-gatekeeper Bot removed K-risk Latest Gatekeeper recommendation includes a non-blocking risk. K-approved Latest Gatekeeper recommendation permits acceptance. labels Oct 15, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added K-approved Latest Gatekeeper recommendation permits acceptance. and removed K-approved Latest Gatekeeper recommendation permits acceptance. labels Oct 15, 2026
…er-than-build

# Conflicts:
#	python/python/tests/compat/test_scalar_indices.py
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 15, 2026
@LuciferYang

Copy link
Copy Markdown
Contributor Author

Merged main. The conflict was in test_scalar_indices.py, and I took main's side: #10003 landed the same reader-capability split for BTreeRowAddressDomainIndex that this PR had, with a stronger check (readers from 14.0.0b16 on must use the index, and check_write re-runs optimize_indices so they have coverage to use). This PR is now only the beta-slot selector, and the description is updated to match.

lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 15, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 16, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Gate recommendation: approve.

Choosing an older prerelease restores useful cross-version coverage while preserving the stable-release matrix.

@lance-gatekeeper lance-gatekeeper Bot added K-approved Latest Gatekeeper recommendation permits acceptance. and removed K-approved Latest Gatekeeper recommendation permits acceptance. labels Oct 16, 2026

@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.

Reviewed: beta pinning now targets the newest pre-release strictly older than the build under test (release automation bumps main's version in the beta-cutting commit, so the newest pre-release can be the build itself); hosts without pylance get an explicit empty slot instead of a misleading index-query failure; unparseable versions are skipped and stables excluded; stub asserts --pre and fury.io indices stay wired. Scalar-index compat tests use a tri-state expectation once the pinned build reads the row-address domain. CI green; approving. Note: head is behind main and maintainer edits are off for this fork, so please update the branch on your side next time.

@Xuanwo
Xuanwo merged commit c11d498 into lance-format:main Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-python Python bindings chore K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: compat tests pin the build under test as the older build, failing every PR

2 participants