Skip to content

Harmonize iri-remote and update WellKnownEndpoints#1515

Merged
lukasfrank merged 1 commit into
mainfrom
enh/iri-remote
Jul 15, 2026
Merged

Harmonize iri-remote and update WellKnownEndpoints#1515
lukasfrank merged 1 commit into
mainfrom
enh/iri-remote

Conversation

@lukasfrank

@lukasfrank lukasfrank commented Jul 15, 2026

Copy link
Copy Markdown
Member

Proposed Changes

  • Harmonized iri-remote and updated WellKnownEndpoints
  • This allows to use WellKnownEndpoints to prevent initial pod restart if socket is not there

Fixes: #1516

Summary by CodeRabbit

  • Improvements
    • Standardized runtime endpoint discovery across bucket, machine, and volume services.
    • Services can now consistently select configured endpoints, environment-provided endpoints, or available local sockets.
    • Updated supported local socket paths for machine and volume services.
    • Removed an obsolete bucket socket endpoint from automatic discovery.
    • Improved timeout handling when no suitable endpoint is available.

Signed-off-by: Lukas Frank <lukas.frank@sap.com>
@lukasfrank
lukasfrank requested a review from a team as a code owner July 15, 2026 15:26
@lukasfrank lukasfrank self-assigned this Jul 15, 2026
@github-actions github-actions Bot added size/L enhancement New feature or request labels Jul 15, 2026
@lukasfrank lukasfrank changed the title Harmonized iri-remote and updated WellKnownEndpoints Harmonize iri-remote and update WellKnownEndpoints Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

A 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.

Changes

Remote endpoint resolution

Layer / File(s) Summary
Common address resolver
iri/remote/common/address.go
Adds timeout-aware and context-aware helpers that prioritize explicit addresses, environment variables, and available Unix sockets.
Provider resolver integration
iri/remote/bucket/bucket.go, iri/remote/machine/machine.go, iri/remote/volume/volume.go
Delegates provider address methods to the common helpers and updates bucket, machine, and volume well-known socket paths.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately summarizes the main refactor and endpoint list update.
Description check ✅ Passed The description matches the template’s intent and includes proposed changes plus a fix reference, though one proposed-change bullet is missing.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch enh/iri-remote

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
iri/remote/common/address.go (1)

39-41: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Wrap the underlying polling error for better debugging.

Discarding the error returned by wait.PollUntilContextCancel hides the root cause (such as a timeout or context cancellation). Consider wrapping the error with %w to 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

📥 Commits

Reviewing files that changed from the base of the PR and between 9246c62 and bc20d15.

📒 Files selected for processing (4)
  • iri/remote/bucket/bucket.go
  • iri/remote/common/address.go
  • iri/remote/machine/machine.go
  • iri/remote/volume/volume.go

@lukasfrank
lukasfrank merged commit 89fd7b1 into main Jul 15, 2026
17 checks passed
@lukasfrank
lukasfrank deleted the enh/iri-remote branch July 15, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<*>-provider restart if socket is not present

2 participants