Skip to content

fiftyone-db: Add version 1.4.1 - #2634

Merged
luhenry merged 3 commits into
mainfrom
fiftyone-db
Oct 2, 2026
Merged

luhenry merged 3 commits into
mainfrom
fiftyone-db

Conversation

@luhenry

@luhenry luhenry commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

fiftyone-db is a thin wheel that bundles a prebuilt mongod binary per platform; it has no compiled extension of its own. Upstream's own release workflow (build-db.yml) builds no Linux wheel at all - every Linux install today falls back to building the sdist locally, because CustomBdistWheel.get_tag() returns the raw sysconfig platform string for any architecture it doesn't special-case, and that string ("linux-riscv64") is not a valid wheel tag.

This was previously looked at and parked as infeasible (no riscv64 mongod exists anywhere, confirmed against MongoDB's own distribution index, Gentoo, Ubuntu, and a stalled 2025 community build attempt - all still true). What changes that conclusion is voxel51/fiftyone#8637, an open upstream PR that fixes exactly the wheel-tagging gap: it normalizes get_tag()'s platform string and adds an explicit riscv64 branch tagging manylinux_2_39_riscv64. As that PR's own description states, the wheel still ships without mongod - _get_download() finds no riscv64 entry in LINUX_DOWNLOADS and returns None, which write_wheelfile() already handles as a no-op, leaving fiftyone/db/bin/ empty instead of raising. Callers set database_uri to point at an external MongoDB, exactly as fiftyone's own docs already describe for any platform lacking a bundled mongod.

Differs from upstream

  • Built against the db-v1.4.1 tag, not the whole-repo v1.4.1 tag - fiftyone-db versions independently of the main fiftyone package.
  • Backports PR #8637's two commits as patches (upstream hasn't merged them yet).
  • Adds a Linux/riscv64 build leg upstream's own workflow doesn't have at all, run inside the manylinux riscv64 image, matching the shape of upstream's own per-platform python -m build step (no interpreter matrix - the wheel is tagged py3-none, no compiled extension).
  • A CI step asserts the built wheel is NOT silently given a mongod it was never meant to carry, matching the documented, upstream-intended behavior for this platform.

Matrix: single build (py3-none), no interpreter matrix - matches upstream's own per-platform builds.

Testing: installs the built wheel into a fresh venv and imports fiftyone.db, checking it loads cleanly with its (expectedly empty) bin directory.

License: Apache-2.0, OK.

Patches

  • 0001-package-db-normalize-the-platform-tag-in-get_tag.patch - Submitted upstream (Add riscv64 support voxel51/fiftyone#8637, not yet merged).
  • 0002-package-db-tag-riscv64-wheels-as-manylinux_2_39_riscv64.patch - Submitted upstream (same PR).

Ports the first riscv64 build of fiftyone-db. Upstream's own release
workflow (build-db.yml) has no Linux leg at all: every Linux install
today builds the sdist locally, because CustomBdistWheel.get_tag()
falls through to the raw sysconfig platform string for any arch it
doesn't special-case, and that string ("linux-riscv64") is not a valid
wheel tag.

Backports the two-commit fix from voxel51/fiftyone#8637 (open, not yet
merged): normalize the platform tag the same way bdist_wheel itself
does, and give riscv64 its own manylinux_2_39_riscv64 branch. As that
PR's own description says, MongoDB ships no riscv64 binary, so the
wheel installs with an empty fiftyone/db/bin/ instead of raising -
_get_download() finds no riscv64 entry in LINUX_DOWNLOADS and returns
None, which write_wheelfile() already handles as a no-op. Callers set
database_uri to point at an external MongoDB, same as fiftyone's docs
already describe for any platform without a bundled mongod.

Mirrors upstream's own per-platform build step (`python -m build`
inside the manylinux riscv64 image, no interpreter matrix - the wheel
is tagged py3-none and carries no compiled extension), run against the
db-v1.4.1 tag rather than the whole-repo v1.4.1 tag, since fiftyone-db
versions independently of the main fiftyone package.
luhenry added a commit that referenced this pull request Oct 2, 2026
Un-parked after finding voxel51/fiftyone#8637, an open upstream PR
that fixes the wheel-tagging gap that made a riscv64 build impossible
at all, not just mongod-less.
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-02 16:34 UTC

git -C fiftyone apply ../python-wheels/patches/.../*.patch failed with
"No such file or directory" on the literal, unexpanded "*.patch" - the
glob is expanded by the shell before git ever runs, using the shell's
own cwd ($GITHUB_WORKSPACE, where fiftyone/ and python-wheels/ are
siblings), not the directory -C switches git into. "../python-wheels"
from there walks out of the workspace entirely, so the glob matched
nothing and bash passed the pattern through unexpanded.

Expand it from $PWD (still $GITHUB_WORKSPACE at that point) instead,
so the glob actually resolves before -C's own path handling applies to
each matched filename.
The build itself was fine - the wheel came out correctly tagged
(fiftyone_db-1.4.1-py3-none-manylinux_2_39_riscv64.whl), with no
mongod bundled and the right files. The smoke-test step then installed
it with the bare runner's own python3/pip instead of the image's, and
pip rejected it outright: "is not a supported wheel on this platform."
The runner's pip computes platform-tag compatibility against its own
glibc, not the manylinux_2_39 baseline the wheel is tagged for, so it
never recognized the tag as installable even though the wheel is a
perfectly good riscv64 wheel built to spec.

Move the tag/contents check and the smoke-test into the same docker
run as the build, so every check happens against the glibc baseline
the wheel actually claims.
@luhenry
luhenry marked this pull request as ready for review October 2, 2026 15:37
luhenry added a commit that referenced this pull request Oct 2, 2026
@luhenry
luhenry merged commit 5978d92 into main Oct 2, 2026
11 of 12 checks passed
@luhenry
luhenry deleted the fiftyone-db branch October 2, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant