Repository navigation
Pass start.sh arguments on to the python script - #3
Conversation
Arguments given to ioc/start.sh are now forwarded to the startup python script and to an override config/start.sh. stdio-socket only takes a single command string, so the arguments are carried across the console wrap in IOC_ARGS (shell quoted with printf %q) and restored after. Fixes #2 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jd9gGzEQubx2j1kD6Q2s8a
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe startup script now preserves supplied arguments across the ChangesStartup argument forwarding
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The argument-forwarding change has no established merge blocker in the supplied evidence. Normal validation remains appropriate. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Rename IOC_ARGS to _STDIO_IOC_ARGS so the eval'd hand-off variable reads as internal, and document the simpler values.yaml form that overrides the chart's command to run start.sh directly. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jd9gGzEQubx2j1kD6Q2s8a
|
Independent review by a Claude Fable agent
Review and replies by Claude Code. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
I have tested this implementation on Pollux and it works as described and solves the issue. |
Problem
There is no way to give the IOC's python script command line arguments from a service's
values.yaml.ioc/start.shdrops its own arguments, and the stdio-socket console wrap re-runsstart.shwith none.What changed
ioc/start.shforwards"$@"topython ${STARTUP_PYTHON}and to an overrideconfig/start.sh.pptty, so quoting arguments into that string is fragile. Instead the outerstart.shsaves the arguments inIOC_ARGS(quoted withprintf %q), and the innerstart.shrestores them witheval set --.values.yaml.The issue suggests replacing
CMDwith anENTRYPOINT. I left the Dockerfile alone because the ioc-instance chart setscommand: [bash, -c]andargs: [/epics/ioc/start.sh], which override bothENTRYPOINTandCMD. Under helm the arguments therefore come fromargs:, like this:An
ENTRYPOINTwould also change whatdocker run <image> bashand the devcontainer do, so it seemed better as a separate decision.Testing
start.shin bash with a stubconfig/main.pythat printssys.argv, and a stubstdio-socketthat runs its command string withsh -clike the real one does:KUBERNETES_PORT:--foo "two words" "it's"arrive unchangedKUBERNETES_PORT(through the wrap): the same, plus a literal'$HOME'that is not expandedsys.argv[1:] == []config/start.shreceives the argumentsFixes #2
🤖 Generated with Claude Code
https://claude.ai/code/session_01Jd9gGzEQubx2j1kD6Q2s8a
Summary by CodeRabbit
start.shconfigurations, including when running behind the Kubernetes standard I/O wrapper.