jedcunningham commented on code in PR #40441:
URL: https://github.com/apache/airflow/pull/40441#discussion_r1673077090
##########
airflow/api_connexion/openapi/v1.yaml:
##########
@@ -1720,6 +1720,65 @@ paths:
"404":
$ref: "#/components/responses/NotFound"
+
/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/tries/{task_try_number}:
+ get:
+ summary: get taskinstance try
+ description: |
+ Get details of a task instance try.
+
+ *New in version 2.10.0*
+ x-openapi-router-controller:
airflow.api_connexion.endpoints.task_instance_endpoint
+ operationId: get_task_instance_try_details
+ tags: [TaskInstance]
+ parameters:
+ - $ref: "#/components/parameters/DAGID"
+ - $ref: "#/components/parameters/DAGRunID"
+ - $ref: "#/components/parameters/TaskID"
+ - $ref: "#/components/parameters/TaskTryNumber"
+ responses:
+ "200":
+ description: Success.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/TaskInstance"
+ "401":
+ $ref: "#/components/responses/Unauthenticated"
+ "403":
+ $ref: "#/components/responses/PermissionDenied"
+ "404":
+ $ref: "#/components/responses/NotFound"
+
+
/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/tries/{task_try_number}/{map_index}:
Review Comment:
Not sure I follow what you mean. Here are the existing endpoints:
```
get: /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}
get mapped:
/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/{map_index}
```
With my proposed change, you'd just add the `/tries/{try_number}` to those
above:
```
history:
/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/tries/{task_try_number}
history mapped:
/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/{map_index}/tries/{task_try_number}
```
What I like about this is:
- It keeps the PK of the TI together, vs putting the try number in the middle
- You're just adding more to the path for getting try details, vs having a
different path altogether
--
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]