-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CT-1947] Alias --models
to --select
for all commands except dbt ls
#6787
Conversation
Crazy to think that a few line changes have allowed nearly 100(!) additional tests to pass. Before: 134 failed, 444 passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
# See https://github.com/dbt-labs/dbt-core/pull/6774#issuecomment-1408476095 for more info. | ||
models = click.option(*model_decls, **select_attrs) | ||
raw_select = click.option(*select_decls, **select_attrs) | ||
select = click.option(*select_decls, *model_decls, **select_attrs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this is simpler code but slightly harder to read compared to just write the options here.
Did some manual testing by locally overwriting a command that accepts the new The options are not treated as mutually exclusive via MultiOption and the resulting
This was unexpected behaviour to me, but for better or for worse this is also how main's parsing currently works (printing args.select and exiting on main to test):
We should probably open an issue to document this behaviour and investigate a fix that gets us --select/--model option mutual exclusivity if possible. But given that it's the current behaviour on main I don't see it as pressing to fix as part of this PR. |
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
resolves #6782
Description
Checklist
changie new
to create a changelog entry