feat(someip): support static remote endpoint (no Service Discovery)#621
Conversation
Add optional remote_host/remote_port config fields to the SomeIp driver so that ECUs without SOME/IP-SD (e.g. Zephyr firmware with multicast TX disabled) can be reached via a known static address. When remote_host is set, a remote_endpoint is forwarded to opensomeip's ClientConfig, bypassing Service Discovery. Both fields default to None, preserving the existing SD-based behavior. Closes jumpstarter-dev#619 Made-with: Cursor
📝 WalkthroughWalkthroughAdds optional Changes
Sequence Diagram(s)sequenceDiagram
participant Driver as SomeIp (Driver)
participant Config as ClientConfig
participant Osip as OsipClient
participant Remote as Remote Endpoint
Driver->>Config: build local_endpoint(host,port), sd_config, transport_mode
alt remote_host provided
Driver->>Config: include remote_endpoint(remote_host, remote_port?||port)
end
Driver->>Osip: instantiate OsipClient(Config)
Osip->>Remote: send RPC (service/method/payload)
Remote-->>Osip: response (payload)
Osip-->>Driver: return response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@python/packages/jumpstarter-driver-someip/jumpstarter_driver_someip/driver.py`:
- Around line 105-108: The current logic treats falsey remote_port values as
omitted and ignores remote_port when remote_host is missing; update the branch
around self.remote_host/self.remote_port so you explicitly check "is not None":
if self.remote_host is not None, create config_kwargs["remote_endpoint"] =
Endpoint(self.remote_host, self.remote_port if self.remote_port is not None else
self.port); if self.remote_host is None but self.remote_port is not None, raise
a ValueError (or similar) to reject a remote_port without a remote_host and fail
fast; reference symbols: self.remote_host, self.remote_port, config_kwargs,
Endpoint.
🪄 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
Run ID: 863551bf-9bf6-4937-b8b9-16b6fb870c26
⛔ Files ignored due to path filters (1)
python/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
python/packages/jumpstarter-driver-someip/README.mdpython/packages/jumpstarter-driver-someip/examples/exporter.yamlpython/packages/jumpstarter-driver-someip/jumpstarter_driver_someip/driver.pypython/packages/jumpstarter-driver-someip/jumpstarter_driver_someip/driver_test.py
Address CodeRabbit review feedback: - Reject remote_port when remote_host is not set (fail fast) - Use `is not None` instead of `or` for remote_port fallback so port 0 is not silently treated as omitted Made-with: Cursor
- Refactor ClientConfig construction to use explicit keyword arguments instead of **config_kwargs dict unpacking, fixing the ty checker `missing-argument` error - Pin opensomeip to the v0.1.4 git commit (ac1afdeb) which adds the remote_endpoint field to ClientConfig (not yet published on PyPI) Made-with: Cursor
|
@vtz I pointed pyproject to your newer git version of opensomeip (0.1.4 ready) that contains the changes for the remote_host support. We can switch back to pypi later. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
python/packages/jumpstarter-driver-someip/pyproject.toml (1)
26-27:allow-direct-referencesis only needed while the Git dep is in place.Remember to remove this
[tool.hatch.metadata]block together with reverting line 14 to the PyPI version constraint onceopensomeip0.1.4 is published, so this package doesn't silently retain the ability to take direct-URL deps going forward.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@python/packages/jumpstarter-driver-someip/pyproject.toml` around lines 26 - 27, Remove the temporary [tool.hatch.metadata] block that sets allow-direct-references and revert the opensomeip dependency back from the Git direct-URL to the published PyPI constraint (opensomeip 0.1.4) in pyproject.toml once opensomeip 0.1.4 is published so the package no longer accepts direct-URL deps; specifically delete the allow-direct-references entry and update the opensomeip dependency declaration to the official PyPI version rather than the git reference.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@python/packages/jumpstarter-driver-someip/pyproject.toml`:
- Around line 13-14: The pyproject.toml currently pins opensomeip to a direct
git commit ("opensomeip @
git+https://github.com/vtz/opensomeip-python.git@ac1afdeb1ffa002ce3af4e5a3ca2c6fc9a690346")
which blocks PyPI publication; replace this git URL with the release version
spec "opensomeip>=0.1.4,<0.2.0" once v0.1.4 is published and add a release-gate
to your packaging/pipeline that fails publishing if any dependency string
contains a VCS/git URL (detect the "git+https://" pattern or the specific
opensomeip git ref) so the package cannot be uploaded while the temporary git
reference/TODO remains.
---
Nitpick comments:
In `@python/packages/jumpstarter-driver-someip/pyproject.toml`:
- Around line 26-27: Remove the temporary [tool.hatch.metadata] block that sets
allow-direct-references and revert the opensomeip dependency back from the Git
direct-URL to the published PyPI constraint (opensomeip 0.1.4) in pyproject.toml
once opensomeip 0.1.4 is published so the package no longer accepts direct-URL
deps; specifically delete the allow-direct-references entry and update the
opensomeip dependency declaration to the official PyPI version rather than the
git reference.
🪄 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
Run ID: a85ac4a2-06a4-458f-b4a8-547f9bfd0c5e
⛔ Files ignored due to path filters (1)
python/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
python/packages/jumpstarter-driver-someip/jumpstarter_driver_someip/driver.pypython/packages/jumpstarter-driver-someip/jumpstarter_driver_someip/driver_test.pypython/packages/jumpstarter-driver-someip/pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (2)
- python/packages/jumpstarter-driver-someip/jumpstarter_driver_someip/driver_test.py
- python/packages/jumpstarter-driver-someip/jumpstarter_driver_someip/driver.py
| # TODO: replace with "opensomeip>=0.1.4,<0.2.0" once v0.1.4 is published on PyPI | ||
| "opensomeip @ git+https://github.com/vtz/opensomeip-python.git@ac1afdeb1ffa002ce3af4e5a3ca2c6fc9a690346", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check whether opensomeip 0.1.4 is yet available on PyPI
curl -s https://pypi.org/pypi/opensomeip/json | jq '.releases | keys'Repository: jumpstarter-dev/jumpstarter
Length of output: 95
🏁 Script executed:
cat -n python/packages/jumpstarter-driver-someip/pyproject.tomlRepository: jumpstarter-dev/jumpstarter
Length of output: 1757
🏁 Script executed:
# Check if there are any issues/discussions about opensomeip 0.1.4 release
rg -i "opensomeip.*0\.1\.4|0\.1\.4.*opensomeip" --type py --type toml --type mdRepository: jumpstarter-dev/jumpstarter
Length of output: 212
🏁 Script executed:
# Check the specific commit referenced to understand why it's pinned
git log --oneline vtz/opensomeip-python 2>/dev/null | head -5 || echo "Commit info not directly accessible"
# Check if the driver package is in workspace members (indicating publication intent)
fd pyproject.toml -x grep -l "jumpstarter-driver-someip" {} \; 2>/dev/null | head -5Repository: jumpstarter-dev/jumpstarter
Length of output: 202
🏁 Script executed:
# Search for mentions of 0.1.4 release in issues, discussions, or PR context
rg -i "0\.1\.4|opensomeip.*release" --type md --type py -B 2 -A 2Repository: jumpstarter-dev/jumpstarter
Length of output: 53
🏁 Script executed:
# Check git log for context about why this specific commit was pinned
git log --all --oneline --grep="opensomeip\|someip" 2>/dev/null | head -20Repository: jumpstarter-dev/jumpstarter
Length of output: 296
🏁 Script executed:
# Look for any build/CI configuration that might block publishing with direct references
find . -name "*.yml" -o -name "*.yaml" | xargs grep -l "publish\|pypi\|direct.*reference" 2>/dev/null | head -5Repository: jumpstarter-dev/jumpstarter
Length of output: 288
Direct Git reference blocks PyPI publication and should be release-gated.
This dependency creates a known publication blocker:
-
PyPI publication: Direct URL references are rejected by PyPI (PEP 440), so this package cannot be uploaded to PyPI while pinned to the Git commit. The TODO acknowledges this dependency is temporary pending
opensomeip0.1.4 release. -
Commit availability: The pinned commit
ac1afdebresides on the maintainer's fork. While the maintainer (vtz) controls both this driver and the opensomeip-python binding, the reliance on a single upstream commit creates a publication blocker until v0.1.4 is released on PyPI.
Ensure this is treated as a release-blocker: the package should not be published to PyPI while this Git reference is active, and the v0.1.4 PyPI release should be tracked as a prerequisite for publishing this driver.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@python/packages/jumpstarter-driver-someip/pyproject.toml` around lines 13 -
14, The pyproject.toml currently pins opensomeip to a direct git commit
("opensomeip @
git+https://github.com/vtz/opensomeip-python.git@ac1afdeb1ffa002ce3af4e5a3ca2c6fc9a690346")
which blocks PyPI publication; replace this git URL with the release version
spec "opensomeip>=0.1.4,<0.2.0" once v0.1.4 is published and add a release-gate
to your packaging/pipeline that fails publishing if any dependency string
contains a VCS/git URL (detect the "git+https://" pattern or the specific
opensomeip git ref) so the package cannot be uploaded while the temporary git
reference/TODO remains.
There was a problem hiding this comment.
@vtz can you release 0.1.4 for opensomeip and update this afterwards please?
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
Summary
remote_hostandremote_portconfig fields to the SOME/IP driver for communicating with ECUs that don't run SOME/IP Service Discovery (e.g. Zephyr firmware with multicast TX disabled)remote_hostis set, aremote_endpointis forwarded to opensomeip'sClientConfig, bypassing SD. Both fields default toNone, preserving existing SD-based behavior.Closes #619
Changes
driver.pyremote_host: str | Noneandremote_port: int | Nonefields; constructClientConfigwithremote_endpointwhenremote_hostis setdriver_test.pyREADME.mdexamples/exporter.yamlBackward Compatibility
Both fields default to
None. Existing configurations continue to work unchanged (SD-based discovery). Static routing is opt-in.Test plan
make pkg-test-jumpstarter-driver-someip)Made with Cursor