Repository navigation
Gateway profiles: validate the stack instead of the standalone, fix authsvc on Rust 1.100, unbreak the aspnet gateway entries - #1767
Merged
Conversation
The standalone container runs on --network host whenever an entry subscribes to a compose profile, and it was left running while the gateway and production-stack stacks came up. An entry that also serves h2/h3 keeps 8443 (and 8080), so the stack's edge failed to bind, shared the port, or exited on the QUIC port, and the checks reached the standalone server instead of the stack.
production-stack has failed on the bench host since the morning of 2026-11-13 on every entry (roadrunner-gateway #1757, morojs #1761, tako-gateway #1762): the shared authsvc container exits 0 with no output, the edge never sees it healthy, and the run ends with no results. rust:1-alpine moved to Rust 1.100 on 2026-11-12. Its cargo keeps each package's artifacts under target/release/build/<package>/<hash>/ rather than target/release/deps/, so the cache-priming step's `rm -rf target/release/deps/authsvc*` stopped matching anything. The placeholder built from `fn main() {}` stayed up to date, the second `cargo build` finished in 0.04s without compiling src/, and the image shipped the placeholder: a 418 KB binary that exits 0 at once. `cargo clean --release -p authsvc` removes the placeholder's artifacts wherever cargo keeps them, and a grep for the server's startup line fails the build if the placeholder is ever shipped again. Built against the current rust:1-alpine (1.100.0): a 1.2 MB binary that logs "authsvc listening on ...", answers /_health with 200 and an /_auth without a token with 401.
…mal's Services and Types Both Dockerfiles still COPY aspnet-minimal's AppData.cs and Models.cs, which #1002 (2026-07-18) split into Services/ and Types/, so neither image has built since. They were the only failures in #1615's validation sweep, and their published results have not been refreshed since July. Copy Handlers.cs with Services/ and Types/, register DatabaseService, DatasetService, ItemService and the AppJsonContext resolver the way aspnet-minimal's Program.cs does, and give the nginx entry's /api routes DatabaseService's Postgres pool in place of AppData.PgDataSource. The caddy entry gains the StackExchange.Redis reference DatabaseService needs; it connects to nothing unless REDIS_URL is set, which gateway-h3 never does.
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three problems kept the gateway and production-stack profiles from measuring what they claim to. Each fix is its own commit.
1. validate.sh checked the standalone server, not the stack (cherry-picked from #1615)
When an entry subscribes to a compose profile, validate.sh runs its standalone container on
--network host, and it left that container running while the gateway and production-stack stacks came up on the same host ports. An entry that binds:8080(or:8443) with SO_REUSEPORT then shares the port with the leftover container, and the kernel hands part of the stack's traffic to the standalone server. An entry without SO_REUSEPORT fails to bind, or loses the port outright. Either way, the gateway checks can pass against a server with no proxy in front of it.On #1761 this showed up as
FAIL [production-stack cache-aside]: first=MISS second=MISS. The standalone morojs has no Redis, so each of its worker threads keeps its own cache. Reproduced locally with two morojs containers in one network namespace: 73 of 100 cache-aside probes came back MISS/MISS. With the stack's server alone, 400 of 400 came back MISS→HIT.The commit is jbr's 31af2c3 from #1615, unchanged. It stops the standalone with
docker stopbefore the compose profiles; the EXIT trap still removes it. #1615's own validation run already passed with it on fulmine, libuvcpp, morojs, trillium and trillium-tuned. Once this lands, #1615 can rebase down to trillium's production-stack change.2. authsvc has shipped an empty binary since Rust 1.100
Since the morning of 2026-11-13, every production-stack benchmark has ended before measuring anything (roadrunner-gateway on #1757, morojs on #1761, tako-gateway on #1762): the shared authsvc exits 0 without a word.
rust:1-alpinemoved to Rust 1.100 on 2026-11-12, and that cargo keeps each package's artifacts undertarget/release/build/<package>/<hash>/instead oftarget/release/deps/. The Dockerfile builds a placeholderfn main() {}to cache the dependencies, then deletes it withrm -rf target/release/deps/authsvc*. That glob no longer matched, so the real build found the placeholder up to date (Finished … in 0.04s) and the image shipped it.cargo clean --release -p authsvcnow removes the placeholder wherever cargo keeps it. A grep for the server's startup line fails the build if the placeholder ever ships again; checked against the placeholder binary, it fails as intended. Built on the currentrust:1-alpine(1.100.0): a 1.2 MB binary,authsvc listening on …,/_health200,/_authwithout a token 401.3. aspnet-minimal_nginx and aspnet-minimal_caddy have not built since July
Their Dockerfiles copy aspnet-minimal's
AppData.csandModels.cs, which #1002 split intoServices/andTypes/. They now copyHandlers.cswithServices/andTypes/, and register those services the way aspnet-minimal'sProgram.csdoes. The nginx entry's/apiroutes useDatabaseService's Postgres pool.What to expect
/benchmark … --savemerges main first, so it picks up the fix; a run without--savedoes not.rust:1-bookwormand will ship a placeholder on its next rebuild. Not touched here.Local validation (this branch)
Run with
scripts/validate.shfrom this branch on a 32-CPU box. The compose files pin cores 64-95 of the bench host, so theircpuset:lines were stripped in a scratch copy for the run; nothing else changed.On both production-stack runs authsvc came up healthy,
/api/itemswithout a token got 401, and cache-aside went MISS then HIT. That is the check that failed on #1761.🤖 Generated with Claude Code