From 072910679b8dd48ff845ad246622ec324f0c578a Mon Sep 17 00:00:00 2001 From: Leonid Bugaev Date: Fri, 18 Oct 2024 18:16:28 +0300 Subject: [PATCH] Merging to release-5-lts: TT-13130 update gorpc version (#6644) (#6650) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TT-13130 update gorpc version (#6644) ### **User description**
TT-13130
Summary Tyk Cloud: Panic appears when a user tried to deploy GW before Control Plane is in deployed state
Type Bug Bug
Status In Dev
Points N/A
Labels Re_open, QA_Fail
--- ## Description ## Related Issue TT-13130 ## Motivation and Context ## How This Has Been Tested ## Screenshots (if appropriate) ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) ## Checklist - [ ] I ensured that the documentation is up to date - [ ] I explained why this PR updates go.mod in detail with reasoning why it's required - [ ] I would like a code coverage CI quality gate exception and have explained why ___ ### **PR Type** Bug fix, Enhancement ___ ### **Description** - Updated the `gorpc` library to a newer version in `go.mod` and `go.sum`. - Modified the RPC client connection handling by replacing `ConnectionDialingWG.Wait()` with `WaitForConnection()`, improving the connection logic. ___ ### **Changes walkthrough** 📝
Relevant files
Enhancement
rpc_client.go
Update connection handling in RPC client                                 

rpc/rpc_client.go
  • Replaced ConnectionDialingWG.Wait() with WaitForConnection().
  • Improved connection handling logic.
  • +1/-1     
    Dependencies
    go.mod
    Update gorpc dependency version in go.mod                               

    go.mod - Updated `gorpc` dependency version.
    +1/-1     
    go.sum
    Update go.sum with new gorpc checksums                                     

    go.sum - Added new checksum entries for updated `gorpc` version.
    +2/-0     
    ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information --------- Co-authored-by: sredny buitrago --------- Co-authored-by: Sredny M Co-authored-by: sredny buitrago (cherry picked from commit 71ce84282687c55f56b18062b19bb7604512100d) --- go.mod | 2 +- go.sum | 3 ++- rpc/rpc_client.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f9e1b100ca0..227d831f994 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/TykTechnologies/drl v0.0.0-20221208085827-9bc9b4338f26 github.com/TykTechnologies/goautosocket v0.0.0-20190430121222-97bfa5e7e481 github.com/TykTechnologies/gojsonschema v0.0.0-20170222154038-dcb3e4bb7990 - github.com/TykTechnologies/gorpc v0.0.0-20210624160652-fe65bda0ccb9 + github.com/TykTechnologies/gorpc v0.0.0-20241016124253-606484472fbb github.com/TykTechnologies/goverify v0.0.0-20220808203004-1486f89e7708 github.com/TykTechnologies/graphql-go-tools v1.6.2-0.20240201085637-06899f14ba13 github.com/TykTechnologies/leakybucket v0.0.0-20170301023702-71692c943e3c diff --git a/go.sum b/go.sum index 1c7cbd8491e..bf3b81287d8 100644 --- a/go.sum +++ b/go.sum @@ -65,8 +65,9 @@ github.com/TykTechnologies/goautosocket v0.0.0-20190430121222-97bfa5e7e481 h1:fP github.com/TykTechnologies/goautosocket v0.0.0-20190430121222-97bfa5e7e481/go.mod h1:CtF8OunV123VfKa8Z9kKcIPHgcd67hSAwFMLlS7FvS4= github.com/TykTechnologies/gojsonschema v0.0.0-20170222154038-dcb3e4bb7990 h1:CJRTgg13M3vJG9S7k7kpnvDRMGMywm5OsN6eUE8VwJE= github.com/TykTechnologies/gojsonschema v0.0.0-20170222154038-dcb3e4bb7990/go.mod h1:SQT0NBrY4/pMikBgwFIrWCjcHBxg015Y8is0kAnMtug= -github.com/TykTechnologies/gorpc v0.0.0-20210624160652-fe65bda0ccb9 h1:fbxHiuw/244CQ4TEirzgL/CIMXDUx2szZn8cuuMlCy0= github.com/TykTechnologies/gorpc v0.0.0-20210624160652-fe65bda0ccb9/go.mod h1:v6v7Mlj08+EmEcXOfpuTxGt2qYU9yhqqtv4QF9Wf50E= +github.com/TykTechnologies/gorpc v0.0.0-20241016124253-606484472fbb h1:4ZQmRdKvOgE/KSlwT7Ze/imlWaC/z9kynUL4lADCz3Y= +github.com/TykTechnologies/gorpc v0.0.0-20241016124253-606484472fbb/go.mod h1:v6v7Mlj08+EmEcXOfpuTxGt2qYU9yhqqtv4QF9Wf50E= github.com/TykTechnologies/goverify v0.0.0-20220808203004-1486f89e7708 h1:cmXjlMzcexhc/Cg+QB/c2CPUVs1ux9xn6162qaf/LC4= github.com/TykTechnologies/goverify v0.0.0-20220808203004-1486f89e7708/go.mod h1:mkS8jKcz8otdfEXhJs1QQ/DKoIY1NFFsRPKS0RwQENI= github.com/TykTechnologies/graphql-go-tools v1.6.2-0.20230320143102-7a16078ce517/go.mod h1:ZiFZcrue3+n2mHH+KLHRipbYVULkgy3Myko5S7IIs74= diff --git a/rpc/rpc_client.go b/rpc/rpc_client.go index f1870ebe061..50edc9fe6ff 100644 --- a/rpc/rpc_client.go +++ b/rpc/rpc_client.go @@ -313,7 +313,7 @@ func Connect(connConfig Config, suppressRegister bool, dispatcherFuncs map[strin } // wait until all the pool connections are dialed so we can call login - connectionDialingWG.Wait() + clientSingleton.WaitForConnection() handleLogin() if !suppressRegister { register()