Repository navigation
fix(container): forward run_args to the runtime and only allocate a TTY for terminals - #3659
Conversation
…TY for terminals
`run.run_args` was accepted in the container component schema but never passed
to Docker/Podman by `atmos container up` or `atmos container run`, so flags such
as `--publish` or `--init` were silently dropped. Forward them on both paths, and
skip attaching the shared stack network when the arguments already pin a network
with `--network`/`--net`, which would otherwise produce conflicting flags.
`atmos container exec` always requested a TTY, which broke scripts and pipelines
("the input device is not a TTY"). Allocate a TTY only when stdin is a terminal,
while still attaching stdin so piped input keeps working.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
Quality Gate
Readiness✅ Fewer than 150 changed files Reviews✅ CodeRabbit approval (current head) ✅ Review threads resolved or dismissed MeasuresCurrent commit: Quality Gate details
Atmos performanceNo significant regressions detected against the newest compatible snapshot. Describe affected
All other benchmarks
Full results are available in the comparison artifacts. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3659 +/- ##
==========================================
- Coverage 87.29% 87.28% -0.01%
==========================================
Files 3039 3039
Lines 276747 276758 +11
==========================================
- Hits 241580 241569 -11
- Misses 24958 24974 +16
- Partials 10209 10215 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
CI timing summaryLatest completed GitHub Actions runs for
Wall-clock time spans the earliest included workflow creation through the latest completion. Aggregate runner time adds each job's execution time, so concurrent jobs are counted separately.
Longest jobs (top 10)
Updated automatically when a PR workflow finishes. |
|
CodeRabbit (@coderabbitai) review |
Action performed
|
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
what
atmos container upandatmos container runnow forwardrun.run_argsto Docker/Podman (e.g.--publish=127.0.0.1:3000:3000,--init). A newContainerSpec.RunArgs()accessor feeds them into the runtime create config on both paths.run_argsalready contains an explicit--network/--net, Atmos no longer attaches the automatic shared stack network, so the user's network choice wins instead of producing conflicting flags.atmos container execallocates a TTY only when stdin is a terminal. stdin/stdout/stderr stay attached, so piped input still reaches the container.website/docs/stacks/components/container.mdxexplains theexecTTY behavior and adds an "Additional Runtime Arguments" section. That section covers network precedence and the need todown/upafter changingrun_args.why
run.run_args, but the executor never passed it on, so the arguments were silently dropped. A service bound with--publishwas then unreachable, with no error to explain why.--network=hostproduces conflicting runtime flags.atmos container execfail in scripts, CI and pipelines ("the input device is not a TTY").testing
TestExecute_ForwardsRunArgscovers bothupandrun. It checks thatrun_argsreachCreateConfig.RunArgs, and that the shared network is attached by default but skipped when--networkis explicit.TestExecuteExec_DetectsTerminalcovers the terminal and pipe cases. It checks thatTtyfollows stdin's terminal status while stdin/stdout/stderr stay attached.go build ./...,go test ./pkg/component/container/... ./pkg/container/...,atmos lint --changed(0 issues), and the website build.references
🤖 Generated with Claude Code
Summary by CodeRabbit
upandruncommands now forward configured runtime arguments. Explicit network options override the automatic shared stack network.execallocates a TTY when stdin is a terminal and supports piped input without requesting a TTY.