kaxil commented on code in PR #74421:
URL: https://github.com/apache/airflow/pull/74421#discussion_r4353639928


##########
task-sdk/src/airflow/sdk/execution_time/context.py:
##########
@@ -809,14 +803,15 @@ def _build_set_message(
                 )
             expires_at = None if days == 0 else now + timedelta(days=days)
 
-        # if custom backend is configured, store the value on the custom 
backend, and return the reference
-        # to the stored value to store in the DB
+        # if a custom backend is configured, it may store the value externally 
and return a reference to keep
+        # in the DB, or return None to keep the value inline
         backend = _get_worker_state_store_backend()
         stored: JsonValue = value
         if backend is not None:
-            ref: str = backend.serialize_task_state_store_to_ref(value=value, 
key=key, scope=self._scope)
-            # wrap the value with a marker to indicate that it's stored 
externally, and include the ref to the external storage
-            stored = _wrap_external_ref(ref)
+            ref = backend.serialize_task_state_store_to_ref(value=value, 
key=key, scope=self._scope)
+            if ref is not None:

Review Comment:
   Good catch, `get()` now checks `is not None` too, with a test for an empty 
reference.



-- 
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]

Reply via email to