fix(handler): adapt to api-go beta.5 HttpHeaderValue.values string type#245
Conversation
api-go v6.0.0-beta.5 changed HttpHeaderValue.values from `repeated bytes` to `repeated string` (api commit 265bb1e). Update the http plugin's handler package to drop the now-incorrect []byte()/string() casts and take the protobuf field as a Go string slice directly. Affected sites: - convert.go: drop []byte(...) on append; collapse the inner loop into a variadic append in convert(); use v directly in convertCookies(). - response.go: drop string(...) on Push, on the trailer SplitSeq input, and on the per-value Header.Add — all three were converting from bytes to string under the old proto and are no-ops now. Bumps api-go v6.0.0-beta.4 → v6.0.0-beta.5 in the root module. tests/ submodule unchanged (still on beta.4 alongside the rest of the test toolchain; tests-side migration tracked separately).
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates the HTTP plugin handler code to compile against github.com/roadrunner-server/api-go/v6 v6.0.0-beta.5, which changed HttpHeaderValue.values from repeated bytes to repeated string, by removing now-invalid byte/string casts.
Changes:
- Remove obsolete
[]byte(...)/string(...)conversions when reading/writing proto header values. - Simplify header conversion logic using variadic
appendfor header value slices. - Bump
api-go/v6dependency fromv6.0.0-beta.4tov6.0.0-beta.5and update sums.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| handler/response.go | Drops no-op casts when pushing HTTP/2 resources, writing headers, and splitting trailer header values. |
| handler/convert.go | Adapts header/cookie conversion to append []string values directly into proto fields. |
| go.mod | Bumps github.com/roadrunner-server/api-go/v6 to v6.0.0-beta.5. |
| go.sum | Updates checksums for api-go/v6 version bump. |
| go.work.sum | Updates workspace sums after dependency resolution changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
api v6.0.0-beta.2 and api-go v6.0.0-beta.5 changed
HttpHeaderValue.valuesfrom `repeated bytes` to `repeated string`. The http plugin's handler still uses `[]byte(...)` / `string(...)` casts that worked against the old proto but no longer compile against beta.5 (and trigger `unconvert` on the reverse-direction casts). This PR drops the now-incorrect casts so the plugin compiles against the new api-go.Affected sites:
Bumps `api-go/v6 v6.0.0-beta.4 → v6.0.0-beta.5` in the root module. `tests/` submodule unchanged (still on beta.4; tests-side migration tracked separately when http tests migrate to Connect-RPC).
This unblocks the status plugin's Connect-RPC migration, which transitively pulls http/v6 through its tests submodule.