Fix registration error when setup#92
Conversation
Signed-off-by: root <root@aio-node74-arm.cluster.local>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: archlitchi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
📝 WalkthroughWalkthrough
ChangesgRPC Dial Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/server/register.go`:
- Around line 177-180: The registration flow in NewClient is waiting on
connectivity.Idle before any dialing starts, so it can hang until the context
expires. In the connection setup path that uses grpc.NewClient, call c.Connect()
first, then wait for the channel to reach connectivity.Ready before returning.
Keep the existing timeout/error handling and close the client on failure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 38ba0b82-dad3-4aff-9073-d853ca0bb838
📒 Files selected for processing (1)
internal/server/register.go
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/server/register.go`:
- Around line 183-186: The connection wait logic in registerServer currently
treats connectivity.TransientFailure as terminal, but it should keep waiting
until the deadline and only exit early on connectivity.Shutdown. Update the
state-handling branch in the connect/wait loop so TransientFailure is ignored or
retried, while Shutdown still closes the connection and returns an error; use
the existing c.Close, state checks, and deadline-based wait flow to locate the
fix.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 143e6ae1-cc46-41bc-966b-e01f1d1cda70
📒 Files selected for processing (1)
internal/server/register.go
Add prefix 'passthrough:///' to avoid connection error
Summary by CodeRabbit