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 1537 fix event test and rename a couple of fields #6293

Merged
merged 6 commits into from
Nov 22, 2022

Conversation

gshank
Copy link
Contributor

@gshank gshank commented Nov 18, 2022

resolves #6292

Description

The event unit test was broken and some of the tests weren't actually doing anything. This fixes that, removes the lists of events from the bottom of the types.py and test_types.py files and moves them into test_events.py test file. It also renames a few tests.

Checklist

@gshank gshank requested a review from a team as a code owner November 18, 2022 19:55
@gshank gshank requested a review from a team November 18, 2022 19:55
@gshank gshank requested review from a team as code owners November 18, 2022 19:55
@cla-bot cla-bot bot added the cla:yes label Nov 18, 2022
@gshank gshank added the Skip Changelog Skips GHA to check for changelog file label Nov 18, 2022
@github-actions
Copy link
Contributor

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.

@gshank gshank requested review from peterallenwebb and removed request for McKnight-42 November 18, 2022 19:57
Copy link
Member

@emmyoop emmyoop left a comment

Choose a reason for hiding this comment

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

One more rename and one question.

@@ -16,7 +16,7 @@
disallow_secret_env_var,
)
from dbt.events.functions import fire_event, get_invocation_id
from dbt.events.types import MacroEventInfo, MacroEventDebug
from dbt.events.types import JinjaLogInfo, JinjaLogDebug
Copy link
Member

@emmyoop emmyoop Nov 18, 2022

Choose a reason for hiding this comment

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

Along these same lines there's also a GeneralMacroWarning that is the catchall for warn defined in exceptions.py. It's worth renaming that along with these.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't look like it's actually used anywhere. Can we just remove it?

Copy link
Member

Choose a reason for hiding this comment

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

It's used within macros (docs)

Copy link
Contributor Author

@gshank gshank Nov 18, 2022

Choose a reason for hiding this comment

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

So it's exported into the context. So should we call it JinjaLogWarning?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or JinjaLogWarn?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went with JinjaLogWarning.

@@ -15,6 +15,7 @@ message EventInfo {
string thread = 7;
google.protobuf.Timestamp ts = 8;
map<string, string> extra = 9;
string category = 10;
Copy link
Member

Choose a reason for hiding this comment

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

Is this eventually going to be the log category? Am I missing how this gets populated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, right now it's just a placeholder. Eventually we'll populate it somehow...

Copy link
Member

Choose a reason for hiding this comment

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

Is there an issue so we don't lose the fact we still need to actually populate it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mostly it's your ticket #5958.

@gshank gshank requested a review from emmyoop November 21, 2022 18:13
Copy link
Member

@emmyoop emmyoop left a comment

Choose a reason for hiding this comment

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

Looks good.

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.

[CT-1537] Fix logging event test and rename a few fields
2 participants