feat(cli): add common note support#818
Conversation
Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jamesgao-jpg The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
|
|
||
|
|
||
| def resolve_db_note(note: str, note_file: Path | None) -> str: | ||
| if note and note_file is not None: |
There was a problem hiding this comment.
resolve_db_note() checks the value truthiness, so an explicitly supplied empty value bypasses the mutual-exclusion check: --note "" --note-file README.md --dry-run succeeds and uses the file. This contradicts the documented mutually-exclusive behavior. Please enforce exclusivity based on whether each Click option was supplied, and add this empty-inline case to the regression test.
What this changes
--noteand--note-fileoptions to backend CLI commands.task_config.db_config.note, which is already serialized into each result JSON.--notebehavior through the common implementation.Compatibility
DBConfig.notealready exists.DBConfig.to_dict()connection fields, not the note metadata.Verification
make lintmake unittest— 1 passedpython -m pytest tests/test_cli_note.py -q— 7 passedpython -m pytest tests/test_milvus_zilliz_cli.py -q— 2 passed--noteand--note-filehelp output for Zilliz Cloud and Pinecone commands.