Skip to content

[ CLI ] Propagate deploy failure exit codes - exit status#3510

Open
nhatghost wants to merge 1 commit into
orchestration-agent:mainfrom
nhatghost:fix-cli-exit-status
Open

[ CLI ] Propagate deploy failure exit codes - exit status#3510
nhatghost wants to merge 1 commit into
orchestration-agent:mainfrom
nhatghost:fix-cli-exit-status

Conversation

@nhatghost
Copy link
Copy Markdown

Description

This PR addresses Issue #3453 by refactoring the CLI commands into explicit, dedicated handler functions that guarantee integer exit codes.

Key Enhancements

  1. Explicit Handlers & Contracts: Factored CLI sub-command blocks into standalone handler functions (handle_init, handle_deploy, handle_status, handle_logs) returning descriptive exit codes.
    1. Defensive Manifest Validation: Integrated verification inside handle_deploy checking for manifest file existence and returning non-zero status code (1) on failure.
    1. Comprehensive Tests: Added tests/test_cli.py covering standard success execution (0 status), manifest loading failure (1 status), and unknown arguments.
    1. Resolved Deadlocks & Windows compatibility: Applied conditional resource imports and reentrant locking (RLock) in metrics to ensure clean local development environments. All unit tests pass cleanly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant