Skip to content

feat(cli): add common note support#818

Open
jamesgao-jpg wants to merge 2 commits into
zilliztech:mainfrom
jamesgao-jpg:cli-note-support
Open

feat(cli): add common note support#818
jamesgao-jpg wants to merge 2 commits into
zilliztech:mainfrom
jamesgao-jpg:cli-note-support

Conversation

@jamesgao-jpg

@jamesgao-jpg jamesgao-jpg commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

What this changes

  • Adds shared --note and --note-file options to backend CLI commands.
  • Resolves the supplied context centrally into task_config.db_config.note, which is already serialized into each result JSON.
  • Ensures Endee's custom CLI runner also resolves note files before constructing its task.
  • Rejects conflicting options, empty note files, and non-UTF-8 note files.
  • Preserves Pinecone's existing --note behavior through the common implementation.
  • Documents how to attach structured or multiline benchmark context.

Compatibility

  • Existing CLI commands remain unchanged when neither option is supplied.
  • This does not change the result schema because DBConfig.note already exists.
  • Backend connection behavior is unchanged: provider clients receive their existing explicit DBConfig.to_dict() connection fields, not the note metadata.

Verification

  • make lint
  • make unittest — 1 passed
  • python -m pytest tests/test_cli_note.py -q — 7 passed
  • python -m pytest tests/test_milvus_zilliz_cli.py -q — 2 passed
  • Verified --note and --note-file help output for Zilliz Cloud and Pinecone commands.

Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
@sre-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jamesgao-jpg
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
@jamesgao-jpg
jamesgao-jpg requested a review from XuanYang-cn July 16, 2026 08:35
Comment thread vectordb_bench/cli/cli.py


def resolve_db_note(note: str, note_file: Path | None) -> str:
if note and note_file is not None:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

3 participants