Skip to content

fix: rename lock/v1 messages back to Request/Response - #95

Merged
rustatian merged 3 commits into
masterfrom
revert/protos-v1
Aug 13, 2026
Merged

fix: rename lock/v1 messages back to Request/Response#95
rustatian merged 3 commits into
masterfrom
revert/protos-v1

Conversation

@rustatian

Copy link
Copy Markdown
Member

lock/v1 message names are Request/Response again (fields unchanged, wire-identical).

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.

Copilot AI lite review requested due to automatic review settings August 12, 2026 19:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Reverts the lock/v1 protobuf message type names back to Request/Response (wire-identical, fields unchanged) to restore compatibility with released DTO/PHP clients, and bumps api-go to the corresponding beta.

Changes:

  • Update RPC handler method signatures to use lock/v1.Request and lock/v1.Response.
  • Update test RPC client helpers to construct and send lock/v1.Request and decode lock/v1.Response.
  • Bump github.com/roadrunner-server/api-go/v6 from v6.0.0-beta.13 to v6.0.0-beta.14 (root module + tests module) and refresh go.sum files.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
rpc.go Switches RPC method signatures to lock/v1.Request / lock/v1.Response to match the reverted proto naming.
tests/rpc.go Updates test RPC client calls to use lock/v1.Request / lock/v1.Response.
go.mod Bumps api-go dependency to v6.0.0-beta.14.
go.sum Updates checksums for the api-go version bump.
tests/go.mod Bumps api-go dependency to v6.0.0-beta.14 for the tests module.
tests/go.sum Updates checksums for the tests module dependency bump.
Suppressed comments (3)

tests/rpc.go:42

  • new(int64(ttl)) / new(int64(wait)) won’t compile because new requires a type, not a value. Use local int64 variables and take their addresses (or a helper like proto.Int64).

This issue also appears in the following locations of the same file:

  • line 45
  • line 61
func lock(resource, id string, ttl, wait int) (bool, error) {
	return call("lock.Lock", &lockV1.Request{
		Resource: resource,
		Id:       id,
		Ttl:      new(int64(ttl)),
		Wait:     new(int64(wait)),
	})

tests/rpc.go:51

  • new(int64(ttl)) / new(int64(wait)) won’t compile because new requires a type, not a value. Use local int64 variables and take their addresses (or a helper like proto.Int64).
func lockRead(resource, id string, ttl, wait int) (bool, error) {
	return call("lock.LockRead", &lockV1.Request{
		Resource: resource,
		Id:       id,
		Ttl:      new(int64(ttl)),
		Wait:     new(int64(wait)),
	})

tests/rpc.go:66

  • new(int64(ttl)) won’t compile because new requires a type, not a value. Use a local int64 variable and take its address (or a helper like proto.Int64).
func updateTTL(resource, id string, ttl int) (bool, error) {
	return call("lock.UpdateTTL", &lockV1.Request{
		Resource: resource,
		Id:       id,
		Ttl:      new(int64(ttl)),
	})

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.89%. Comparing base (9c56cd4) to head (4b49419).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #95      +/-   ##
==========================================
- Coverage   79.49%   75.89%   -3.60%     
==========================================
  Files           4        4              
  Lines         668      668              
==========================================
- Hits          531      507      -24     
- Misses        117      141      +24     
  Partials       20       20              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rustatian rustatian self-assigned this Aug 13, 2026
@rustatian rustatian changed the title Rename lock/v1 messages back to Request/Response fix: rename lock/v1 messages back to Request/Response Aug 13, 2026
@rustatian
rustatian merged commit 7073e4c into master Aug 13, 2026
7 of 8 checks passed
@rustatian
rustatian deleted the revert/protos-v1 branch August 13, 2026 09:41
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