test(integration): Gorilla-S3 e2e — agent → MinIO → backend exact PromQL (Phase 6) - #283
Merged
Merged
Conversation
…mQL (Phase 6) End-to-end integration test covering the full Gorilla-S3 cold-engine pipeline (Phase 6, FINAL): drives 100 deterministic samples through sketchcol+gorillas3processor, asserts MinIO chunks decode to the input set, and verifies the backend response carries the exact-accuracy + gorilla_archive markers. Also runs the Go-encoded chunk through the Rust asap-gorilla decoder to pin the byte-format parity contract. Coordination strategy: separate compose project (asap-gorilla-e2e) on a separate port range (29xxx) AND skip-if-sweep-busy gating, so the test never competes with the host-wide sweep. Default `go test ./...` runs fixture-only (decoder round-trips + fixture sanity); the live docker path is opt-in via GORILLA_E2E_LIVE=1. Surfaces one Phase-6 follow-up: the backend HTTP server still wires Arc<SimpleEngine> directly — EngineRouter is built but not yet consumed by the HTTP path. AccuracyExact + DataSourceMarker subtests SKIP with a documented note until that wiring lands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged
7 tasks
zzylol
added a commit
that referenced
this pull request
May 19, 2026
…10 Mbps double-hop) (#401) The asap-gateway OTel-collector hop was originally the cross-agent fan-in tier for sum-by-zone aggregations. Post ASAPQuery-backend PRs #283 (B2 stage-emit) and #287/#290 (cumulative emit), the wave-tier backend does that fan-in natively via the `evaluate_exact_agg` reducer pulling sids from every agent. The gateway became a pure forwarder that doubled every byte (agent → gateway → backend) for no algorithmic reason, costing ~10 Mbps per arm on the multinode demo (issue #400). Scope: - multinode `run_demo.sh`: remove `gateway_up` / `gateway_down`, drop the gateway out of `arm_up` / `arm_down`. `stop_node node1` stays in the teardown to reap any pre-#400 leftover container; `node1` is otherwise unused. - multinode `topology.env`: drop the `--add-host=gateway:` alias and retire the node1 role note. - multinode + singlenode agent yaml: OTLP `endpoint:` flips from `gateway:4317` to `backend:4317`. The backend already accepts OTLP on 4317 (`--otel-grpc-port=4317` in `run_demo.sh` and base.yml). - multinode + singlenode `mvp-workload.yaml`: the lone `assign_to_role: gateway` entry (sum-by-zone) becomes `assign_to_role: agent`. The controller's typed `split_typed_three_stage` emits only Edge + Backend stages when no Gateway stage is occupied, so `emit_gateway_yaml` simply doesn't fire and `push_to_role(Gateway, ...)` is a no-op — no controller code change needed. - multinode `asap-otel-gateway-mvp-placeholder.yaml`: deleted. - singlenode `base.yml`: gateway service removed; its host ports (14317 / 14318) reassigned to the backend container so external tooling that previously hit the gateway can hit the backend on the same host ports. `fake-exporter` default `EXPORTER_TARGET` flips to `backend:4317`; `depends_on` flips to `backend`. - singlenode `agents-N{1,10,100}.yml` + `gen-agents.sh`: `depends_on` flips from `gateway` → `backend`. Validation (multinode, 60 s NIC sample, asap arm, WARMUP_S=90): - node1 docker ps: empty (no asap-gateway). - node2 docker ps: backend + thanos-{query,store-gateway,compact} + minio + prometheus + controller; no gateway. - All 5 wave queries against node2:9091 return `data_source: asap_query`: quantile_over_time(0.99, http_requests_total_latency_ms[5m]) → 10000 series max by (zone) (quantile_over_time(0.99, ...)) → 4 series sum by (zone) (http_requests_total) → 4 series sum by (zone) (rate(http_requests_total[5m])) → 4 series topk(5, sum by (zone) (rate(...))) → 4 series - Per-node NIC bandwidth (enp130s0f0, 60 s): node0 RX 0.16 Mbps TX 6.80 Mbps (agent-a → backend) node1 RX 0.00 Mbps TX 0.00 Mbps (idle — pre-fix carried the gateway double-hop) node2 RX 13.56 Mbps TX 0.33 Mbps (backend receives both agents) node3 RX 0.16 Mbps TX 6.76 Mbps (agent-b → backend) Pre-fix the node1 link carried ~13 Mbps in + ~13 Mbps out as a pure forwarder. Post-fix that ~26 Mbps of node1 wire traffic is gone; the remaining ~13.6 Mbps lives only on the agent→backend hop. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
End-to-end integration test for the Phase 6 (FINAL) Gorilla-S3 cold-engine pipeline:
Lands
integration/gorilla_s3_e2e/mirroring the existingintegration/parity/+integration/cross_host_parity/Go-test pattern. Validates the byte-format compatibility contract that ties together the Phase-1 Rust crate (asap-gorilla), the Phase-2 Go processor (gorillas3processorPR #282), the Phase-3 backend cold-store (PR #84), and the Phase-4/5 engine + router (PRs #85, #86).Coordination strategy
Both of the brief's options:
asap-gorilla-e2eon 29xxx ports so it would NOT collide with the host sweep on 19xxx, AND/proc/<sweep_pid>andt.Skipif alive (overridable viaGORILLA_E2E_FORCE=1).The double-defense matches the brief's "do not bring up docker unless the sweep is actually idle" gate; the live test only fires with
GORILLA_E2E_LIVE=1AND no sweep alive.Subtests
TestGorillaS3End2Endruns the live stack once and dispatches five subtests:HappyPathMultiChunkRangeAccuracyExactkind=Exact, ε=0, δ=0(SKIPS until EngineRouter is wired into HTTP — see below)DataSourceMarkerdata_source: gorilla_archive(same SKIP gate)CrossLanguageByteCompatasap-gorillacrate viacargo testPlus six docker-free subtests that always run and pin the byte format / fixture invariants in CI without needing Docker (decoder round-trips, header rejection paths, fixture sum invariant).
Phase-6 follow-up surfaced by writing the test
asap-query-engine/src/drivers/query/servers/http.rsstill wiresArc<SimpleEngine>directly — the Phase-5EngineRouteris built but not yet consumed by the HTTP path. Until that lands,AccuracyExact+DataSourceMarkerSKIP with a clear annotation rather than fail. Documented in PROGRESS.md and the README; tracking item for a separate ASAPQuery-backend PR.Test plan
go build ./...cleango vet ./...cleango test ./...passes 6 docker-free subtests + skipsTestGorillaS3End2Endwith the documented "set GORILLA_E2E_LIVE=1" messageGORILLA_E2E_LIVE=1 go test -v -run TestGorillaS3End2End ./...— deferred until sweep idle (sweep PID 2862786 still alive at submission time)integration/gorilla_s3_e2e/(new) + onePROGRESS.mdline🤖 Generated with Claude Code