Harmonize iri-remote and update WellKnownEndpoints#1515
Conversation
Signed-off-by: Lukas Frank <lukas.frank@sap.com>
iri-remote and updated WellKnownEndpointsiri-remote and update WellKnownEndpoints
📝 WalkthroughWalkthroughA shared address resolver was added for remote endpoints. Bucket, machine, and volume packages now delegate address selection to it, while their well-known Unix socket endpoint lists were updated. ChangesRemote endpoint resolution
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
iri/remote/common/address.go (1)
39-41: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winWrap the underlying polling error for better debugging.
Discarding the error returned by
wait.PollUntilContextCancelhides the root cause (such as a timeout or context cancellation). Consider wrapping the error with%wto preserve this context.♻️ Proposed fix
- }); err != nil { - return "", fmt.Errorf("could not determine which endpoint to use") - } + }); err != nil { + return "", fmt.Errorf("could not determine which endpoint to use: %w", err) + }🤖 Prompt for 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. In `@iri/remote/common/address.go` around lines 39 - 41, Update the error handling around wait.PollUntilContextCancel to retain and wrap the returned polling error with %w in the fmt.Errorf call, while preserving the existing endpoint-selection context and return behavior.
🤖 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.
Nitpick comments:
In `@iri/remote/common/address.go`:
- Around line 39-41: Update the error handling around
wait.PollUntilContextCancel to retain and wrap the returned polling error with
%w in the fmt.Errorf call, while preserving the existing endpoint-selection
context and return behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e1853437-bccb-4af8-bbdd-ce9db5fde824
📒 Files selected for processing (4)
iri/remote/bucket/bucket.goiri/remote/common/address.goiri/remote/machine/machine.goiri/remote/volume/volume.go
Proposed Changes
iri-remoteand updatedWellKnownEndpointsWellKnownEndpointsto prevent initial pod restart if socket is not thereFixes: #1516
Summary by CodeRabbit