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 macro depends_on recursion error when macros call themselves (dbt…utils.datediff) #3454

Merged
merged 1 commit into from
Jun 11, 2021

Conversation

gshank
Copy link
Contributor

@gshank gshank commented Jun 10, 2021

resolves #3444

Description

The dbt_utils postgres datediff macro calls back to the base dbt_utils datediff macro. This caused infinite recursion in the code that gathers up all of the dependent macros for tests. To fix it we check to see if a macro has already been added to the list of dependent macros and skip it.

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt next" section.

@cla-bot cla-bot bot added the cla:yes label Jun 10, 2021
@gshank gshank force-pushed the adapter_dispatch_infinite_recursion branch from 5185823 to 99625c1 Compare June 10, 2021 23:15
@gshank gshank temporarily deployed to Postgres June 10, 2021 23:23 Inactive
@gshank gshank temporarily deployed to Bigquery June 10, 2021 23:23 Inactive
@gshank gshank temporarily deployed to Bigquery June 10, 2021 23:23 Inactive
@gshank gshank temporarily deployed to Redshift June 10, 2021 23:23 Inactive
@gshank gshank temporarily deployed to Redshift June 10, 2021 23:23 Inactive
@gshank gshank force-pushed the adapter_dispatch_infinite_recursion branch from 99625c1 to af0fe12 Compare June 11, 2021 14:28
@gshank gshank temporarily deployed to Postgres June 11, 2021 14:33 Inactive
@gshank gshank temporarily deployed to Redshift June 11, 2021 14:33 Inactive
@gshank gshank temporarily deployed to Redshift June 11, 2021 14:33 Inactive
@gshank gshank temporarily deployed to Bigquery June 11, 2021 14:33 Inactive
@gshank gshank temporarily deployed to Bigquery June 11, 2021 14:34 Inactive
@gshank gshank merged commit 14507a2 into develop Jun 11, 2021
@gshank gshank deleted the adapter_dispatch_infinite_recursion branch June 11, 2021 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dbt=0.20.0-rc1 on postgres throws "maximum recursion depth exceeded while calling a Python object" error
2 participants