Repository navigation
fix: Report Docker and installed-command errors as a short message - #70
Merged
Merged
Conversation
This was referenced Oct 23, 2026
nealrichardson
commented
Oct 23, 2026
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| def cli() -> None: |
Collaborator
Author
There was a problem hiding this comment.
I don't like how we have a function called main() (and see its docstring), but __main__ calls cli(). Sounds like we need some renaming at least, possibly refactoring.
Collaborator
Author
There was a problem hiding this comment.
Renamed so main() is the entry point (console script, python main.py, and the error reporting), and the workflow it calls is run(). The console script is main:main again, the same as on main. (2f9b025)
…sage The installed with-connect command calls cli(), which prints RuntimeErrors as a one-line Error: message, as python main.py already did. Failures to reach Docker, create the container, or start it are reported the same way, and a container that fails to start is removed. Fixes #59. Fixes #61. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--stop reports a short error, and a failed stop during cleanup prints a warning instead of hiding the original error or exit code. Addresses roborev job 680. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nealrichardson
force-pushed
the
clean-errors
branch
from
October 23, 2026 18:39
57e37f4 to
2f9b025
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #59. Fixes #61.
#61: installed
with-connectprints a tracebackThe installed command called
main()directly, which skipped the code that turns errors into a short message.main()is now the only entry point: it runs the workflow (renamed torun()), printsRuntimeErrors as a one-lineError: ..., and exits with code 1. Both the console script (pyproject.toml) andpython main.pycallmain().#59: Docker errors print a traceback
These Docker failures are reported as one-line errors:
Could not connect to Docker. Is it running? ...400 Bad Requests--stopfails with a Docker error other than "not found"If stopping the container fails during cleanup after a run, with-connect prints a warning and keeps the original error or the command's exit code.
Tests
Added unit tests for each failure path, plus a check that the console script points at
main:main. They're also registered in the__main__block souv run test_main.pyin CI runs them. I checked the installed command by hand against real Docker for--stopwithout a container ID, an unreachableDOCKER_HOST, and a port already in use, which left no container behind.The branch is rebased onto main, including #69, #71, #74, and #75.
🤖 Generated with Claude Code