You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you dbt parse in a project with lots of tests on disabled resources (which is quite common for packages with conditionally enabled models), you'll immediately see a whole bunch of not-very-helpful warnings cluttering stdout:
$ dbt parse
13:24:39 Running with dbt=1.4.0-b1
13:24:39 Start parsing.
13:24:39 Dependencies loaded
13:24:39 Partial parse save file not found. Starting full parse.
13:24:39 ManifestLoader created
...
13:24:58 [WARNING]: Test 'test.microsoft_ads_source.unique_stg_microsoft_ads__account_history_account_version_id.e0ba88702d' (models/stg_microsoft_ads.yml) depends on a node named 'stg_microsoft_ads__account_history' which is disabled
13:24:58 [WARNING]: Test 'test.microsoft_ads_source.not_null_stg_microsoft_ads__account_history_account_version_id.2406ee6fb9' (models/stg_microsoft_ads.yml) depends on a node named 'stg_microsoft_ads__account_history' which is disabled
13:24:58 [WARNING]: Test 'test.microsoft_ads_source.unique_stg_microsoft_ads__ad_group_history_ad_group_version_id.37082929f6' (models/stg_microsoft_ads.yml) depends on a node named 'stg_microsoft_ads__ad_group_history' which is disabled
...
This is still true information, and worth logging, but only at a debug level.
Expected/Previous Behavior
This warning should be debug-level only
Steps To Reproduce
Create a project with a disabled model, and a test on that model
I realize that's inconsistent with other warnings, so it's worth us adding an annotation to call it out.
Actually, it even looks like we have some explicit logic to opt out this warning from the warn_or_error pattern. So it's really just a debug-level message that wants to have the [WARNING] prefix.
github-actionsbot
changed the title
[Regression] Warning for tests on disabled resources should be DebugLevel, not WarnLevel
[CT-1740] [Regression] Warning for tests on disabled resources should be DebugLevel, not WarnLevel
Jan 3, 2023
It looks like this is happening because we consolidated the InvalidRefInTestNode (a debug-level event) and InvalidDisabledSourceInTestNode (a warn-level event) into a single, new event called InvalidDisabledTargetInTestNode (warn-level). We could remedy the issue by changing the level of the new event to debug instead of warn, but that would mean we are making some events which were warn in 1.3 into debug in 1.4.
Is this a regression in a recent version of dbt-core?
Current Behavior
Reprise of #4594
If you
dbt parse
in a project with lots of tests on disabled resources (which is quite common for packages with conditionally enabled models), you'll immediately see a whole bunch of not-very-helpful warnings cluttering stdout:This is still true information, and worth logging, but only at a debug level.
Expected/Previous Behavior
This warning should be debug-level only
Steps To Reproduce
dbt parse
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
No response
Additional Context
The simplest fix for this is switching the
InvalidDisabledTargetInTestNode
event type fromWarnLevel
toDebugLevel
here:dbt-core/core/dbt/events/types.py
Line 1339 in 9ecb6e5
I realize that's inconsistent with other warnings, so it's worth us adding an annotation to call it out.
Actually, it even looks like we have some explicit logic to opt out this warning from the
warn_or_error
pattern. So it's really just a debug-level message that wants to have the[WARNING]
prefix.dbt-core/core/dbt/parser/manifest.py
Lines 965 to 988 in 9ecb6e5
The text was updated successfully, but these errors were encountered: