chore(tests): migrate sendReset from goridge rpc to connectrpc#146
Conversation
Replace net/rpc + goridge/v4/pkg/rpc codec in sendReset with the generated resetterV1connect client. The rpc plugin now serves Connect/HTTP-2 endpoints; clients dial over h2c on the same TCP socket. - bump goridge/v4 beta.1 → beta.2 (transitive only; no direct dep) - bump api-go/v6 beta.4 → beta.12 (introduces resetterV1connect) - bump rpc/v6 beta.3 → beta.4 (connectrpc-serving counterpart) - add connectrpc.com/connect v1.20.0 + golang.org/x/net for http2
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 53 minutes and 21 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, 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 trial, open-source, and free plans. In all cases, review capacity refills continuously over time. 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 (5)
✨ 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
Migrates the sendReset helper in tests/grpc_plugin_test.go from the legacy net/rpc + Goridge codec to the generated ConnectRPC client (resetterV1connect), aligning the resetter call path with the newer Connect/HTTP-2 (h2c) transport used by updated RoadRunner APIs.
Changes:
- Replaced
net/rpcGoridge reset calls withresetterV1connect.ResetterServiceClientcalls (Reset,ListPlugins). - Added
newResetterClient(t, address)helper that configures an h2c-capablehttp.Clientusinghttp2.Transport. - Updated test module dependencies (
connectrpc.com/connect, bumpedapi-go/v6,rpc/v6, and related sums).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/grpc_plugin_test.go | Switches resetter test helper from net/rpc codec to generated Connect client; adds h2c client constructor. |
| tests/go.mod | Adds Connect dependency, bumps RoadRunner API deps, updates toolchain patch version, and adjusts direct/indirect requirements. |
| tests/go.sum | Records new/updated module checksums for Connect and bumped deps. |
| go.work.sum | Updates workspace sums due to newly introduced/updated transitive deps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rror nil-deref resetter/v6 beta.2 still served goridge; beta.3 introduced the Connect handler. Without this bump the connectrpc client gets "unimplemented: 404 Not Found". Also fix the nil-deref pattern in sendReset (per Copilot review): assert.NoError doesn't stop execution, so resetResp/listResp can be nil and the next line dereferences them. Switch to require.NoError. - bump plugin go.mod toolchain go1.26.0 → go1.26.3
Summary
sendResetintests/grpc_plugin_test.gofromnet/rpc + goridge/v4/pkg/rpccodec to the generatedresetterV1connectclientnewResetterClient(t, address)helper using h2c (matches the memcached/redis/jobs reference pattern)goridge/v4beta.1 → beta.2 transitively (no longer a direct dep; new wire is Connect/HTTP-2 served byrpc/v6 beta.4on the same TCP socket)api-go/v6beta.4 → beta.12 (brings inresetterV1connect)connectrpc.com/connect v1.20.0+golang.org/x/netfor h2c transportNote: the
wg.Add(1) + go func(){defer wg.Done()...}()patterns elsewhere in this test file are intentionally left untouched — they're unrelated to the migration and can be modernized separately.Test plan
go build ./...in tests/go vet ./...in tests/gofmt -l .cleango test -race -count=1 -run 'TestGrpc.*Reset' ./...