seanghaeli commented on code in PR #66608:
URL: https://github.com/apache/airflow/pull/66608#discussion_r3325987951
##########
task-sdk/src/airflow/sdk/execution_time/callback_supervisor.py:
##########
@@ -305,6 +327,50 @@ def _handle_request(self, msg: CallbackToSupervisor, log:
FilteringBoundLogger,
self.send_msg(resp, request_id=req_id, error=None, **dump_opts)
+def _register_unusual_prefix_module(callback_path: str, bundle_path, _log) ->
None:
Review Comment:
Extracted a shared helper `_load_mangled_module(mod_name, file_path, log) ->
bool` in `callback_supervisor.py` that owns the `SourceFileLoader` dance. Both
`_register_unusual_prefix_module` (executor) and
`_ensure_bundle_module_registered` (triggerer) now delegate to it — no
duplication. Also added tests covering successful load, missing file, syntax
error with sys.modules cleanup, idempotency on second call, graceful
degradation when no bundle matches, and noop for non-mangled paths.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]