Repository navigation
oha 1.17.0 (new): HTTP load generator, built from source - #1634
Conversation
hatoo/oha, MIT: constant-rate HTTP load (-q) with latency histograms and JSON/CSV output, for network scenarios in boxes. Built with upstream's default features (rustls on aws-lc-rs); cargo fetch --locked, then the offline build under detbuild. Reads the system trust store, so ca-certificates is a runtime dep. Upstream's Cargo.lock is moved to url 2.5.9 (RUSTSEC-2026-0592) by a cargo-generated lock patch, checked fail-closed in build.sh. Tests: version, a 50-request run at 100 QPS against a loopback Python http.server (every response a 200), and a closed port reported as errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 3 billable files and costs up to $0.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 46 minutes for your next included review. View limit details
|
There was a problem hiding this comment.
Scope matches the title. The diff adds one new package, packages/oha, with three files and touches nothing else. Clobber none: git log shows only this commit on the path. Correctness the recipe follows packages/cargo-mutants line for line: fetch with --locked, then the --frozen build under detbuild, then the fail-closed readelf check. The lock patch follows the hand-made pattern of packages/gws/build.sh. ca-certificates is declared in runtime_deps, as the trust store rule requires. Every import is used and the import line order is correct. The three findings are comment and log nits. Nothing blocks the change. Not checked: no build or test ran. I did not compare the patch hunks or the two new checksums against upstream's Cargo.lock or crates.io, because the sandbox gave no network and most shell commands were denied. cargo fetch --locked fails the build on a wrong checksum. gitleaks and trivy did not run. I read the diff for secrets and found none. The x86_64 build is unverified, as the PR body says.
| # http3). The binary statically links three C libraries that cargo builds from the | ||
| # crates: aws-lc (rustls' crypto provider, via aws-lc-sys, built with cmake), jemalloc | ||
| # (tikv-jemalloc-sys, autotools + make) and SQLite (rusqlite "bundled", for | ||
| # `--output-format` db exports). |
There was a problem hiding this comment.
nit · The comment says that SQLite serves --output-format db exports. As I recall the oha CLI, --output-format selects text, json, csv or quiet, and --db-url is the flag that writes to SQLite. I did not run oha --help to confirm this. Name --db-url in the comment if that is correct.
There was a problem hiding this comment.
Will check against oha --help and fix the comment in a follow-up after this lands (it's in the merge queue).
| # URLs): moves upstream's Cargo.lock to url 2.5.9 and form_urlencoded 1.2.3, which | ||
| # it requires. Lock-only, produced by `cargo update -p url@2.5.8 --precise 2.5.9`. | ||
| # oha does not call Url::origin itself; this keeps the shipped crate set free of | ||
| # known advisories. Drop on the first upstream release that locks url >= 2.5.9 (the |
There was a problem hiding this comment.
nit · The comment says that the patch keeps the shipped crate set free of known advisories. The PR body lists two advisories that still ship: chrono (RUSTSEC-2026-0543) and humantime (RUSTSEC-2026-0542), both unmaintained. Write "free of known vulnerabilities", or name the two that remain.
There was a problem hiding this comment.
Agreed, I'll name the two unmaintained crates (chrono RUSTSEC-2026-0543, humantime RUSTSEC-2026-0542) in the same follow-up.
| fi | ||
|
|
||
| # Logged so two builds can be compared (reproducibility). | ||
| sha256sum "$OUTPUT_DIR/usr/bin/oha" |
There was a problem hiding this comment.
nit · This sha256sum line is an aid from the PR's own reproducibility check. It is not a build step. The other detbuild recipes that I checked (cargo-mutants, cargo-fuzz, codex) do not print the output hash. Remove the line, or keep it if the team wants the hash in every build log.
There was a problem hiding this comment.
I'll drop the sha256sum line in the follow-up; it was only a local reproducibility aid.
* iperf3, oha: review follow-ups (license refs, comments)
iperf3: license_spdx adds LicenseRef-Public-Domain (src/portable_endian.h)
and LicenseRef-Lucent-Notice (the Lucent Technologies permission notice that
LICENSE attaches to src/net.{c,h}; same family as SPDX dtoa but not a match).
oha: the SQLite comment names --db-url (--output-format is text/json/csv/quiet
in 1.17.0); the lock-patch comment says "free of known vulnerabilities" and
names the two unmaintained advisories still shipped (chrono
RUSTSEC-2026-0543, humantime RUSTSEC-2026-0542); build.sh drops the
sha256sum line, which was only a local reproducibility aid.
Follow-up to gominimal#1632 and gominimal#1634 review threads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* iperf3: the NOASSERTION sentence names LICENSE, not the header before it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
What
New package oha 1.17.0 (hatoo/oha): an HTTP load generator with a constant request rate (
-q), latency histograms and JSON/CSV output. It's for end-to-end network scenarios inside Minimal boxes on aarch64 and x86_64.LICENSE, andCargo.tomlsays the same.cargo fetch --lockedruns first, then the offline--frozenbuild underdetbuild. RUSTFLAGS uses codegen-units=1, v0 mangling and remapped paths, the same as cargo-mutants. The C libraries cargo builds (aws-lc, jemalloc, bundled SQLite) get-ffile-prefix-map.cmakeandmakeare build deps for aws-lc-sys and tikv-jemalloc-sys.ca-certificates. rustls-native-certs reads/etc/ssl/certs, and oha has no webpki-roots. build.sh fails closed if the binary NEEDs anything beyond glibc and libgcc_s.RustSec (effective Cargo.lock, OSV.dev)
Url::origin()on nestedblob:URLs).rustsec-2026-0592-url-lock.patchmoves url to 2.5.9 and form_urlencoded to 1.2.3, which url 2.5.9 requires.cargo update -p url@2.5.8 --precise 2.5.9) and checked it withcargo metadata --locked.origin().pkgmgr lock-patchoutput. pkgmgr can regenerate it into the standard block if preferred.Compiling actix*orh2 v0.3lines. The h2 that is compiled is 0.4.20.Tests
version_check:oha --versionequalsoha 1.17.0.loopback_load: Pythonhttp.serveron 127.0.0.1, thenoha -n 50 -c 2 -q 100 --no-tui --output-format json. The JSON summary must showsuccessRate == 1andstatusCodeDistribution == {"200": 50}.closed_port: against 127.0.0.1:1,successRate == 0and a non-emptyerrorDistribution.Verified locally (aarch64 only)
min package build --rebuild --verbose ohabuilt twice in separate runs. Both gave the sameusr/bin/ohasha256,748e4c63…eb574.min check --packages ohapasses every checker, including standalone tests. I read the full output from the session socket.loopback_loadfail. That run printedsuccessRate=1.0 codes={'200': 50}, so the 50 requests really ran.Notes
cargo update -p url@2.5.8 --precise 2.5.9(cargo 1.100.0) and checked withcargo metadata --locked.pkgmgr lock-patchcan't run on the machine this was made on. build.sh fails closed if the patch didn't land: it applies the patch by name, then refuses any url below 2.5.9. When upstream's lock changes, pkgmgr's updater takes the hand-written patch over and regenerates it on the next bump.🤖 Generated with Claude Code