pierrejeambrun commented on code in PR #46018:
URL: https://github.com/apache/airflow/pull/46018#discussion_r1931888041
##########
airflow/ui/openapi-gen/requests/types.gen.ts:
##########
@@ -2159,6 +2158,28 @@ export type PostClearTaskInstancesData = {
export type PostClearTaskInstancesResponse = TaskInstanceCollectionResponse;
+export type PatchTaskInstanceDryRunData = {
+ dagId: string;
+ dagRunId: string;
+ mapIndex: number;
+ requestBody: PatchTaskInstanceBody;
+ taskId: string;
+ updateMask?: Array<string> | null;
+};
+
+export type PatchTaskInstanceDryRunResponse = TaskInstanceCollectionResponse;
+
+export type PatchTaskInstanceDryRun1Data = {
Review Comment:
That's because we have two endpoints, the one for classic task instance, and
the one for 'mapped task' instance. For mapped task instance `map_index` is
required and in the path parameter.
For non mapped TI, `map_index` is optional in the query parameters and
defaulting to -1.
So the API is very flexible and we can call:
- PATH dag/<dag_id>/dagRuns/<dag_run/tasks/<task_id>/dry_run (map_index
defaults to -1)
- PATH
dag/<dag_id>/dagRuns/<dag_run/tasks/<task_id>/dry_run?map_index=<map_index>
(map_index is explicitely provided as a query parameter)
- PATH dag/<dag_id>/dagRuns/<dag_run/tasks/<task_id>/<map_index>/dry_run
(map_index is required) (that form is to comply with how legacy map_index are
passed usually, for instance to get tries, or setNote, dependencies, etc...)
Also both `@router.patch` are registered on 1 function (1 controller), so it
end ups conflicting in names and we endup with `PatchTaskInstanceDryRun1Data`
and `PatchTaskInstanceDryRunData` in the front-end. But we will most likely
only use 1.
--
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]