-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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] Partial parsing occasionally causes jobs to error out #9616
Comments
Thanks for reporting this @sophiad96 ! The crucial thing will be to come up with a reproducible example so we'll know if it's fixed or not. Here's the steps that were reported in #8775:
Do you think something similar would explain what the customer experienced? If so, could you try tweaking the steps above and see if you can reproduce the error? |
@dbeatty10 Sorry, I should have provided more clarity here! I think it's important to note that, while in this case the error message that dbt returned did point to the macro, the other instance where I've seen this happen (disabling partial parsing resulted in a successful job run) did not return an error message pertaining to a macro, but rather a message about an alias that had been added to a model config months beforehand. So I feel like while related, this is a different issue. I'm still waiting on confirmation from the customer, but I'm fairly certain they never had two macros by the same name in their project. |
@sophiad96 The following reproduction case looks like it gives the same error message that you saw with the customer. Could you check if they use a YAML file to document their macros? And check if it was changed recently prior to them receiving the error message? ReprexClear out the rm -rf target
mkdir -p macros Create a Jinja-SQL file and a YAML file in your cat << EOF > macros/macros.sql
{% macro blue() %}
{{ log("My favorite color is: blue", true) }}
{% endmacro %}
{% macro green(column_name, scale=2) %}
{{ log("My favorite color is: green", true) }}
{% endmacro %}
EOF cat << EOF > macros/macros.yml
macros:
- name: blue
description: My favorite color is blue
- name: green
description: My favorite color is green
EOF Parse the project (which should succeed): dbt parse Make a change to the YAML file: cat << EOF > macros/macros.yml
macros:
- name: blue
description: My favorite color is blue
- name: green
description: My favorite color is (not actually) green
EOF Try parsing again (which fails, unfortunately): dbt parse Output:
But disabling partial parsing works: dbt parse --no-partial-parse |
@dbeatty10 sorry for missing this!! It does look like all of their macros (they have a lot) are documented in YAML. The macro in the example (dropDatasets.sql) was changed right before they experienced this. I've reached out to the customer for details on what changes were made specifically and will follow up when I hear back. |
No prob @sophiad96 ! If it ends up being the same thing, then we'll close this particular report as a duplicate of #4233 and #8775. |
@dbeatty10 unfortunately the customer doe not remember what changes were made to the macro beforehand. |
Thanks for trying @sophiad96 ! From the information we have, this looks the same as #4233 (and #8775). So I'm going to close this one as a duplicate. If we end up determining that it is unique, we'll re-open this one (or open a fresh one). |
Is this a new bug in dbt-core?
Current Behavior
When a customer has “enable partial parsing between deployment runs” enabled in their account settings for their jobs, some jobs will error out with a message that points to a node that had changes made to it recently. However, the job should not be erroring out and the issue is rectified by disabling partial parsing and running the job again (which results in a successful run).
In this specific instance, two jobs in the customer's project errored out, stating that two macros named “dropDataset” were found. Zendesk ticket: https://dbtcloud.zendesk.com/agent/tickets/61977
Similar issues have been reported in another ticket where the removal of a test config from a model caused the job to begin erroring out. Disabling partial parsing resolved the issue: https://dbtcloud.zendesk.com/agent/tickets/60694
Expected Behavior
Because there was only one macro by this name in their project, these jobs should have both succeeded without the user needing to manually disable partial parsing for jobs.
Steps To Reproduce
Have not been able to reproduce yet.
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
No response
Additional Context
Example run: https://dbtlabsmt.datadoghq.com/logs?query=service%3Ascheduler-run%20%40extra.run_id%3A254481367%20&cols=host%2Cservice&fromUser=true&index=%2A&messageDisplay=inline&refresh_mode=paused&stream_sort=desc&viz=stream&from_ts=1708498959395&to_ts=1708531778000&live=false
Compilation error for above run: https://dbtlabsmt.datadoghq.com/logs?query=service%3Ascheduler-run%20%40extra.run_id%3A254481367%20&cols=host%2Cservice&event=AgAAAY3L9FnDppjrPwAAAAAAAAAYAAAAAEFZM0w5R2lBQUFBbUc3MGdPOGxGbndBQwAAACQAAAAAMDE4ZGNiZjUtZGI5OC00MzJkLThiOWUtZDU5MmY1MzY5M2U1&fromUser=true&index=%2A&messageDisplay=inline&refresh_mode=paused&stream_sort=desc&viz=stream&from_ts=1708498959395&to_ts=1708531778000&live=false
Other occurrences: https://dbtlabsmt.datadoghq.com/logs?query=service%3Ascheduler-run%20%22dbt%20found%20two%20macros%22%20&cols=host%2Cservice&fromUser=true&index=%2A&messageDisplay=inline&refresh_mode=sliding&stream_sort=desc&viz=stream&from_ts=1707236315915&to_ts=1708532315915&live=true
The text was updated successfully, but these errors were encountered: