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] Fix unset_contextvars to unset the right contextvars #82

Closed
gshank opened this issue Feb 22, 2024 · 0 comments · Fixed by #83
Closed

[Bug] Fix unset_contextvars to unset the right contextvars #82

gshank opened this issue Feb 22, 2024 · 0 comments · Fixed by #83

Comments

@gshank
Copy link
Contributor

gshank commented Feb 22, 2024

Description

This comes from #dbt-core/8866, an error in the logs in which the Hook node_info persists into the next dbtRunner call. This was happening for two reasons: 1) we were not using the log_contextvars context manager in task/run.py so the node_info was not getting reset at the end of run_hook and 2) the unset_contextvars functions was not working correctly. The fix in this PR is to fix unset_contextvars.

Solution

Properly construct the prefix_key to unset the contextvars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant