justinpakzad commented on code in PR #59874:
URL: https://github.com/apache/airflow/pull/59874#discussion_r2881463063


##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/xcoms.py:
##########
@@ -66,7 +66,6 @@ async def has_xcom_access(
         status.HTTP_403_FORBIDDEN: {"description": "Task does not have access 
to the XCom"},
         status.HTTP_404_NOT_FOUND: {"description": "XCom not found"},
     },
-    dependencies=[Depends(has_xcom_access)],

Review Comment:
   Yea, so it works as a dependency on the router when I change the function to 
be like:
   ```
   async def has_xcom_access(
       dag_id: str,
       run_id: str,
       request: Request,
       task_id: str | None = None,
       key: str | None = None,
       token=JWTBearerDep,
   ) -> bool:
   ```
   
   Basically need to remove `Annotated[str, Path(alias="key", min_length=1)]` 
since Path params are always required and then `task_id` & `key` (changed the 
name to key so it's recognized) need to be made optional.



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