From 50b1b5cc1d2240cd163763cc0159da50781db9ff Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 12 Aug 2026 21:49:55 +0200 Subject: [PATCH 1/2] revert: lock/v1 Request/Response names --- go.mod | 2 +- go.sum | 4 ++-- rpc.go | 12 ++++++------ tests/go.mod | 2 +- tests/rpc.go | 16 ++++++++-------- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 21959f5..ae60b00 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,6 @@ go 1.26 toolchain go1.26.5 -require github.com/roadrunner-server/api-go/v6 v6.0.0-beta.13 +require github.com/roadrunner-server/api-go/v6 v6.0.0-beta.14 require google.golang.org/protobuf v1.36.12 // indirect diff --git a/go.sum b/go.sum index 2d2d76d..6fac2e3 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/roadrunner-server/api-go/v6 v6.0.0-beta.13 h1:BAV1aKkRp51C1OXDfEYZXgfrXqn4O7bpr6Z/m5otwd8= -github.com/roadrunner-server/api-go/v6 v6.0.0-beta.13/go.mod h1:Y4rsabWjr4Y10Jg6H8J5NDitQqlnXmGhCdgR+zyLYkI= +github.com/roadrunner-server/api-go/v6 v6.0.0-beta.14 h1:sTskv/3ImOZlUdtHuj9uT24gm1gQl/qU8rFNvn3MzhU= +github.com/roadrunner-server/api-go/v6 v6.0.0-beta.14/go.mod h1:Y4rsabWjr4Y10Jg6H8J5NDitQqlnXmGhCdgR+zyLYkI= google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= diff --git a/rpc.go b/rpc.go index 51ef7ce..a939f3e 100644 --- a/rpc.go +++ b/rpc.go @@ -23,7 +23,7 @@ func waitContext(parent context.Context, waitUs int64) (context.Context, context return context.WithTimeout(parent, time.Microsecond*time.Duration(waitUs)) } -func (r *rpc) Lock(in *lockV1.LockRequest, out *lockV1.LockResponse) error { +func (r *rpc) Lock(in *lockV1.Request, out *lockV1.Response) error { r.pl.log.Debug("lock request received", "ttl", int(in.GetTtl()), "wait_ttl", int(in.GetWait()), "resource", in.GetResource(), "id", in.GetId()) if in.GetId() == "" { @@ -37,7 +37,7 @@ func (r *rpc) Lock(in *lockV1.LockRequest, out *lockV1.LockResponse) error { return nil } -func (r *rpc) LockRead(in *lockV1.LockRequest, out *lockV1.LockResponse) error { +func (r *rpc) LockRead(in *lockV1.Request, out *lockV1.Response) error { r.pl.log.Debug("read lock request received", "ttl", int(in.GetTtl()), "wait_ttl", int(in.GetWait()), "resource", in.GetResource(), "id", in.GetId()) if in.GetId() == "" { @@ -51,7 +51,7 @@ func (r *rpc) LockRead(in *lockV1.LockRequest, out *lockV1.LockResponse) error { return nil } -func (r *rpc) Release(in *lockV1.LockRequest, out *lockV1.LockResponse) error { +func (r *rpc) Release(in *lockV1.Request, out *lockV1.Response) error { r.pl.log.Debug("release request received", "ttl", int(in.GetTtl()), "wait_ttl", int(in.GetWait()), "resource", in.GetResource(), "id", in.GetId()) if in.GetId() == "" { @@ -65,7 +65,7 @@ func (r *rpc) Release(in *lockV1.LockRequest, out *lockV1.LockResponse) error { return nil } -func (r *rpc) ForceRelease(in *lockV1.LockRequest, out *lockV1.LockResponse) error { +func (r *rpc) ForceRelease(in *lockV1.Request, out *lockV1.Response) error { r.pl.log.Debug("force release request received", "ttl", int(in.GetTtl()), "wait_ttl", int(in.GetWait()), "resource", in.GetResource(), "id", in.GetId()) cctx, cancel := waitContext(context.Background(), in.GetWait()) @@ -75,7 +75,7 @@ func (r *rpc) ForceRelease(in *lockV1.LockRequest, out *lockV1.LockResponse) err return nil } -func (r *rpc) Exists(in *lockV1.LockRequest, out *lockV1.LockResponse) error { +func (r *rpc) Exists(in *lockV1.Request, out *lockV1.Response) error { r.pl.log.Debug("exists request received", "ttl", int(in.GetTtl()), "wait_ttl", int(in.GetWait()), "resource", in.GetResource(), "id", in.GetId()) if in.GetId() == "" { @@ -89,7 +89,7 @@ func (r *rpc) Exists(in *lockV1.LockRequest, out *lockV1.LockResponse) error { return nil } -func (r *rpc) UpdateTTL(in *lockV1.LockRequest, out *lockV1.LockResponse) error { +func (r *rpc) UpdateTTL(in *lockV1.Request, out *lockV1.Response) error { r.pl.log.Debug("updateTTL request received", "ttl", int(in.GetTtl()), "wait_ttl", int(in.GetWait()), "resource", in.GetResource(), "id", in.GetId()) if in.GetId() == "" { diff --git a/tests/go.mod b/tests/go.mod index 570923c..1d10f5a 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -5,7 +5,7 @@ go 1.26 toolchain go1.26.5 require ( - github.com/roadrunner-server/api-go/v6 v6.0.0-beta.13 + github.com/roadrunner-server/api-go/v6 v6.0.0-beta.14 github.com/roadrunner-server/config/v6 v6.0.0-beta.3 github.com/roadrunner-server/endure/v2 v2.6.2 github.com/roadrunner-server/goridge/v4 v4.0.0-beta.3 diff --git a/tests/rpc.go b/tests/rpc.go index aca7801..3c972d2 100644 --- a/tests/rpc.go +++ b/tests/rpc.go @@ -19,14 +19,14 @@ func newLockClient() (*rpc.Client, error) { return rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn)), nil } -func call(method string, in *lockV1.LockRequest) (bool, error) { +func call(method string, in *lockV1.Request) (bool, error) { cl, err := newLockClient() if err != nil { return false, err } defer func() { _ = cl.Close() }() - out := &lockV1.LockResponse{} + out := &lockV1.Response{} if err := cl.Call(method, in, out); err != nil { return false, err } @@ -34,7 +34,7 @@ func call(method string, in *lockV1.LockRequest) (bool, error) { } func lock(resource, id string, ttl, wait int) (bool, error) { - return call("lock.Lock", &lockV1.LockRequest{ + return call("lock.Lock", &lockV1.Request{ Resource: resource, Id: id, Ttl: new(int64(ttl)), @@ -43,7 +43,7 @@ func lock(resource, id string, ttl, wait int) (bool, error) { } func lockRead(resource, id string, ttl, wait int) (bool, error) { - return call("lock.LockRead", &lockV1.LockRequest{ + return call("lock.LockRead", &lockV1.Request{ Resource: resource, Id: id, Ttl: new(int64(ttl)), @@ -52,14 +52,14 @@ func lockRead(resource, id string, ttl, wait int) (bool, error) { } func release(resource, id string) (bool, error) { - return call("lock.Release", &lockV1.LockRequest{ + return call("lock.Release", &lockV1.Request{ Resource: resource, Id: id, }) } func updateTTL(resource, id string, ttl int) (bool, error) { - return call("lock.UpdateTTL", &lockV1.LockRequest{ + return call("lock.UpdateTTL", &lockV1.Request{ Resource: resource, Id: id, Ttl: new(int64(ttl)), @@ -67,13 +67,13 @@ func updateTTL(resource, id string, ttl int) (bool, error) { } func forceRelease(resource string) (bool, error) { - return call("lock.ForceRelease", &lockV1.LockRequest{ + return call("lock.ForceRelease", &lockV1.Request{ Resource: resource, }) } func exists(resource, id string) (bool, error) { - return call("lock.Exists", &lockV1.LockRequest{ + return call("lock.Exists", &lockV1.Request{ Resource: resource, Id: id, }) From 93ebf85205b8a466f9574cebdf81fa9cf7364479 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 12 Aug 2026 21:53:32 +0200 Subject: [PATCH 2/2] tests: pin sibling revert branches until the new betas are tagged --- tests/go.sum | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/go.sum b/tests/go.sum index 42c65f5..b02930c 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -24,8 +24,8 @@ github.com/pelletier/go-toml/v2 v2.4.3 h1:GTRvJQutkOSftxIFD5xw9aepkYNuPWmVJpffdD github.com/pelletier/go-toml/v2 v2.4.3/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/roadrunner-server/api-go/v6 v6.0.0-beta.13 h1:BAV1aKkRp51C1OXDfEYZXgfrXqn4O7bpr6Z/m5otwd8= -github.com/roadrunner-server/api-go/v6 v6.0.0-beta.13/go.mod h1:Y4rsabWjr4Y10Jg6H8J5NDitQqlnXmGhCdgR+zyLYkI= +github.com/roadrunner-server/api-go/v6 v6.0.0-beta.14 h1:sTskv/3ImOZlUdtHuj9uT24gm1gQl/qU8rFNvn3MzhU= +github.com/roadrunner-server/api-go/v6 v6.0.0-beta.14/go.mod h1:Y4rsabWjr4Y10Jg6H8J5NDitQqlnXmGhCdgR+zyLYkI= github.com/roadrunner-server/config/v6 v6.0.0-beta.3 h1:G0EUzJ6Yw4UnleM6BhnOBbYPXKDHRmCJiGhC3nXDBwI= github.com/roadrunner-server/config/v6 v6.0.0-beta.3/go.mod h1:eIB+c29njpcKokXrxe483FbQOBSTNGvU3hhC6W/qYSU= github.com/roadrunner-server/endure/v2 v2.6.2 h1:sIB4kTyE7gtT3fDhuYWUYn6Vt/dcPtiA6FoNS1eS+84=