-
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
[#2990] Normalize global CLI args/flags #3839
Conversation
Removed: strict, use_cache, test_new_parser. Added command line argument before subcommands: --no-version-check, --fail-fast, --profiles_dir. Global CLI flags: use_experimental_parser, debug, log_format, write_json, partial_parse, use_colors, send_anonymous_user_stats, no_version_checks, fail_fast, profiles_dir, printer_width. All environment variables start with DBT_, like DBT_PROFILES_DIR. |
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.
Really solid start! Excited to clean up our docs for this :)
FAIL_FAST = get_flag_value('FAIL_FAST', args, user_config) | ||
SEND_ANONYMOUS_USAGE_STATS = get_flag_value('SEND_ANONYMOUS_USAGE_STATS', args, user_config) | ||
PRINTER_WIDTH = get_flag_value('PRINTER_WIDTH', args, user_config) | ||
|
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.
Love how organized + centralized these all are now
2956b6a
to
f48faa0
Compare
36350bb
to
1339ef6
Compare
I've merged the flags with the 'args' that show up in run_results.json. I removed the 'profiles_dir' attribute from UserConfig. Switched to using flags.VERSION_CHECK instead of args. etc etc. Going to review the flags to make sure they're all actually being used and that there are tests, but hopefully functionality is done. |
999bf10
to
99a3b99
Compare
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.
Oh wow. I didn't realize these were so all over the place. Looks like a solid improvement to me.
e1db970
to
cde2f87
Compare
cde2f87
to
779c789
Compare
resolves #2990
Description
Make global CLI arguments/flags consistent by allowing them to be set 1) as a command line argument (before subcommands), 2) as an environment variable 3) in the config part of the profile.
Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.