Skip to content

baseten-performance-client: Add version 0.1.13 - #2260

Merged
luhenry merged 3 commits into
mainfrom
baseten-performance-client
Sep 24, 2026
Merged

luhenry merged 3 commits into
mainfrom
baseten-performance-client

Conversation

@luhenry

@luhenry luhenry commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Compiles the baseten-performance-client subcrate (a maturin/PyO3 HTTP client over reqwest/tokio) from the truss monorepo. Upstream publishes no riscv64 wheel.

Mirrors upstream's build-maturin.yml linux job.

Differs from upstream

  • abi3 floor patched py38 -> py39 - riscv64 image ships no cp38 interpreter
  • free-threaded leg dropped - pinned pyo3 0.24.2 hard-ceilings at cp313 (upstream's own cp313-cp313t wheels confirm it), and the image ships no cp313t
  • LICENSE copied into python_bindings/ - maturin globs it relative to pyproject.toml

Matrix: cp39-abi3 only, no free-threaded leg (see above)

Testing

  • BASETEN_API_KEY set to a dummy value - only needed for client-side construction, no real deployment is contacted
  • test_client_embed.py's live-deployment cases self-skip without real credentials

License: OK

Patches

  • 0001-python_bindings-bump-abi3-floor-to-py39.patch - Inappropriate: riscv64 image ships no cp38 interpreter. Reproduces on any host with no cp38 interpreter, not riscv64-only.

Built on cp39; 30 passed, 11 skipped.

Ports basetenlabs/truss's baseten-performance-client subcrate (a maturin/
PyO3 HTTP client over reqwest/tokio) to riscv64. Upstream cuts this
package's releases as plain commits in the truss monorepo, never a git
tag; BASETEN_PERFORMANCE_CLIENT_REF pins the commit whose
python_bindings/pyproject.toml reads 0.1.13, 15 minutes before the PyPI
upload, with a Cargo.lock/src/lib.rs byte-identical to the released
sdist.

The crate's rustls feature resolves to ring, not aws-lc-sys, so riscv64
needs no extra toolchain there. Its native-tls feature vendors and
compiles OpenSSL from source, which needs a full perl (gotcha 46) rather
than the image's minimal perl-interpreter.

python_bindings/Cargo.toml hardcodes pyo3's abi3-py38 feature
unconditionally (gotcha 181's shape), and the riscv64 manylinux image's
oldest interpreter is cp39 (no cp38 at all) -- patches/ bumps the
feature to abi3-py39 so the wheel's tag matches an interpreter this repo
can actually build and test on (see gotcha 555). The free-threaded leg
follows suit at cp314t: upstream's own floor is cp313t, which neither
the image nor cibuildwheel itself offers on any platform.

Verified locally: the patched crate builds clean with `cargo check
--release`, and `maturin build --release` produces a working
cp39-abi3 wheel (LICENSE staged beside python_bindings' pyproject.toml,
since maturin's auto-discovery is relative to it) whose selected test
files pass against a dummy BASETEN_API_KEY -- the concurrency-validation
tests only need client-side construction to succeed, and every
live-deployment test self-skips without real credentials.
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-24 06:36 UTC

luhenry added a commit that referenced this pull request Sep 24, 2026
baseten-performance-client's port PR is open
(#2260); record the abi3 floor patch and
TLS backend findings on the queue entry.

Adds gotcha 555 to rust-maturin-and-pyo3.md: a maturin/PyO3 crate whose
abi3-pyNN feature is unconditional has no CIBW_ENVIRONMENT knob to
retag it when NN names an interpreter the riscv64 image doesn't ship —
the fix is a source patch to the Cargo feature itself.
First riscv64 CI run: both matrix legs (cp39-abi3, cp314t) compile the
same dependency tree concurrently on shared/limited runner memory.
cp39-abi3 aborted mid-futures-macro codegen with rustc signal 6
("corrupted double-linked list"); cp314t's job log never uploaded at
all, consistent with its runner dying the same way. Halving concurrent
rustc processes via CARGO_BUILD_JOBS=2 is gotcha 228's fix for this
exact shape (the tach case: two matrix legs, modest dependency tree,
one leg SIGABRTs while its sibling compiling the same code succeeds).
…326)

Second CI run's cp314t leg failed with pyo3-ffi's build script erroring
"configured Python interpreter version (3.14) is newer than PyO3's
maximum supported version (3.13)" -- the exact pyrage precedent
(gotcha 326). Cargo.lock pins pyo3 0.24.2, whose ceiling for any
non-abi3 (free-threaded) build is cp313; upstream's own free-threaded
wheels are built at cp313-cp313t for the same reason (confirmed against
the real PyPI release), not cp314t as this workflow's first version
assumed. The riscv64 image ships no cp313t at all (gotcha 96/11), so
there is no interpreter both image-available and within this pinned
pyo3's ceiling -- cp314t was never a valid substitute. Bumping pyo3
cascades into pyo3-async-runtimes/pythonize/numpy and a further
Python::with_gil -> try_attach API migration (gotcha 326's own pyrage
investigation hit this exact wall), too invasive for this port. Drops
the free-threaded leg entirely, matching pyrage's own fix for the
identical error.
@luhenry
luhenry merged commit 741558f into main Sep 24, 2026
12 checks passed
@luhenry
luhenry deleted the baseten-performance-client branch September 24, 2026 06:01
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