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

[BUGFIX] Resolve boto3 client threading issue #66

Merged
merged 2 commits into from
Mar 9, 2022

Conversation

DVerzal
Copy link
Contributor

@DVerzal DVerzal commented Mar 3, 2022

endpoint_resolver & credential_provider

Currently dbt-athena allows for multiple threads for computation. This is causing errors when generating multiple boto3.client calls simultaneously as it is not thread safe. In order to rectify this issue, we apply a thread lock in the adapter to temporarily lock the threads to allow for safe creation of each boto3 client. This addresses the endpoint_resolver and credential_provider issues many of us have been seeing frequently.

pytest adapter

I also updated the pytest-dbt-adapter version as 0.5.1 failed all tests. Bumping the version to 0.6.0 appears to work appropriately with dbt-core 1.0.3.

@DVerzal DVerzal marked this pull request as ready for review March 3, 2022 17:21
@Tomme Tomme merged commit 3a6250c into Tomme:master Mar 9, 2022
@Tomme
Copy link
Owner

Tomme commented Mar 9, 2022

🙏 Thank you!

@DVerzal DVerzal deleted the bugfix/41_boto3_thread_lock branch March 9, 2022 14:07
@DVerzal DVerzal restored the bugfix/41_boto3_thread_lock branch March 9, 2022 14:07
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 this pull request may close these issues.

Frequent nondeterministic errors in dbt run and dbt seed when using multiple threads
2 participants