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

Fix test_builtin_invocation_args_dict_function #6898

Conversation

jtcohen6
Copy link
Contributor

@jtcohen6 jtcohen6 commented Feb 8, 2023

resolves [no issue]

Description

Fix test_builtin_invocation_args_dict_function. There are a few changes in v1.5 (all reasonable) that we'll want to clearly call out for end users. I'll leave comments below.

Checklist

@jtcohen6 jtcohen6 added the Skip Changelog Skips GHA to check for changelog file label Feb 8, 2023
@jtcohen6 jtcohen6 requested a review from a team as a code owner February 8, 2023 13:38
@jtcohen6 jtcohen6 requested review from Fleid and aranke February 8, 2023 13:38
@cla-bot cla-bot bot added the cla:yes label Feb 8, 2023
@iknox-fa iknox-fa requested a review from a team February 8, 2023 22:48
@iknox-fa iknox-fa requested a review from a team as a code owner February 8, 2023 22:48
@iknox-fa iknox-fa requested a review from gshank February 8, 2023 22:48
anonymous_usage_stats = click.option(
"--anonymous-usage-stats/--no-anonymous-usage-stats",
envvar="DBT_ANONYMOUS_USAGE_STATS",
# TODO: Rename this to meet naming conventions (the word "send" is redundant)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 Tracking this in #6903

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, it turns out renaming a symbol in some places and not others is confusing AF. Might as well do it all at once since it's going to require changes in a medium sized pile of tests that have a manually set value for send stats (not sure why, most of them have nothing to do with tracking).
/shrug

@@ -45,25 +45,54 @@ def test_log_path_default(self, run_context):
assert getattr(flags, "LOG_PATH") == "logs"

@pytest.mark.parametrize(
"do_not_track,expected_anonymous_usage_stats",
"set_stats_param,do_not_track,expected_anonymous_usage_stats",
Copy link
Contributor

Choose a reason for hiding this comment

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

@MichelleArk
Hilariously the tests were still passing because they were just testing that DO_NOT_TRACK was honored but since boolean logic is easy to get wrong, especially when renaming things I expanded the test matrix a bit. :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you!! Looks great.

Copy link
Member

@aranke aranke left a comment

Choose a reason for hiding this comment

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

LGTM, 1 nit.

@@ -61,7 +64,11 @@ def parse_json_logs(json_log_output):

def find_result_in_parsed_logs(parsed_logs, result_name):
return next(
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Can we rewrite this as a loop instead?

@iknox-fa iknox-fa merged commit db2b120 into feature/click-cli Feb 9, 2023
@iknox-fa iknox-fa deleted the jerco/fix-test_builtin_invocation_args_dict_function branch February 9, 2023 15:53
@aranke aranke mentioned this pull request Feb 9, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants