-
Notifications
You must be signed in to change notification settings - Fork 716
Fix docker.run_command()
needing detach
but not enforcing it
#5979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix docker.run_command()
needing detach
but not enforcing it
#5979
Conversation
📝 WalkthroughWalkthroughThe changes adjust how Docker containers are run and how their output and status codes are managed for command execution. Parameters related to detachment and output streaming are removed from one method and set explicitly in another, with minor adjustments to how command status results are accessed. Changes
Sequence Diagram(s)sequenceDiagram
participant DockerHomeAssistant
participant DockerManager
participant DockerEngine
DockerHomeAssistant->>DockerManager: run_command(command, ...)
DockerManager->>DockerEngine: Run container (detach=True)
DockerEngine-->>DockerManager: Container result (with StatusCode)
DockerManager-->>DockerHomeAssistant: Return StatusCode
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Pylint (3.3.7)tests/docker/test_manager.pysupervisor/docker/manager.py📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
🔇 Additional comments (2)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
I don't understand why codecov is failing. It is pointing itself that was a 0.00% coverage change with this PR. |
Waiting for #5977 to be merged first, as it adds the test that will fix codecov for this PR. |
417ce08
to
085b653
Compare
Since |
Sure, I completely agree. |
085b653
to
2948c3b
Compare
2948c3b
to
d957238
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Proposed change
docker.run_command
only works withDetach=True
, but was not including it in the defaultcontainer.run
args (i.e. was broken by default).This fixes it, and also remove the redundant arguments from
docker.run_command
callers.Type of change
Additional information
Extracted from #5974.
Checklist
ruff format supervisor tests
)If API endpoints or add-on configuration are added/changed:
Summary by CodeRabbit