justinpakzad commented on code in PR #59874:
URL: https://github.com/apache/airflow/pull/59874#discussion_r2676385413
##########
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:
Because the `has_xcom_access` function expects xcom_key to be a path
parameter: `xcom_key: Annotated[str, Path(alias="key", min_length=1)]` and
`task_id` to have a value. This wouldn't work for bulk deleting xcoms (even if
it was a separate endpoint) because it's applied at the router level. We could
just change them to both be optional, but then that would apply to all the
other endpoints even though they are actually required for those endpoints. We
might need a separate dependency to handle the has access for bulk deletion or
find a way to conform the current one so it works for all. Feel free to correct
me if I'm mistaken or you know of a better way.
--
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]