8000 oha 1.17.0 (new): HTTP load generator, built from source by bryan-minimal · Pull Request #1634 · gominimal/pkgs · GitHub
[go: up one dir, main page]

Skip to content

oha 1.17.0 (new): HTTP load generator, built from source - #1634

Merged
bryan-minimal merged 1 commit into
mainfrom
oha-1.17.0
Nov 23, 2026
Merged

bryan-minimal merged 1 commit into
mainfrom
oha-1.17.0

Conversation

@bryan-minimal
@bryan-minimal bryan-minimal commented Nov 22, 2026 •
Copy link
Copy Markdown
Member

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.

  • Source: the GitHub tag archive. The sha256 was computed from the archive itself.
  • Licence: MIT. I read it in the tarball's LICENSE, and Cargo.toml says the same.
  • Build: upstream's default features: rustls with the aws-lc-rs provider, no native-tls, no http3. cargo fetch --locked runs first, then the offline --frozen build under detbuild. 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. cmake and make are build deps for aws-lc-sys and tikv-jemalloc-sys.
  • Runtime deps: glibc, libgcc and 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)

  • Fixed here: RUSTSEC-2026-0592, url 2.5.8 (a stack overflow in Url::origin() on nested blob: URLs). rustsec-2026-0592-url-lock.patch moves url to 2.5.9 and form_urlencoded to 1.2.3, which url 2.5.9 requires.
    • I produced the patch with cargo 1.100.0 (cargo update -p url@2.5.8 --precise 2.5.9) and checked it with cargo metadata --locked.
    • build.sh applies it and then fails closed if any url below 2.5.9 is still locked.
    • oha itself doesn't call origin().
    • The patch is hand-made, not pkgmgr lock-patch output. pkgmgr can regenerate it into the standard block if preferred.
  • In the lock but not compiled: actix-http 3.21.0 (RUSTSEC-2026-0552, -0553 and -0554) and h2 0.3.27 (RUSTSEC-2026-0258). These are dev-dependencies, and the build log has no Compiling actix* or h2 v0.3 lines. The h2 that is compiled is 0.4.20.
  • Informational, shipped, not fixable by a lock move: chrono 0.4.45 (RUSTSEC-2026-0543, unmaintained) and humantime 2.4.0 (RUSTSEC-2026-0542, unmaintained).
  • The CVE-2026-111943 floors already hold upstream: rustls-webpki 0.103.17, webpki-root-certs 1.0.12, rustls 0.23.46.

Tests

  • version_check: oha --version equals oha 1.17.0.
  • loopback_load: Python http.server on 127.0.0.1, then oha -n 50 -c 2 -q 100 --no-tui --output-format json. The JSON summary must show successRate == 1 and statusCodeDistribution == {"200": 50}.
  • closed_port: against 127.0.0.1:1, successRate == 0 and a non-empty errorDistribution.

Verified locally (aarch64 only)

  • min package build --rebuild --verbose oha built twice in separate runs. Both gave the same usr/bin/oha sha256, 748e4c63…eb574.
  • min check --packages oha passes every checker, including standalone tests. I read the full output from the session socket.
  • Negative control: changing the expected count to 51 made loopback_load fail. That run printed successRate=1.0 codes={'200': 50}, so the 50 requests really ran.
  • x86_64 has not been built locally; build-bot covers it.

Notes

  • The lock patch is hand-generated, made with cargo update -p url@2.5.8 --precise 2.5.9 (cargo 1.100.0) and checked with cargo metadata --locked. pkgmgr lock-patch can'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.
  • Source: the GitHub tag archive, fetched directly. GitHub is a stable upstream and pkgmgr mirrors on later updates.

🤖 Generated with Claude Code

8000

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>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner November 22, 2026 22:23
@coderabbitai
coderabbitai Bot commented Nov 22, 2026
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 3 billable files and costs up to $0.75.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 63 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b1f2fc7 and ac4739e.

Files selected for processing: 3

  • packages/oha/build.ncl
  • packages/oha/build.sh
  • packages/oha/rustsec-2026-0592-url-lock.patch
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/oha/build.ncl
# 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).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will check against oha --help and fix the comment in a follow-up after this lands (it's in the merge queue).

Comment thread packages/oha/build.ncl
# 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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

8000 Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I'll name the two unmaintained crates (chrono RUSTSEC-2026-0543, humantime RUSTSEC-2026-0542) in the same follow-up.

Comment thread packages/oha/build.sh
fi

# Logged so two builds can be compared (reproducibility).
sha256sum "$OUTPUT_DIR/usr/bin/oha"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll drop the sha256sum line in the follow-up; it was only a local reproducibility aid.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit ffdd3c1 Nov 23, 2026
16 checks passed
@bryan-minimal
bryan-minimal deleted the oha-1.17.0 branch November 23, 2026 16:55
evanspearman pushed a commit to evanspearman/pkgs that referenced this pull request Nov 25, 2026
* 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>
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.

2 participants

0