Skip to content

fix(iris): handle scheme in actor proxy upstream URL#4157

Merged
ravwojdyla merged 2 commits intomainfrom
rav-fix-actor-proxy-url
Mar 26, 2026
Merged

fix(iris): handle scheme in actor proxy upstream URL#4157
ravwojdyla merged 2 commits intomainfrom
rav-fix-actor-proxy-url

Conversation

@ravwojdyla-agent
Copy link
Copy Markdown
Contributor

Summary

  • The iris backend registers actor endpoints with a full URL including scheme (e.g. http://10.164.0.11:63143), but the actor proxy unconditionally prepended http://, producing a malformed http://http://... URL that fails with "Name or service not known"
  • Use the address as-is when it already contains a scheme; prepend http:// only for bare host:port addresses

Test plan

  • Existing test_actor_proxy.py tests pass (bare host:port path still works)
  • Verify proxy works end-to-end with a running zephyr job after controller redeploy

🤖 Generated with Claude Code

The iris backend registers endpoints with the http:// scheme
(e.g. http://10.164.0.11:63143), but the proxy unconditionally
prepended http://, producing a malformed URL. Use the address
as-is when it already contains a scheme.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ravwojdyla-agent ravwojdyla-agent added the agent-generated Created by automation/agent label Mar 26, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc5c51f2da

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

)

upstream_url = f"http://{address}/iris.actor.ActorService/{method}"
base = address if address.startswith("http") else f"http://{address}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Detect scheme using '://' before treating endpoint as URL

The new address.startswith("http") check misclassifies valid bare host:port endpoints whose hostname begins with http (for example http-worker:9000) as already-schemed URLs. In that case the proxy builds http-worker:9000/iris.actor..., which parses with scheme http-worker instead of HTTP and causes upstream forwarding to fail. This is a regression from the previous behavior for a subset of bare addresses; checking for "://" (or parsing scheme explicitly) avoids the false positive.

Useful? React with 👍 / 👎.

Two issues prevented ProxyResolver from working with real iris jobs:

1. The iris backend registers endpoints with http:// scheme
   (e.g. http://10.164.0.11:63143), but the proxy unconditionally
   prepended http://, producing a malformed URL.

2. Remove namespace from ProxyResolver — callers pass the full actor
   name as registered in the endpoint registry. This avoids a mismatch
   where the client would send a short name but the actor server expects
   the full namespaced path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ravwojdyla ravwojdyla force-pushed the rav-fix-actor-proxy-url branch from 3f6556a to 5dae088 Compare March 26, 2026 00:38
@ravwojdyla ravwojdyla merged commit 69c15ec into main Mar 26, 2026
41 checks passed
@ravwojdyla ravwojdyla deleted the rav-fix-actor-proxy-url branch March 26, 2026 00:57
Helw150 pushed a commit that referenced this pull request Apr 8, 2026
## Summary
- The iris backend registers actor endpoints with a full URL including
scheme (e.g. `http://10.164.0.11:63143`), but the actor proxy
unconditionally prepended `http://`, producing a malformed
`http://http://...` URL that fails with "Name or service not known"
- Use the address as-is when it already contains a scheme; prepend
`http://` only for bare `host:port` addresses

## Test plan
- [x] Existing `test_actor_proxy.py` tests pass (bare `host:port` path
still works)
- [ ] Verify proxy works end-to-end with a running zephyr job after
controller redeploy

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Rafal Wojdyla <ravwojdyla@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-generated Created by automation/agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants