feat (cli-cicd integration): Enhance import command interface#1
Open
aviatco wants to merge 5 commits intodev/aviatcohen/cli-cicd-intergation-mainfrom
Open
Conversation
ayeshurun
reviewed
Feb 11, 2026
|
|
||
| @staticmethod | ||
| def import_required_param_missing(param_display_name: str, flow_name: str, flow_syntax: str) -> str: | ||
| return f"{param_display_name} is required for {flow_name} flow.\nCorrect syntax: {flow_syntax}" |
There was a problem hiding this comment.
not sure it actually break into a new line.
Owner
Author
There was a problem hiding this comment.
it is - I test it.
but I see not the string is wrong - I wanted it without the "correct" - will remove it
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.
📥 Pull Request
✨ Description of new changes
This pull request introduces significant improvements to the
importcommand interface in the CLI, enabling support for both Direct API and CI/CD flows with clear argument validation and user guidance. The changes add mutually exclusive argument groups for the two flows, enforce correct usage with custom validators, improve error messages, and update documentation and examples to reflect the new interface.Import Command Interface and Validation:
importcommand now supports two mutually exclusive flows: Direct API (usingpathand-i/--input) and CI/CD (using--config-fileand--env). Argument parsing enforces that only one flow can be used at a time, and provides detailed error messages if parameters are missing or flows are mixed. (src/fabric_cli/parsers/fab_fs_parser.py[1] [2];src/fabric_cli/parsers/fab_parser_validators.py[3]validate_import_argsensures that required parameters for each flow are provided and that the flows are not mixed. Custom error messages guide the user to correct syntax. (src/fabric_cli/parsers/fab_parser_validators.py[1];src/fabric_cli/errors/common.py[2]import_commandand its implementation have been updated to handle both flows, delegating to the correct import logic based on the arguments. (src/fabric_cli/commands/fs/fab_fs.py[1];src/fabric_cli/commands/fs/fab_fs_import.py[2]Error Handling and Messages:
src/fabric_cli/errors/hierarchy.py[1];src/fabric_cli/core/hiearchy/fab_base_item.py[2] [3];src/fabric_cli/core/hiearchy/fab_element.py[4];src/fabric_cli/errors/common.py[5]src/fabric_cli/core/fab_constant.pysrc/fabric_cli/core/fab_constant.pyR285)Documentation and Examples:
src/fabric_cli/parsers/fab_fs_parser.pysrc/fabric_cli/parsers/fab_fs_parser.pyL393-R400)Codebase Cleanup:
fab_fs_import_item.pyfile, as its functionality is now split between flow-specific modules. (src/fabric_cli/commands/fs/impor/fab_fs_import_item.pysrc/fabric_cli/commands/fs/impor/fab_fs_import_item.pyL1-L126)Changelog:
.changes/unreleased/added-20260210-123451.yaml.changes/unreleased/added-20260210-123451.yamlR1-R6)