fix: use http/v1 payload protos - #276
Conversation
There was a problem hiding this comment.
Pull request overview
Reverts the worker HTTP payload wire format back to the http/v1 protobuf messages (Request/Response/HeaderValue with bytes header values) to match the released Spiral / RoadRunner HTTP packages and the roadrunner-api-dto v1.14.1 contract.
Changes:
- Switch handler request/response marshaling/unmarshaling from
api-go/http/v2protos toapi-go/http/v1protos, including header value handling asbytes. - Update module dependencies to
github.com/roadrunner-server/api-go/v6 v6.0.0-beta.14. - Temporarily pin some test-module dependencies to sibling revert branches via pseudo-versions.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/go.sum | Updates checksums for the bumped/pinned test dependencies (including pseudo-versions). |
| tests/go.mod | Pins test dependencies (informer/resetter) via pseudo-versions and bumps api-go to beta.14. |
| handler/response.go | Decodes http/v1 Response protos and writes header values from bytes to net/http headers. |
| handler/request.go | Updates request payload marshaling signature to accept http/v1 Request proto. |
| handler/pool.go | Updates proto request/response pool types to http/v1 Request/Response. |
| handler/handler.go | Updates proto pool initialization to http/v1 types and header map value type. |
| handler/convert.go | Converts net/http headers/cookies into http/v1 HeaderValue (repeated bytes). |
| go.sum | Updates checksums for the bumped api-go dependency. |
| go.mod | Bumps github.com/roadrunner-server/api-go/v6 to v6.0.0-beta.14. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Middleware executes in config order since the slices.Backward change; the tracer middleware must run first so gzip sees the tracer context and emits its span.
pool/v2 attaches internal_event_name to worker lifecycle debug logs too, so counting every record with that attr races with allocation and teardown.
Server.Protocols has no h2c upgrade mechanism; prior-knowledge h2c is covered by TestH2C.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #276 +/- ##
===========================================
+ Coverage 61.20% 85.46% +24.26%
===========================================
Files 6 28 +22
Lines 250 1472 +1222
===========================================
+ Hits 153 1258 +1105
- Misses 81 171 +90
- Partials 16 43 +27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The e2e step now instruments the plugin module (coverpkg was expanding to the tests module only, so e2e contributed nothing to codecov). Unit step runs every package, failfast no longer truncates profiles, the test run targets the package instead of a hand-maintained file list, and the unused otel/zipkin/jaeger docker stack is gone.
Removes orphan configs and PHP fixtures, unreachable client.php modes, duplicate and inert handler tests, plugin registrations no config activates, the trusted_subnets blocks (no such config field), and the tracked 40MB blobs, which TestMain now generates into gitignored paths.
Covers the stats exporter, health/ready checks, HTTPS server construction (auth types, root CA, HTTP/2), handler request/response/uploads paths, plugin init, acme config, and the server backends. The attributes tests move into their package so coverage sees them.
Container boot, handler serving, request, TLS-client, and RPC helpers with readiness polling instead of fixed sleeps; the log observer keeps only the API the suite uses. Six tests converted as pilots.
Workers live in php_test_files/workers, streaming fixtures in php_test_files/streams; configs point at the new paths, get normalized names, and a fast destroy_timeout where shutdown timing is not under test.
serve_core_test.go, workers_test.go, and issues_test.go host the moved tests on the shared helpers; the three urlencoded size tests fold into one table and the supervisor test polls for the recycled PID instead of sleeping.
handler_request_test.go and handler_body_test.go host the pool+handler tests on httptest with table-driven method, charset, and multipart matrices; the five upload tests share one pool as a single table.
tls_test.go carries the SSL tests and a five-row mTLS table including the no-client-cert row; proto_test.go hosts h2/h2c/h3; fcgi_test.go is a transport table with dial retries. TLS tests skip locally when the mkcert CA is not trusted.
Completes the move to thematic test files; the http_plugin monoliths are gone, the listener wait helper is shared, and the static pair on one config runs as subtests of a single container.
The unit step runs before CI provisions mkcert fixtures, so the tests build their own x509 chain instead of reading tests/test-certs.
Reverts the worker payload wire format to http/v1 (Request/Response/HeaderValue with bytes values), matching released spiral/roadrunner-http v3/v4.
Part of the v1 proto revert (roadrunner-server/api#77, roadrunner-server/api-go#35): wire format back to what roadrunner-api-dto v1.14.1 and the released PHP packages speak. Pins api-go v6.0.0-beta.14. Tests temporarily pin sibling revert branches via pseudo-versions; they will be bumped to the new betas once tagged.