feat(cli): allow using --output-file with all output types #859
Merged
AlessandroPomponio merged 5 commits intomainfrom Apr 16, 2026
Merged
feat(cli): allow using --output-file with all output types #859AlessandroPomponio merged 5 commits intomainfrom
AlessandroPomponio merged 5 commits intomainfrom
Conversation
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
michael-johnston
approved these changes
Apr 16, 2026
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.
Summary
This pull request removes redundant output format validation logic from CLI commands and enhances output file handling to support writing table format to files. Previously, validation prevented using
--output-filewith certain display formats (liketable,console,default, andname), but this restriction has been removed to allow more flexible output options.Resolves #839 and closes #788
Files Changed
📄
orchestrator/cli/commands/get.pyRemoved validation that prevented using
--output-filewithDEFAULTandNAMEoutput formats. This restriction is no longer necessary as the output handlers now properly support file output for all formats.📄
orchestrator/cli/commands/show_entities.pyRemoved validation that prevented using
--output-filewithTABLEoutput format. File output is now supported for table format.📄
orchestrator/cli/commands/show_requests.pyRemoved validation that prevented using
--output-filewithTABLEoutput format for the show requests command.📄
orchestrator/cli/commands/show_results.pyRemoved validation that prevented using
--output-filewithTABLEoutput format for the show results command.📄
orchestrator/cli/commands/show_summary.pyRemoved validation that prevented using
--output-filewithMARKDOWNandTABLEoutput formats for the show summary command.📄
orchestrator/cli/utils/output/dataframes.pyEnhanced the
df_to_outputfunction to support writing table format to files. When outputting to a file, tables are now rendered to string format usingrender_to_stringwith automatic width. Column truncation is automatically disabled when writing to files. Also added proper handling for empty JSON output.📄
orchestrator/cli/utils/resources/handlers.pyRefactored output handling in multiple format handlers (
_handle_name_format,_handle_table_format) to use the centralized_write_or_print_outputhelper function. Enhanced_write_or_print_outputto accept both string content and rich renderables, automatically converting renderables to strings when writing to files. This ensures consistent file output behavior across all format types.