uranusjr commented on code in PR #58102:
URL: https://github.com/apache/airflow/pull/58102#discussion_r2521883514
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:
##########
@@ -891,9 +891,26 @@ def bulk_task_instances(
) -> BulkResponse:
"""Bulk update, and delete task instances."""
return BulkTaskInstanceService(
- session=session, request=request, dag_id=dag_id,
dag_run_id=dag_run_id, dag_bag=dag_bag, user=user
+ session=session, request=request, dag_id=dag_id,
dag_run_id=dag_run_id, dag_bag=dag_bag, user=user, commit=True,
).handle_request()
+@task_instances_router.patch(
+ task_instances_prefix + "/dry_run",
+ dependencies=[Depends(requires_access_dag(method="PUT",
access_entity=DagAccessEntity.TASK_INSTANCE))],
+)
Review Comment:
We currently have two patterns to do dry-run. Some endpoints have a separate
endpoint with a `dry_run` suffix (like this), while others reuse the same
endpoint but ask for a `dry_run=true` flag in the request body. I feel we
should unify all to use the flag instead. Would that pattern be viable here?
--
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]