Skip to content

ladybug: Add version 0.19.1 - #2336

Open
luhenry wants to merge 3 commits into
mainfrom
ladybug
Open

luhenry wants to merge 3 commits into
mainfrom
ladybug

Conversation

@luhenry

@luhenry luhenry commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Compiles the LadybugDB (formerly Kuzu) C++ graph-database engine into a pybind11 extension. Upstream publishes no riscv64 wheel.

Mirrors upstream's python-wheel-workflow.yml, with liblbug.a built as in the Linux compat leg of precompiled-bin-workflow.yml.

Differs from upstream

  • liblbug.a built with the image's GCC 14 - no gcc-toolset-13 in manylinux_2_39_riscv64
  • openssl-devel instead of openssl3/openssl3-devel - Rocky 10's default OpenSSL is 3
  • No ccache - no build cache on the riscv64 runners

Testing

  • Mirrors ladybug-python's python-ci-pybind job
  • pyarrow 25 instead of <23 - only riscv64 build
  • cp314t: pandas/polars modules skipped - no wheels; pytz installed directly, since pandas is what brings it in for test_datatype.py
  • test_fsm.py skipped - fails identically with upstream's x86_64 0.19.1 wheel
  • 4 test_json.py tests deselected - they INSTALL json from upstream's extension server, which has no riscv64 builds

License: Wheel bundles about 20 vendored libraries (MIT, BSD, Apache-2.0); upstream ships no licence text for them, so the build adds it.

Patches

  • 0001-storage-shrink-the-VMRegion-reservation-until-it-fits.patch - To upstream [not yet submitted]. Default Database() reserves 8TB, beyond Sv39's 256GB, and fails. Reproduces on x86 under ulimit -v 256GB.
  • 0002-test-repeat-the-interrupt-until-the-query-stops.patch - To upstream [not yet submitted]. Test only. test_connection_interrupt sends one interrupt 5s in, but compiling its query takes longer than that on riscv64 and execution clears the flag when it starts, so the query ran on for ~4h and then segfaulted after teardown closed the database. Reproduces on x86 with the PyPI wheel when the sleep is shorter than the compile. Applied to the tests checkout only.
  • 0003-extension-report-riscv64-as-its-own-platform.patch - To upstream [not yet submitted]. getArch() falls back to amd64, so on riscv64 INSTALL downloaded x86-64 extension builds that LOAD could not open.

Rehearsed on x86-64 with the PyPI wheel; 272 passed, 7 failed (test_fsm.py).

LadybugDB (formerly Kuzu) is an embedded graph database; the wheel's
ladybug/_lbug is a pybind11 module over the whole C++ engine.

Mirrors upstream's python-wheel-workflow.yml: the sdist comes from
scripts/pip-package/package_tar.py on ubuntu-latest, the static
liblbug.a is built once like the Linux compat leg of
precompiled-bin-workflow.yml, and cibuildwheel links each interpreter's
extension against it. Narrowed to manylinux_riscv64 and
cp312/cp313/cp314/cp314t.

- liblbug.a is built in manylinux_2_39_riscv64 with its default GCC 14
  and openssl-devel (OpenSSL 3), where upstream's manylinux_2_28 image
  needs gcc-toolset-13 and the openssl3 packages.
- 0001 halves the buffer manager's mmap reservation on ENOMEM. The
  default max_db_size is 8TB, which does not fit in riscv64 Sv39's 256GB
  user address space, so every default Database() throws "Mmap for size
  8796093022208 failed." (reproduced on x86-64 with the PyPI wheel under
  `ulimit -v 268435456`; still present in v0.20.4).
- The wheel statically links the vendored third_party libraries but
  upstream ships only ladybug's own LICENSE; their licence files are
  copied to the sdist root as LICENSE.<dep> and asserted in the wheel.
- Tests mirror ladybug-python's python-ci-pybind job (pytest over the
  tag's tools/python_api/test with dataset/, pybind backend forced).
  pyarrow 25 is the only riscv64 build; cp314t has no pandas/polars, so
  the modules needing them are skipped there. test_fsm.py is skipped:
  it fails identically with upstream's own x86_64 0.19.1 wheel.

Rehearsed on x86-64 with the PyPI 0.19.1 wheel, this test layout and
dependency set: 272 passed (7 test_fsm failures); 168 passed with the
cp314t set.
luhenry added a commit that referenced this pull request Sep 25, 2026
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://riseproject-dev.github.io/python-wheels/pr-preview/pr-2336/

Built to branch gh-pages at 2026-09-27 17:48 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

test_connection_interrupt sends one interrupt 5s into a query whose
compilation takes longer than that on the riscv64 runners; execution
clears the flag when it starts, so the interrupt is lost, the fixture
teardown waits about 4 hours on the running query, and the query
thread then segfaults after the database is closed (cp312, cp314).
Carry a test patch that re-sends the interrupt every second within
the same 100s budget, applied to the tests checkout and kept out of
the liblbug build.

cp314t has no pandas, which is what pulls in the pytz that
test_datatype.py imports, so install pytz there directly.
The previous run got past test_connection_interrupt on every
interpreter and failed only in test_json.py, whose INSTALL json; LOAD
json tests downloaded extension.ladybugdb.com's linux_amd64 build:
getArch() falls back to "amd64" for anything that is not x86 or arm64,
and dlopen rejects the x86-64 ELF with "cannot open shared object
file: No such file or directory". 0003 makes riscv64 its own platform,
and the four tests that need a downloaded extension are deselected,
since upstream publishes no riscv64 extension builds.

This branch has not been deployed

No deployments
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