Skip to content

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

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

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

Conversation

@rustatian

Copy link
Copy Markdown
Member

Summary

Migrate all goridge net/rpc + pkg/rpc callsites in tests/ to the generated jobsV2connect.JobsServiceClient, matching the jobs plugin reference. Proto types were already on api-go/v6/jobs/v2, so this is a transport-only swap.

Code changes

  • tests/helpers/helpers.go: rewritten with NewJobsClient(t, address) pattern and one-shot connectrpc calls per helper. Single-job Push uses PushRequest (matches jobs reference) instead of a 1-element PushBatchRequest.
  • tests/jobs_beanstalk_test.go: declareBeanstalkPipe now uses the shared helpers.NewJobsClient + client.Declare. Drops local net/rpc, net, goridgeRpc imports.

Behavior improvements

  • DestroyPipelines retry loop now reports the last error after exhausting all 10 attempts (the old loop fell through silently if every attempt failed).
  • Stats request fixed to use emptypb.Empty{} — matches the server handler signature. The old code passed JobsHandlerResponse{} as the request, which goridge tolerated but is type-mismatched on the new wire.

Dep bumps in tests/go.mod

  • drop direct goridge/v4 (transitive bump beta.1 → beta.2)
  • api-go/v6 beta.4 → beta.12
  • rpc/v6 beta.3 → beta.4
  • add connectrpc.com/connect v1.20.0 + golang.org/x/net

Test plan

  • go build ./... clean
  • go vet ./... clean
  • gofmt -l . clean
  • golangci-lint clean (pre-commit hook)
  • CI: go test -race -count=1 ./... against live beanstalkd

Migrate all goridge net/rpc + pkg/rpc callsites to the generated
jobsV2connect.JobsServiceClient, matching the jobs plugin reference.
The rpc plugin now serves Connect/HTTP-2 endpoints; clients dial
over h2c on the same TCP socket. Proto types were already on
api-go/v6/jobs/v2, so this is a transport-only swap.

- tests/helpers/helpers.go: rewritten with NewJobsClient(t, address)
  pattern and one-shot connectrpc calls per helper
- tests/jobs_beanstalk_test.go: declareBeanstalkPipe now uses the
  shared helpers.NewJobsClient and client.Declare
- single-job Push uses PushRequest (matches jobs reference) instead
  of PushBatchRequest with a 1-element slice
- DestroyPipelines retry loop now reports the last error after
  exhausting all 10 attempts (previously fell through silently)
- Stats request fixed to use emptypb.Empty (matches server handler);
  the old code passed JobsHandlerResponse as the request, which
  goridge tolerated but is wrong on the new typed wire

- drop direct goridge/v4 dep (transitive bump beta.1 → beta.2)
- bump api-go/v6 beta.4 → beta.12
- bump rpc/v6 beta.3 → beta.4
- 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:18
@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown

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 59 minutes and 57 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: 0575c898-2a22-46a1-8317-71338a7a23f1

📥 Commits

Reviewing files that changed from the base of the PR and between d5976d3 and cd5123d.

⛔ Files ignored due to path filters (1)
  • tests/go.sum is excluded by !**/*.sum
📒 Files selected for processing (4)
  • go.mod
  • tests/go.mod
  • tests/helpers/helpers.go
  • tests/jobs_beanstalk_test.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.

Copilot AI left a comment

Copy link
Copy Markdown

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 test suite’s Jobs RPC interactions from Goridge net/rpc to the generated ConnectRPC jobsV2connect.JobsServiceClient, aligning test callsites with the newer transport used by the Jobs plugin APIs.

Changes:

  • Replaced Goridge net/rpc calls in tests/helpers with unary ConnectRPC client calls (Push/Pause/Resume/Destroy/GetStats).
  • Updated beanstalk tests to use the shared ConnectRPC client helper for pipeline declaration.
  • Updated tests module dependencies to include connectrpc.com/connect and newer RoadRunner API/RPC module versions.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/jobs_beanstalk_test.go Switches pipeline declaration helper from Goridge RPC to ConnectRPC client call.
tests/helpers/helpers.go Introduces NewJobsClient and rewrites helper RPC operations to use ConnectRPC.
tests/go.mod Adds ConnectRPC dependencies and bumps module versions/toolchain.
tests/go.sum Updates sums for new/updated dependencies introduced by the transport migration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/go.mod
Comment thread tests/helpers/helpers.go
rustatian added 4 commits May 25, 2026 10:35
… OTEL tests

Two regressions surfaced by the assert.GreaterOrEqual fix unblocking
-failfast past the PQ test:

1. DestroyPipelines previously silently passed when all 10 retries
   failed (legacy behavior); my "behavior improvement" assert.NoError(
   t, lastErr) broke negative tests that intentionally destroy
   non-existent pipelines (e.g. TestKafkaJobsError).
   Reverted to the original silent-after-retry semantics.

2. otel/v6 (≥beta.3) hard-rejects the zipkin exporter at Init
   (plugin.go:89). Existing OTEL test configs still target zipkin
   (exporter: zipkin, endpoint /api/v2/spans), and the test
   verification fetches from the zipkin REST API — switching the
   exporter alone would break verification. Skipped TestSQSOTEL /
   TestNATSOTEL / TestKafkaOTEL / TestBoltDBOTEL pending the
   otel team's decision to restore zipkin or migrate the test
   verification to OTLP+jaeger.

Pre-existing on master; surfaced only because the GreaterOrEqual
fix lets -failfast progress past the PQ test.
@rustatian rustatian self-assigned this May 25, 2026
@rustatian rustatian merged commit 1b9cdfe into master May 25, 2026
8 checks passed
@rustatian rustatian deleted the chore/connectrpc-migration branch May 25, 2026 12:32
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