Skip to content

feat(target): Turn drain_one into a async method #2289

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BuzzCutNorman
Copy link
Contributor

@BuzzCutNorman BuzzCutNorman commented Mar 7, 2024

This PR proposes adding the asyncio module to the target base. Change drain_one into an async method and call it via asyncio.run. The thought is drain_one spends alot of time on io tasks and the use of asyncio will free up some of that time.

I don't know how to resolve the pytest errors of:

pytest.PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object Target.drain_one 

Any guidance or assistance on how best to resolve these error is much appreciated.


📚 Documentation preview 📚: https://meltano-sdk--2289.org.readthedocs.build/en/2289/

Copy link

codspeed-hq bot commented Mar 7, 2024

CodSpeed Performance Report

Merging #2289 will not alter performance

Comparing BuzzCutNorman:feat-target-asyncio-drain-one (e89c328) with main (26021c1)

Summary

✅ 6 untouched benchmarks

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.65%. Comparing base (26021c1) to head (e89c328).
Report is 519 commits behind head on main.

Files with missing lines Patch % Lines
singer_sdk/target_base.py 75.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (75.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2289      +/-   ##
==========================================
- Coverage   88.76%   88.65%   -0.11%     
==========================================
  Files          54       54              
  Lines        4769     4770       +1     
  Branches      928      928              
==========================================
- Hits         4233     4229       -4     
- Misses        374      377       +3     
- Partials      162      164       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

stale bot commented Apr 4, 2025

This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen label, or request that it be added.

@stale stale bot added the stale label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants