TT-13130 only mark the wg as done when the connection is stablished (#6574)
User description
Description
When the gw is ran as edge we want this to wait until the connection is
established with MDCB before attempting to pull policies and apis, we
should only mark the connection waitgroup as done when the connection is
successful not on every attempt
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
Description
Fixed the logic in rpc_client.go to ensure the waitgroup is marked
as done only when a connection is successfully established.
Removed the Done() call from the defer statement and added it after
the connection is confirmed.
Changes walkthrough 📝
Relevant
files
Bug
fix
rpc_client.go
Fix waitgroup
completion logic in connection establishment
rpc/rpc_client.go
Removed the Done() call from the defer statement in the
Dial function.
Added Done() call
after the connection is successfully established.
Ensures the
waitgroup is marked as done only upon successful connection.
TT-13130 only mark the wg as done when the connection is stablished (#6574)
User description
Description
When the gw is ran as edge we want this to wait until the connection is established with MDCB before attempting to pull policies and apis, we should only mark the connection waitgroup as done when the connection is successful not on every attempt
Related Issue
TT-13130
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist
PR Type
Bug fix
Description
rpc_client.go
to ensure the waitgroup is marked as done only when a connection is successfully established.Done()
call from the defer statement and added it after the connection is confirmed.Changes walkthrough 📝
rpc_client.go
Fix waitgroup completion logic in connection establishment
rpc/rpc_client.go
Done()
call from the defer statement in theDial
function.Done()
call after the connection is successfully established.connection.
Co-authored-by: sredny buitrago sredny@srednys-MacBook-Pro.local