-
Notifications
You must be signed in to change notification settings - Fork 25
fix: Sourcer - Change pending/partitions handlers of Source to async #301
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
Conversation
Signed-off-by: Sreekanth <prsreekanth920@gmail.com>
|
Shouldn't we make them (pending and partitions) async? |
Ideally, yes. It will be an API change. Also, the tests like |
|
+1 let's keep them async for consistency |
Signed-off-by: Sreekanth <prsreekanth920@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #301 +/- ##
==========================================
- Coverage 93.85% 93.77% -0.08%
==========================================
Files 66 66
Lines 3009 3053 +44
Branches 155 156 +1
==========================================
+ Hits 2824 2863 +39
- Misses 135 143 +8
+ Partials 50 47 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| _LOGGER.critical("PendingFn Error", exc_info=True) | ||
| await handle_async_error(context, err, ERR_UDF_EXCEPTION_STRING) | ||
| return | ||
| raise |
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.
| raise |
handle_async_error will pkill, i don't think you need return or raise
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 replaced return with the raise statement to fix the type checker. Does the SIGKILL work synchronously ? Or should we keep the raise (or raise SystemExit()) to ensure next line is not executed. The library has a wait() method, but looks like it only applies to SIGTERM https://psutil.readthedocs.io/en/latest/index.html#psutil.Process.wait
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.
the wait made it hang
Signed-off-by: Vigith Maurice <vigith@gmail.com>
Signed-off-by: Vigith Maurice <vigith@gmail.com>
The
pending/partitionmethods are not defined asasyncin our abstract classnumaflow-python/packages/pynumaflow/pynumaflow/sourcer/_dtypes.py
Lines 295 to 306 in 5500636
Also, there is no
handler()method on theSourcerabstract class.Implementation:
Seeing error: