Skip to content

Replace chrono and keep the probe's status when its body breaks off - #46

Open
BKPepe wants to merge 6 commits into
masterfrom
fix/probe-status-first
Open

BKPepe wants to merge 6 commits into
masterfrom
fix/probe-status-first

Conversation

@BKPepe

@BKPepe BKPepe commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Six commits to land before 1.3.0.

  • chrono is unmaintained (RUSTSEC-2026-0543), which fails cargo deny in Audit
    and the release workflow. time 0.3.37 or newer now reads the local time, with
    the same output as chrono on millions of values and as Go on its golden
    timestamps. An invalid TZ, or an OpenWrt zone not yet linked to
    /etc/localtime, now means UTC, as in the Go client. On 32-bit musl the libc
    crate still has a 32-bit time_t, so there the time falls back to UTC from
    2038. The native-tls build without http2 is 33 kB smaller.
  • A malformed SOURCE_DATE_EPOCH, an empty one included, fails the build, as
    the specification asks and clang does, instead of giving it today's date.
  • A ping answer that broke off mid-body was reported by the read error, so its
    404 or 500 went unnamed. The probe now follows Go's CheckUp: the status
    first, then the failed read as "reading the ping response:", then a non-empty
    body. The request and the body read share one deadline, as under Go's client
    timeout. New parity cases run truncated, stalled and chunked 404 and 200
    answers, a 204 and a long body against Go 8aefd77.
  • ServerStatus derives up() from down_reason, and the run drops its
    measured flag, a duplicated label and a null report no run reaches.
  • The README no longer lists an 8 KiB probe cap. It and the crate docs say the
    library API can change in any release. 1.3.0 changes it again (get_prefix,
    ServerStatus, format_timestamp), as 1.2.1 did.

Tested on e5d6b76: cargo test with rustls-tls and native-tls, each with and
without http2, on macOS and Debian, parity against Go 8aefd77, clippy, cargo
deny, cargo publish --dry-run and a check of each set with Rust 1.93.1. Known
failures on master too: tests/alpn.rs with native-tls on macOS and the help
parity case without http2. The local time in OpenWrt 25.12 on aarch64 against
1.2.1 and Go and on armv7, with and without zoneinfo and with a POSIX rule in
TZ.

@BKPepe
BKPepe force-pushed the fix/probe-status-first branch from 5729c64 to 0c69f59 Compare November 19, 2026 08:21
@BKPepe BKPepe changed the title Keep the probe's status when its body breaks off, ignore the chrono advisory Replace chrono and keep the probe's status when its body breaks off Nov 19, 2026
RUSTSEC-2026-0543 marks chrono unmaintained, which fails cargo deny in Audit
and in the release workflow. The time crate reads the local time instead, with
the same output, except that an invalid TZ or a zone OpenWrt has not yet linked
to /etc/localtime now means UTC, as in the Go client.
The specification asks the build to fail instead, as clang already does, so a
packaging mistake no longer passes for a reproducible build.
A ping answer that hung up or timed out mid-body was reported by the failed
read, so its 404 or 500 went unnamed. The status now comes first, and a
failed read of a 200 says "reading the ping response:", as in the Go client.
ServerStatus kept up beside down_reason, and the run kept a measured flag
beside its list of down servers, so either pair could disagree. Both now
follow from the reason, which also drops a duplicated label and a null
report no run reaches.
The README still listed an 8 KiB cap on the check that a backend is up, which
now reads 512 bytes like the Go client. A test comment also named reqwest
instead of hyper.
The crate exposes its modules so the binary, the tests and the fuzz targets
can share them, and releases have already changed them in ways semver calls
breaking. The README and the crate docs now say so.

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