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

Allow timeout for async DoFn #5534

Merged
merged 3 commits into from
Dec 16, 2024
Merged

Allow timeout for async DoFn #5534

merged 3 commits into from
Dec 16, 2024

Conversation

RustedBones
Copy link
Contributor

Fix #4040

Should we set a sane timeout default ?

Add unit testing

Fit unit testing

Make sure callback is completed

Remove old branch relicate
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.43%. Comparing base (cc1e584) to head (5fc89ca).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5534   +/-   ##
=======================================
  Coverage   61.42%   61.43%           
=======================================
  Files         312      312           
  Lines       11104    11106    +2     
  Branches      757      750    -7     
=======================================
+ Hits         6821     6823    +2     
  Misses       4283     4283           

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

@@ -66,21 +68,26 @@ object BigtableDoFnTest {
val queue: ConcurrentLinkedQueue[Int] = new ConcurrentLinkedQueue[Int]()
}

class TestBigtableDoFn extends BigtableDoFn[Int, String](null) {
class TestBigtableDoFn extends BigtableDoFn[Int, String](BigtableOptions.getDefaultOptions) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to have these BT changes here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in BT, the timeout is taken from the settings now, we can't pass null.

@kellen
Copy link
Contributor

kellen commented Dec 11, 2024

+1 for a sane default

Copy link
Contributor

@kellen kellen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@RustedBones RustedBones merged commit 4d701c1 into main Dec 16, 2024
12 checks passed
@RustedBones RustedBones deleted the async-do-fn-timeout branch December 16, 2024 08:12
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.

Support Future timeouts in AsyncLookupDoFn?
2 participants