This is an automated email from the ASF dual-hosted git repository.

kaxil pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 88dd697d543 Fix example_asset_store consumer crash and test comment 
typos (#67922)
88dd697d543 is described below

commit 88dd697d543e064a3ab93b9f4bd94fe72baeb4d5
Author: Kaxil Naik <[email protected]>
AuthorDate: Tue Jun 2 23:00:03 2026 +0100

    Fix example_asset_store consumer crash and test comment typos (#67922)
    
    Fallout from the task_state->task_store rename (#67833):
    
    - example_asset_store consume() fell back to the string "{}" when the
      asset had no last_run_summary yet, then called .get() on it, raising
      AttributeError. Fall back to an empty dict so .get() works.
    - A blind find-replace turned "statement(s)" into "Storement(s)" in two
      comments in test_context.py. Restored the original words.
---
 airflow-core/src/airflow/example_dags/example_asset_store.py | 2 +-
 task-sdk/tests/task_sdk/execution_time/test_context.py       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/airflow-core/src/airflow/example_dags/example_asset_store.py 
b/airflow-core/src/airflow/example_dags/example_asset_store.py
index 2045dfb242f..6e6d30e3501 100644
--- a/airflow-core/src/airflow/example_dags/example_asset_store.py
+++ b/airflow-core/src/airflow/example_dags/example_asset_store.py
@@ -87,7 +87,7 @@ with DAG(
     @task(inlets=[ORDERS])
     def consume(asset_store=None):
         state = asset_store[ORDERS]
-        summary = state.get("last_run_summary") or "{}"
+        summary = state.get("last_run_summary") or {}
         print(
             f"Processing {summary.get('rows_loaded', '?')} rows "
             f"up to watermark {state.get('watermark')}. "
diff --git a/task-sdk/tests/task_sdk/execution_time/test_context.py 
b/task-sdk/tests/task_sdk/execution_time/test_context.py
index 003173ef65f..2531d003cc0 100644
--- a/task-sdk/tests/task_sdk/execution_time/test_context.py
+++ b/task-sdk/tests/task_sdk/execution_time/test_context.py
@@ -387,7 +387,7 @@ class TestCurrentContext:
         for i in range(max_stack_depth):
             # Create all contexts in ascending order
             new_context = {"ContextId": i}
-            # Like 15 nested with Storements
+            # Like 15 nested with statements
             ctx_obj = set_current_context(new_context)
             ctx_obj.__enter__()
             ctx_list.append(ctx_obj)
@@ -395,7 +395,7 @@ class TestCurrentContext:
             # Iterate over contexts in reverse order - stack is LIFO
             ctx = get_current_context()
             assert ctx["ContextId"] == i
-            # End of with Storement
+            # End of with statement
             ctx_list[i].__exit__(None, None, None)
 
 

Reply via email to