fix: Sourcer - Change pending/partitions handlers of Source to async#301
fix: Sourcer - Change pending/partitions handlers of Source to async#301
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.
| raise |
handle_async_error will pkill, i don't think you need return or raise
There was a problem hiding this comment.
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
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: