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


##########
task-sdk/tests/task_sdk/execution_time/test_context.py:
##########
@@ -2272,6 +2354,48 @@ def 
test_get_with_custom_backend_removes_decoration_marker(self, mock_supervisor
             "s3://bucket/assets/orders/watermark"
         )
 
+    def test_set_with_custom_backend_returning_none_stores_value_inline(self, 
mock_supervisor_comms):
+        """A backend that returns None keeps the value inline, with no marker 
around it."""
+        mock_supervisor_comms.send.return_value = OKResponse(ok=True)
+
+        backend = MagicMock(spec=BaseStoreBackend)
+        backend.serialize_asset_state_store_to_ref.return_value = None
+
+        with patch(
+            
"airflow.sdk.execution_time.context._get_worker_state_store_backend", 
return_value=backend
+        ):
+            AssetStateStoreAccessor(name=self.ASSET_NAME).set("watermark", 
"2026-05-01")
+
+        mock_supervisor_comms.send.assert_called_once_with(
+            SetAssetStateStoreByName(name=self.ASSET_NAME, key="watermark", 
value="2026-05-01")
+        )
+
+    def 
test_get_with_custom_backend_returns_unmarked_value_without_deserializing(

Review Comment:
   Same, switched to `cap_structlog`.



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