arjav1528 commented on PR #60161:
URL: https://github.com/apache/airflow/pull/60161#issuecomment-3746798692

   > I just double checked the whole logic and what current feature required.
   > 
   > It seem we could just leverage the existed `def patch_task_instance`(
   > 
   > 
https://github.com/apache/airflow/blob/26a9d3b81b1d514ac00476885ba29676cd8f27e6/airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py#L953-L954
   > 
   > ) and `def patch_task_instance_dry_run` routes (
   > 
https://github.com/apache/airflow/blob/26a9d3b81b1d514ac00476885ba29676cd8f27e6/airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py#L870-L871
   > 
   > ), instead of having a whole new routes.
   > We just need to
   > 
   > 1. add the route definition `task_instances_prefix + "/{task_group_id}"`, 
`task_instances_prefix + "/{task_group_id}/dry_run"` decorator
   > 2. add the `task_group_id: str | None = None` like `map_index` here ( 
https://github.com/apache/airflow/blob/26a9d3b81b1d514ac00476885ba29676cd8f27e6/airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py#L961-L962
   >     )
   > 3. pass `task_group_id: str | None` as new parameter of 
`_patch_ti_validate_request`, and handle the fetching TaskInstances by task 
group name logic at the beginning of `_patch_ti_validate_request`.
   > 
   > Thanks!
   
   Ah, my bad — I completely overlooked the existing patch_task_instance and 
dry-run routes earlier. Thanks a lot for double-checking and pointing this out 
   Your approach of reusing the existing routes makes sense. I’ll update the 
implementation accordingly.


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