amoghrajesh commented on code in PR #67842:
URL: https://github.com/apache/airflow/pull/67842#discussion_r3338719398
##########
task-sdk/src/airflow/sdk/execution_time/context.py:
##########
@@ -550,6 +552,9 @@ def set(self, key: str, value: JsonValue, *, retention:
timedelta | None = None)
from airflow.sdk.execution_time.comms import SetTaskState
from airflow.sdk.execution_time.task_runner import SUPERVISOR_COMMS
+ if value is None:
+ raise ValueError("Cannot set value as None")
Review Comment:
Good catch. The break was not intended.
Fixed it by adding None check on external_id. A None return is now treated
as "no ID available" and skips the write, preserving the older behaviour. Also
added a test for this, and updated the submit_job docstring to document that
None means the ID won't be persisted.
--
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]