-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 adapter reset race condition in lib.py #5921
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that at some point it would be good to have tests for lib.py. I'm not exactly sure what they'd look like though. I'm okay with doing that as a separate effort.
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.0.latest 1.0.latest
# Navigate to the new working tree
cd .worktrees/backport-1.0.latest
# Create a new branch
git switch --create backport-5921-to-1.0.latest
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4e8aa007cf17fff7605df1bb38eda2842dc9ba50
# Push it to GitHub
git push --set-upstream origin backport-5921-to-1.0.latest
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.0.latest Then, create a pull request where the |
resolves #5919
Description
This PR updates the
lib.py
file to avoid mutating global adapter state when generating a RuntimeConfig. This logic was once necessary in order to work around issues withdbt deps
, though it's fairly clear at this point that we'll need to employ a radically different approach for deps in the future (including higher-order, first-class APIs). In the meantime, this change fixes possible race conditions for concurrent callers ofget_dbt_config
Additional changes:
"name"
. The default value isquery
for backwards compatibility. Just added an optional arg for thisTODO:
lib.py
would be dope here)Checklist
changie new
to create a changelog entry