amoghrajesh commented on code in PR #76376:
URL: https://github.com/apache/airflow/pull/76376#discussion_r4463804735


##########
airflow-core/src/airflow/api_fastapi/execution_api/security.py:
##########
@@ -145,18 +145,28 @@
 _IN_PROCESS_NON_TI_CALLER = "airflow_in_process_non_ti_caller"
 _IN_PROCESS_TRIGGERER_ID = "airflow_in_process_triggerer_id"
 _SKIP_AUTO_TI_ATTEMPT_LIVE = "skip_auto_ti_attempt_live"
+_ALLOW_ASSET_WATCHER = "allow_asset_watcher"
 _P = ParamSpec("_P")
 _R = TypeVar("_R")
 
 JOB_UNCHECKED_SCOPE = "job:unchecked"
 
+# Token subject of an asset watcher, which has no task instance behind it.
+ASSET_WATCHER_ID = UUID(int=0)

Review Comment:
   `airflow-core/src/airflow/api_fastapi/execution_api/in_process.py:73` still 
spells the null UUID as a string literal. `ASSET_WATCHER_ID` is now the source 
of truth, so the two can drift. Use `str(ASSET_WATCHER_ID)` there.



##########
airflow-core/tests/unit/api_fastapi/execution_api/test_security.py:
##########
@@ -1116,6 +1117,18 @@ def test_unknown_execution_identity_cannot_write(self, 
client, caller):
         finally:
             Variable.delete(key)
 
+    def test_asset_watcher_identity_only_writes_asset_state(self, client, 
caller):

Review Comment:
   Does opposite of https://github.com/apache/airflow/pull/76375, so maybe lets 
merge that one first



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