Skip to content

chore(tests): migrate sendReset from goridge rpc to connectrpc#146

Merged
rustatian merged 3 commits into
masterfrom
chore/connectrpc-migration
May 25, 2026
Merged

chore(tests): migrate sendReset from goridge rpc to connectrpc#146
rustatian merged 3 commits into
masterfrom
chore/connectrpc-migration

Conversation

@rustatian
Copy link
Copy Markdown
Member

Summary

  • Migrate sendReset in tests/grpc_plugin_test.go from net/rpc + goridge/v4/pkg/rpc codec to the generated resetterV1connect client
  • Add newResetterClient(t, address) helper using h2c (matches the memcached/redis/jobs reference pattern)
  • Bump goridge/v4 beta.1 → beta.2 transitively (no longer a direct dep; new wire is Connect/HTTP-2 served by rpc/v6 beta.4 on the same TCP socket)
  • Bump api-go/v6 beta.4 → beta.12 (brings in resetterV1connect)
  • Add connectrpc.com/connect v1.20.0 + golang.org/x/net for h2c transport

Note: 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 . clean
  • golangci-lint clean (pre-commit hook)
  • CI: go test -race -count=1 -run 'TestGrpc.*Reset' ./...

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
Copilot AI review requested due to automatic review settings May 25, 2026 08:08
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Warning

Review limit reached

@rustatian, we couldn't start this review because you've used your available PR reviews for now.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8f3bacba-ed14-4012-abf0-2a659a614331

📥 Commits

Reviewing files that changed from the base of the PR and between 59ce4e0 and 03d13a1.

⛔ Files ignored due to path filters (2)
  • go.work.sum is excluded by !**/*.sum
  • tests/go.sum is excluded by !**/*.sum
📒 Files selected for processing (5)
  • go.mod
  • tests/go.mod
  • tests/grpc_interceptors_test.go
  • tests/grpc_plugin_test.go
  • tests/interceptor2/interceptor2.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/connectrpc-migration

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/rpc Goridge reset calls with resetterV1connect.ResetterServiceClient calls (Reset, ListPlugins).
  • Added newResetterClient(t, address) helper that configures an h2c-capable http.Client using http2.Transport.
  • Updated test module dependencies (connectrpc.com/connect, bumped api-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.

Comment thread tests/grpc_plugin_test.go
Comment thread tests/grpc_plugin_test.go
rustatian added 2 commits May 25, 2026 10:35
…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
@rustatian rustatian self-assigned this May 25, 2026
@rustatian rustatian merged commit f318379 into master May 25, 2026
8 checks passed
@rustatian rustatian deleted the chore/connectrpc-migration branch May 25, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants