Fix run-pass list failure exit status - #2648
Open
Sylvester Kaczmarek (sylvesterkaczmarek) wants to merge 2 commits into
Open
Fix run-pass list failure exit status#2648Sylvester Kaczmarek (sylvesterkaczmarek) wants to merge 2 commits into
Sylvester Kaczmarek (sylvesterkaczmarek) wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Sylvester Kaczmarek (sylvesterkaczmarek)
September 3, 2026 18:24
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is small and targeted, and it includes a regression test validating the corrected non-zero exit behavior.
Pull request overview
This PR fixes olive run-pass --list-passes so that failures while loading pass configuration produce a non-zero process exit status, preventing CI/scripts from treating a failed operation as successful.
Changes:
- Exit with status code
1when pass configuration loading fails during--list-passes. - Add a regression test that simulates configuration-loading failure and asserts a non-zero exit code.
File summaries
| File | Description |
|---|---|
olive/cli/run_pass.py |
Raises SystemExit(1) on pass config load failure so the CLI returns a failure status. |
test/cli/test_run_pass_exit_status.py |
Adds a regression test for non-zero exit status on --list-passes failure. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+21
to
+22
| with pytest.raises(SystemExit) as exc_info: | ||
| command._list_passes() |
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.
Describe your changes
olive run-pass --list-passescatches errors while loading the pass configuration, prints an error, and then returns normally. The CLI therefore exits with status 0 even though the requested operation failed, which can make scripts and CI treat a failure as success.This change preserves the existing diagnostics but exits with status 1 when pass configuration loading fails.
Tests
Adds a regression test that simulates a configuration-loading failure and asserts a non-zero exit status.
Checklist before requesting a review