Skip to content

Require metrics for metric-scoped list commands - #2110

Open
fanruan-tuco wants to merge 1 commit into
dbt-labs:mainfrom
fanruan-tuco:fix/require-metrics-for-entity-list
Open

Require metrics for metric-scoped list commands#2110
fanruan-tuco wants to merge 1 commit into
dbt-labs:mainfrom
fanruan-tuco:fix/require-metrics-for-entity-list

Conversation

@fanruan-tuco

Copy link
Copy Markdown

Summary

  • mark --metrics as required for mf list dimensions and mf list entities
  • replace the misleading all-object command descriptions with metric-scoped wording
  • add shared regression coverage for help output and missing-option errors
  • add a changelog entry for the CLI fix

Both commands already require at least one metric through SequenceParamType(min_length=1). Replacing the empty-string defaults with required=True makes the Click contract match the existing behavior and produces the standard missing-option error.

Testing

  • hatch run dev-env:pytest tests_dbt_metricflow/cli/test_cli.py (16 passed)
  • dbt-metricflow pre-commit: ruff, black, mypy, and file checks passed
  • changie batch --dry-run 999.999.999 passed

Fixes #2109

@fanruan-tuco
fanruan-tuco requested a review from a team as a code owner August 5, 2026 12:07
@cla-bot

cla-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @fanruan-tuco

@fanruan-tuco

Copy link
Copy Markdown
Author

CLA submitted.

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.

[Bug] Metric-scoped list commands do not mark --metrics as required

1 participant