Skip to content

Build and verify Linux arm64 CPython 3.14t wheels - #191

Merged
justrach merged 5 commits into
mainfrom
fix/linux-arm64-314t
Jul 10, 2026
Merged

Build and verify Linux arm64 CPython 3.14t wheels#191
justrach merged 5 commits into
mainfrom
fix/linux-arm64-314t

Conversation

@justrach

Copy link
Copy Markdown
Owner

Summary

  • build CPython 3.14t Linux aarch64 wheels on a native GitHub ARM64 runner with cibuildwheel
  • compile inside manylinux and let auditwheel repair/tag the artifact instead of manually claiming compatibility
  • install the repaired wheel in an isolated environment, require the Zig backend, start TurboAPI, and make a real HTTP request
  • add an executable Apple container Linux arm64 recipe with pinned Python/Zig/runtime inputs and a host-to-guest HTTP smoke test
  • restrict PyPI publication to validated v* tag runs

Verification performed in this session

  • Apple container 0.11.0 build and run on Apple Silicon, Linux aarch64 guest
  • CPython 3.14.6 free-threaded runtime (Py_GIL_DISABLED=1)
  • wheel-installed turbonet.cpython-314t-aarch64-linux-gnu.so loaded from site-packages
  • native backend reported zig
  • TurboAPI Zig server listened on port 8080 and returned the expected JSON through host port 18080
  • negative test confirmed a missing native extension is rejected rather than accepted as simulation mode
  • local packaging test produced a cp314-cp314t wheel containing turbonet
  • cibuildwheel 4.1.0 selected cp314t-manylinux_aarch64
  • release version tests, ruff, Python compilation, shell syntax, git diff --check, and pre-commit tests passed

The GitHub Actions ARM64 job is the source of truth for the repaired manylinux tag and must pass before merge. Publishing the wheel still requires a subsequent versioned release tag.

Closes #188
Closes #189

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@github-actions

Copy link
Copy Markdown
Contributor

Performance Regression Report

Runner: ci-pr | Duration: 5s per endpoint | Threads: 4 | Connections: 100 | Workers: 24

Endpoint req/s avg latency p99 latency threshold status
GET /health 96,663 0.18ms 1.05ms 80,000 OK
GET / 98,881 0.20ms 1.12ms 80,000 OK
GET /json 94,013 0.19ms 0.87ms 75,000 OK
GET /users/123 96,725 0.20ms 0.73ms 75,000 OK
POST /items 57,385 0.34ms 0.87ms 45,000 OK
GET /status201 86,655 0.20ms 0.67ms 65,000 OK
AVERAGE 88,387 50,000 OK

✅ All endpoints pass regression thresholds

@github-actions

Copy link
Copy Markdown
Contributor

Performance Regression Report

Runner: ci-pr | Duration: 5s per endpoint | Threads: 4 | Connections: 100 | Workers: 24

Endpoint req/s avg latency p99 latency threshold status
GET /health 85,973 0.24ms 0.99ms 80,000 OK
GET / 85,706 0.22ms 1.11ms 80,000 OK
GET /json 80,559 0.22ms 0.92ms 75,000 OK
GET /users/123 81,778 0.23ms 0.86ms 75,000 OK
POST /items 47,151 0.44ms 0.94ms 45,000 OK
GET /status201 77,182 0.25ms 0.79ms 65,000 OK
AVERAGE 76,391 50,000 OK

✅ All endpoints pass regression thresholds

@github-actions

Copy link
Copy Markdown
Contributor

Performance Regression Report

Runner: ci-pr | Duration: 5s per endpoint | Threads: 4 | Connections: 100 | Workers: 24

Endpoint req/s avg latency p99 latency threshold status
GET /health 83,137 0.22ms 1.01ms 80,000 OK
GET / 83,638 0.23ms 1.02ms 80,000 OK
GET /json 80,410 0.44ms 1.46ms 75,000 OK
GET /users/123 82,948 0.25ms 0.69ms 75,000 OK
POST /items 46,789 0.50ms 1.35ms 45,000 OK
GET /status201 75,142 0.24ms 0.77ms 65,000 OK
AVERAGE 75,344 50,000 OK

✅ All endpoints pass regression thresholds

@justrach

Copy link
Copy Markdown
Owner Author

Follow-up verification: glibc portability and POST regression

Linux arm64 wheel

The final artifact from Build & Publish run 29099807825 passed the native ARM64 wheel job. I downloaded and inspected the wheel in this session:

  • artifact: turboapi-1.0.31-cp314-cp314t-manylinux_2_28_aarch64.whl
  • undefined entropy symbol: getrandom@GLIBC_2.25
  • no undefined arc4random_buf
  • highest GLIBC symbol version reported by the ELF version table: GLIBC_2.28
  • clean manylinux wheel install loaded the extension and served the native HTTP smoke route

POST /items regression

The red gate was a real hot-path regression, not a threshold problem. Commit 2b243d0 installed a new closure on every request-model instance, adding per-request work and creating a model/closure reference cycle. 225b99f replaces that with a route-local compatibility subclass only for DHI models with list fields; the scalar benchmark model is not wrapped. Custom model_dump implementations are not modified.

I reran the unchanged PR quick suite three times at exact head SHA 225b99f54b2b188f8210fca12fb5105cf969c07d using Actions run 29099808178 (job attempts 86385473922, 86385935129, and 86386378208). Command and recorded environment:

BENCH_THREADS=4 \
BENCH_CONNECTIONS=100 \
BENCH_DURATION=5 \
BENCH_RUNNER=ci-pr \
BENCH_VCPUS=2 \
BENCH_OS=ubuntu-latest \
uv run --python 3.14t python benchmarks/bench_regression.py --ci

The runner uses 24 TurboAPI workers and disables TurboAPI response caching and rate limiting. This is the HTTP-only regression suite; no database is involved.

For POST /items, the three recorded attempts produced:

  • throughput range: 46,789.37..57,384.77 req/s
  • median: 47,151.38 req/s
  • p99 latency range: 0.87..1.35 ms
  • p99 median: 0.94 ms
  • sample count: 3

All three attempts passed the existing 45,000 req/s floor. These are reruns performed in this session and recorded in the cited Actions run; they are not a release benchmark or a cross-framework claim.

@justrach
justrach merged commit b1a4d64 into main Jul 10, 2026
19 checks passed
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.

Document TurboAPI apple/container runtime recipe and DNS/Python requirements Publish Linux aarch64 cp314t wheels for apple/container on Apple Silicon

2 participants