amoghrajesh commented on code in PR #46020:
URL: https://github.com/apache/airflow/pull/46020#discussion_r1935076241
##########
task_sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -501,6 +503,22 @@ def run(ti: RuntimeTaskInstance, log: Logger):
# TODO: Get a real context object
ti.hostname = get_hostname()
ti.task = ti.task.prepare_for_execution()
+ if ti.task.inlets or ti.task.outlets:
+ inlets = [
+ AssetProfile(name=x.name or None, uri=x.uri or None,
asset_type=Asset.__name__)
+ for x in ti.task.inlets
+ if isinstance(x, Asset)
+ ]
+ outlets = [
+ AssetProfile(name=x.name or None, uri=x.uri or None,
asset_type=Asset.__name__)
+ for x in ti.task.outlets
+ if isinstance(x, Asset)
+ ]
+ SUPERVISOR_COMMS.send_request(msg=RuntimeCheckOnTask(inlet=inlets,
outlet=outlets), log=log) # type: ignore
+ msg = SUPERVISOR_COMMS.get_message() # type: ignore
+ if isinstance(msg, OKResponse) and not msg.ok:
+ log.info("Runtime checks failed for task, marking task as
failed..")
+ return
Review Comment:
Resolving with above explanation, let me know if its not clear, can reopen.
--
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]