Skip to content
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-2066] Handle old param/flag names in new CLI #6903

Closed
Tracked by #6706
jtcohen6 opened this issue Feb 8, 2023 · 4 comments · Fixed by #7175
Closed
Tracked by #6706

[CT-2066] Handle old param/flag names in new CLI #6903

jtcohen6 opened this issue Feb 8, 2023 · 4 comments · Fixed by #7175
Assignees
Labels

Comments

@jtcohen6
Copy link
Contributor

jtcohen6 commented Feb 8, 2023

We're renaming some flags to match the common naming convention:

  • no_printprint
  • flags.DEFER_MODE / (env var) DBT_DEFER_TO_STATEdefer
  • flags.FAVOR_STATE_MODEfavor_state
  • flags.ARTIFACT_STATE_PATH / (env var) DBT_ARTIFACT_STATE_PATHstate
  • (--single-threaded was renamed, but it's not something we publicly document, and it might only be relevant for dbt-rpc?)

Acceptance criteria: We continue to respect the old name:

  • respect the old name in env var
  • respect the old name in CLI flag
  • raise a deprecation warning encouraging them to switch over to the new name
  • have tests for each flag changed

I'm less concerned about the CLI flag, which raises a clear error already:

$ python3 -m dbt.cli.main --no-send-anonymous-usage-stats run
Usage: python -m dbt.cli.main [OPTIONS] COMMAND [ARGS]...
Try 'python -m dbt.cli.main -h' for help.

Error: No such option: --no-send-anonymous-usage-stats (Possible options: --anonymous-usage-stats, --no-anonymous-usage-stats)
@github-actions github-actions bot changed the title Handle old param/flag names in new CLI [CT-2066] Handle old param/flag names in new CLI Feb 8, 2023
@jtcohen6 jtcohen6 added the cli label Feb 8, 2023
@stu-k
Copy link
Contributor

stu-k commented Feb 20, 2023

After speaking with @iknox-fa, we can keep the send_anonymous_usage_stats as is, as it conforms with existing naming of params. I will edit the issue description to remove this change, and any mentions of the UserConfig, as this was the only env var held in UserConfig.

@jtcohen6
Copy link
Contributor Author

jtcohen6 commented Feb 20, 2023

@stu-k The no_printprint rename should also be relevant for UserConfig, since this is in the same category of "global config" that's settable in three places (CLI flag, env var, user config): https://docs.getdbt.com/reference/global-configs#suppress-print-messages-in-stdout

I see it's actually missing from the class here! That's an oversight, and speaks to the way that the definition and initialization of these configs have been poorly coordinated to date.

Not very high priority, so I'd be open to discussing kicking it out of scope — just want to make sure we're aligned on the functionality that's documented / expected.

@stu-k
Copy link
Contributor

stu-k commented Feb 23, 2023

@jtcohen6 This work is currently turning out large enough that I'd rather keep that out of scope for now.

@jtcohen6
Copy link
Contributor Author

@stu-k Opened as a new ticket: #7036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants