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

[Bug] Unable to parse dict error in logs if email property on a group is not specified #10745

Closed
2 tasks done
aranke opened this issue Sep 19, 2024 · 2 comments
Closed
2 tasks done
Assignees
Labels
bug Something isn't working High Severity bug with significant impact that should be resolved in a reasonable timeframe Impact: Orch

Comments

@aranke
Copy link
Member

aranke commented Sep 19, 2024

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

We see a log error (attached) if:

  1. If the email property on a group is not specified
  2. If a generic test attached to a model that belongs to a group such as in 1 fails or warns.

Expected Behavior

The log error should not be present, since groups don't require both name and email per docs: https://docs.getdbt.com/docs/build/groups#declaring-a-group

Steps To Reproduce

❯ git diff
diff --git a/models/customers.sql b/models/customers.sql
index 016a004..ccfa4c6 100644
--- a/models/customers.sql
+++ b/models/customers.sql
@@ -1,3 +1,5 @@
+{{ config(group = 'finance') }}
+
 with customers as (
 
     select * from {{ ref('stg_customers') }}
diff --git a/models/schema.yml b/models/schema.yml
index 381349c..de0d296 100644
--- a/models/schema.yml
+++ b/models/schema.yml
@@ -1,5 +1,12 @@
 version: 2
 
+groups:
+  - name: finance
+    owner:
+      name: finance
+      slack: finance-data
+      github: finance-data-team
+
 models:
   - name: customers
     description: This table has basic information about a customer, as well as some derived facts based on a customer's orders
@@ -10,6 +17,8 @@ models:
         tests:
           - unique
           - not_null
+          - accepted_values:
+                values: [1, 2]
 
       - name: first_name
         description: Customer's first name. PII.
dbt --debug build

Relevant log output

19:29:37  Completed with 1 error and 0 warnings:
19:29:37  
19:29:37  [RunResultFailure]: Unable to parse dict {'resource_type': <NodeType.Test: 'test'>, 'node_name': 'accepted_values_customers_customer_id__1__2', 'path': 'models/schema.yml', 'node_info': {'node_path': 'accepted_values_customers_customer_id__1__2.sql', 'node_name': 'accepted_values_customers_customer_id__1__2', 'unique_id': 'test.jaffle_shop.accepted_values_customers_customer_id__1__2.ce4cfb337b', 'resource_type': 'test', 'materialized': 'test', 'node_status': 'None', 'node_started_at': None, 'node_finished_at': None, 'meta': {}, 'node_relation': {'database': 'jaffle_shop', 'schema': 'main_dbt_test__audit', 'alias': 'accepted_values_customers_customer_id__1__2', 'relation_name': None}}, 'group': {'name': 'finance', 'package_name': 'jaffle_shop', 'owner': {'email': None, 'name': 'finance', 'slack': 'finance-data', 'github': 'finance-data-team'}}}
19:29:37  Failure in   ()

Environment

  • OS: macOS Sonoma
  • Python: 3.12.2
  • dbt: main

Which database adapter are you using with dbt?

No response

Additional Context

This change was introduced in this PR: #10535

@aranke aranke added bug Something isn't working triage labels Sep 19, 2024
@dbeatty10 dbeatty10 removed the triage label Sep 19, 2024
@graciegoheen graciegoheen added High Severity bug with significant impact that should be resolved in a reasonable timeframe Impact: Orch labels Sep 23, 2024
@aranke aranke closed this as completed Sep 26, 2024
@amwidi77
Copy link

Thanks for working on the resolution! When should we expect to see the fix in dbt cloud versionless?

@amwidi77
Copy link

@aranke Thanks for working on the resolution! When should we expect to see the fix in dbt cloud? I am still seeing the issue in my dbt cloud instance. We are on versionless.

@aranke aranke reopened this Sep 30, 2024
@aranke aranke closed this as completed Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working High Severity bug with significant impact that should be resolved in a reasonable timeframe Impact: Orch
Projects
None yet
Development

No branches or pull requests

4 participants