Skip to content

Commit 96812e6

Browse files
committed
Mark endpoint as experimental
1 parent 0f59bd9 commit 96812e6

File tree

8 files changed

+135
-17
lines changed

8 files changed

+135
-17
lines changed

airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,8 +2139,11 @@ paths:
21392139
get:
21402140
tags:
21412141
- DagRun
2142-
summary: Wait Dag Run Until Finished
2143-
description: Wait for a dag run until it finishes, and return its return value.
2142+
- experimental
2143+
summary: 'Experimental: Wait for a dag run to complete, and return task results
2144+
if requested.'
2145+
description: "\U0001F6A7 This is an experimental endpoint and may change or\
2146+
\ be removed without notice."
21442147
operationId: wait_dag_run_until_finished
21452148
security:
21462149
- OAuth2PasswordBearer: []

airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ def trigger_dag_run(
439439

440440
@dag_run_router.get(
441441
"/{dag_run_id}/wait",
442+
tags=["experimental"],
443+
summary="Experimental: Wait for a dag run to complete, and return task results if requested.",
444+
description="🚧 This is an experimental endpoint and may change or be removed without notice.",
442445
responses={
443446
**create_openapi_http_exception_doc([status.HTTP_404_NOT_FOUND]),
444447
status.HTTP_200_OK: {

airflow-core/src/airflow/ui/openapi-gen/queries/common.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// generated with @7nohe/openapi-react-query-codegen@1.6.2
22

33
import { UseQueryResult } from "@tanstack/react-query";
4-
import { AssetService, AuthLinksService, BackfillService, CalendarService, ConfigService, ConnectionService, DagParsingService, DagReportService, DagRunService, DagService, DagSourceService, DagStatsService, DagVersionService, DagWarningService, DashboardService, DependenciesService, EventLogService, ExtraLinksService, GridService, ImportErrorService, JobService, LoginService, MonitorService, PluginService, PoolService, ProviderService, StructureService, TaskInstanceService, TaskService, VariableService, VersionService, XcomService } from "../requests/services.gen";
4+
import { AssetService, AuthLinksService, BackfillService, CalendarService, ConfigService, ConnectionService, DagParsingService, DagReportService, DagRunService, DagService, DagSourceService, DagStatsService, DagVersionService, DagWarningService, DashboardService, DependenciesService, EventLogService, ExperimentalService, ExtraLinksService, GridService, ImportErrorService, JobService, LoginService, MonitorService, PluginService, PoolService, ProviderService, StructureService, TaskInstanceService, TaskService, VariableService, VersionService, XcomService } from "../requests/services.gen";
55
import { DagRunState, DagWarningType } from "../requests/types.gen";
66
export type AssetServiceGetAssetsDefaultResponse = Awaited<ReturnType<typeof AssetService.getAssets>>;
77
export type AssetServiceGetAssetsQueryResult<TData = AssetServiceGetAssetsDefaultResponse, TError = unknown> = UseQueryResult<TData, TError>;
@@ -167,6 +167,15 @@ export const UseDagRunServiceWaitDagRunUntilFinishedKeyFn = ({ collect, dagId, d
167167
dagRunId: string;
168168
interval: number;
169169
}, queryKey?: Array<unknown>) => [useDagRunServiceWaitDagRunUntilFinishedKey, ...(queryKey ?? [{ collect, dagId, dagRunId, interval }])];
170+
export type ExperimentalServiceWaitDagRunUntilFinishedDefaultResponse = Awaited<ReturnType<typeof ExperimentalService.waitDagRunUntilFinished>>;
171+
export type ExperimentalServiceWaitDagRunUntilFinishedQueryResult<TData = ExperimentalServiceWaitDagRunUntilFinishedDefaultResponse, TError = unknown> = UseQueryResult<TData, TError>;
172+
export const useExperimentalServiceWaitDagRunUntilFinishedKey = "ExperimentalServiceWaitDagRunUntilFinished";
173+
export const UseExperimentalServiceWaitDagRunUntilFinishedKeyFn = ({ collect, dagId, dagRunId, interval }: {
174+
collect?: string[];
175+
dagId: string;
176+
dagRunId: string;
177+
interval: number;
178+
}, queryKey?: Array<unknown>) => [useExperimentalServiceWaitDagRunUntilFinishedKey, ...(queryKey ?? [{ collect, dagId, dagRunId, interval }])];
170179
export type DagSourceServiceGetDagSourceDefaultResponse = Awaited<ReturnType<typeof DagSourceService.getDagSource>>;
171180
export type DagSourceServiceGetDagSourceQueryResult<TData = DagSourceServiceGetDagSourceDefaultResponse, TError = unknown> = UseQueryResult<TData, TError>;
172181
export const useDagSourceServiceGetDagSourceKey = "DagSourceServiceGetDagSource";

airflow-core/src/airflow/ui/openapi-gen/queries/ensureQueryData.ts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// generated with @7nohe/openapi-react-query-codegen@1.6.2
22

33
import { type QueryClient } from "@tanstack/react-query";
4-
import { AssetService, AuthLinksService, BackfillService, CalendarService, ConfigService, ConnectionService, DagReportService, DagRunService, DagService, DagSourceService, DagStatsService, DagVersionService, DagWarningService, DashboardService, DependenciesService, EventLogService, ExtraLinksService, GridService, ImportErrorService, JobService, LoginService, MonitorService, PluginService, PoolService, ProviderService, StructureService, TaskInstanceService, TaskService, VariableService, VersionService, XcomService } from "../requests/services.gen";
4+
import { AssetService, AuthLinksService, BackfillService, CalendarService, ConfigService, ConnectionService, DagReportService, DagRunService, DagService, DagSourceService, DagStatsService, DagVersionService, DagWarningService, DashboardService, DependenciesService, EventLogService, ExperimentalService, ExtraLinksService, GridService, ImportErrorService, JobService, LoginService, MonitorService, PluginService, PoolService, ProviderService, StructureService, TaskInstanceService, TaskService, VariableService, VersionService, XcomService } from "../requests/services.gen";
55
import { DagRunState, DagWarningType } from "../requests/types.gen";
66
import * as Common from "./common";
77
/**
@@ -294,8 +294,8 @@ export const ensureUseDagRunServiceGetDagRunsData = (queryClient: QueryClient, {
294294
updatedAtLte?: string;
295295
}) => queryClient.ensureQueryData({ queryKey: Common.UseDagRunServiceGetDagRunsKeyFn({ dagId, endDateGte, endDateLte, limit, logicalDateGte, logicalDateLte, offset, orderBy, runAfterGte, runAfterLte, runType, startDateGte, startDateLte, state, updatedAtGte, updatedAtLte }), queryFn: () => DagRunService.getDagRuns({ dagId, endDateGte, endDateLte, limit, logicalDateGte, logicalDateLte, offset, orderBy, runAfterGte, runAfterLte, runType, startDateGte, startDateLte, state, updatedAtGte, updatedAtLte }) });
296296
/**
297-
* Wait Dag Run Until Finished
298-
* Wait for a dag run until it finishes, and return its return value.
297+
* Experimental: Wait for a dag run to complete, and return task results if requested.
298+
* 🚧 This is an experimental endpoint and may change or be removed without notice.
299299
* @param data The data for the request.
300300
* @param data.dagId
301301
* @param data.dagRunId
@@ -311,6 +311,23 @@ export const ensureUseDagRunServiceWaitDagRunUntilFinishedData = (queryClient: Q
311311
interval: number;
312312
}) => queryClient.ensureQueryData({ queryKey: Common.UseDagRunServiceWaitDagRunUntilFinishedKeyFn({ collect, dagId, dagRunId, interval }), queryFn: () => DagRunService.waitDagRunUntilFinished({ collect, dagId, dagRunId, interval }) });
313313
/**
314+
* Experimental: Wait for a dag run to complete, and return task results if requested.
315+
* 🚧 This is an experimental endpoint and may change or be removed without notice.
316+
* @param data The data for the request.
317+
* @param data.dagId
318+
* @param data.dagRunId
319+
* @param data.interval Seconds to wait between dag run state checks
320+
* @param data.collect Collect return value XCom from task. Can be set multiple times.
321+
* @returns unknown Successful Response
322+
* @throws ApiError
323+
*/
324+
export const ensureUseExperimentalServiceWaitDagRunUntilFinishedData = (queryClient: QueryClient, { collect, dagId, dagRunId, interval }: {
325+
collect?: string[];
326+
dagId: string;
327+
dagRunId: string;
328+
interval: number;
329+
}) => queryClient.ensureQueryData({ queryKey: Common.UseExperimentalServiceWaitDagRunUntilFinishedKeyFn({ collect, dagId, dagRunId, interval }), queryFn: () => ExperimentalService.waitDagRunUntilFinished({ collect, dagId, dagRunId, interval }) });
330+
/**
314331
* Get Dag Source
315332
* Get source code using file token.
316333
* @param data The data for the request.

airflow-core/src/airflow/ui/openapi-gen/queries/prefetch.ts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// generated with @7nohe/openapi-react-query-codegen@1.6.2
22

33
import { type QueryClient } from "@tanstack/react-query";
4-
import { AssetService, AuthLinksService, BackfillService, CalendarService, ConfigService, ConnectionService, DagReportService, DagRunService, DagService, DagSourceService, DagStatsService, DagVersionService, DagWarningService, DashboardService, DependenciesService, EventLogService, ExtraLinksService, GridService, ImportErrorService, JobService, LoginService, MonitorService, PluginService, PoolService, ProviderService, StructureService, TaskInstanceService, TaskService, VariableService, VersionService, XcomService } from "../requests/services.gen";
4+
import { AssetService, AuthLinksService, BackfillService, CalendarService, ConfigService, ConnectionService, DagReportService, DagRunService, DagService, DagSourceService, DagStatsService, DagVersionService, DagWarningService, DashboardService, DependenciesService, EventLogService, ExperimentalService, ExtraLinksService, GridService, ImportErrorService, JobService, LoginService, MonitorService, PluginService, PoolService, ProviderService, StructureService, TaskInstanceService, TaskService, VariableService, VersionService, XcomService } from "../requests/services.gen";
55
import { DagRunState, DagWarningType } from "../requests/types.gen";
66
import * as Common from "./common";
77
/**
@@ -294,8 +294,8 @@ export const prefetchUseDagRunServiceGetDagRuns = (queryClient: QueryClient, { d
294294
updatedAtLte?: string;
295295
}) => queryClient.prefetchQuery({ queryKey: Common.UseDagRunServiceGetDagRunsKeyFn({ dagId, endDateGte, endDateLte, limit, logicalDateGte, logicalDateLte, offset, orderBy, runAfterGte, runAfterLte, runType, startDateGte, startDateLte, state, updatedAtGte, updatedAtLte }), queryFn: () => DagRunService.getDagRuns({ dagId, endDateGte, endDateLte, limit, logicalDateGte, logicalDateLte, offset, orderBy, runAfterGte, runAfterLte, runType, startDateGte, startDateLte, state, updatedAtGte, updatedAtLte }) });
296296
/**
297-
* Wait Dag Run Until Finished
298-
* Wait for a dag run until it finishes, and return its return value.
297+
* Experimental: Wait for a dag run to complete, and return task results if requested.
298+
* 🚧 This is an experimental endpoint and may change or be removed without notice.
299299
* @param data The data for the request.
300300
* @param data.dagId
301301
* @param data.dagRunId
@@ -311,6 +311,23 @@ export const prefetchUseDagRunServiceWaitDagRunUntilFinished = (queryClient: Que
311311
interval: number;
312312
}) => queryClient.prefetchQuery({ queryKey: Common.UseDagRunServiceWaitDagRunUntilFinishedKeyFn({ collect, dagId, dagRunId, interval }), queryFn: () => DagRunService.waitDagRunUntilFinished({ collect, dagId, dagRunId, interval }) });
313313
/**
314+
* Experimental: Wait for a dag run to complete, and return task results if requested.
315+
* 🚧 This is an experimental endpoint and may change or be removed without notice.
316+
* @param data The data for the request.
317+
* @param data.dagId
318+
* @param data.dagRunId
319+
* @param data.interval Seconds to wait between dag run state checks
320+
* @param data.collect Collect return value XCom from task. Can be set multiple times.
321+
* @returns unknown Successful Response
322+
* @throws ApiError
323+
*/
324+
export const prefetchUseExperimentalServiceWaitDagRunUntilFinished = (queryClient: QueryClient, { collect, dagId, dagRunId, interval }: {
325+
collect?: string[];
326+
dagId: string;
327+
dagRunId: string;
328+
interval: number;
329+
}) => queryClient.prefetchQuery({ queryKey: Common.UseExperimentalServiceWaitDagRunUntilFinishedKeyFn({ collect, dagId, dagRunId, interval }), queryFn: () => ExperimentalService.waitDagRunUntilFinished({ collect, dagId, dagRunId, interval }) });
330+
/**
314331
* Get Dag Source
315332
* Get source code using file token.
316333
* @param data The data for the request.

airflow-core/src/airflow/ui/openapi-gen/queries/queries.ts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// generated with @7nohe/openapi-react-query-codegen@1.6.2
22

33
import { UseMutationOptions, UseQueryOptions, useMutation, useQuery } from "@tanstack/react-query";
4-
import { AssetService, AuthLinksService, BackfillService, CalendarService, ConfigService, ConnectionService, DagParsingService, DagReportService, DagRunService, DagService, DagSourceService, DagStatsService, DagVersionService, DagWarningService, DashboardService, DependenciesService, EventLogService, ExtraLinksService, GridService, ImportErrorService, JobService, LoginService, MonitorService, PluginService, PoolService, ProviderService, StructureService, TaskInstanceService, TaskService, VariableService, VersionService, XcomService } from "../requests/services.gen";
4+
import { AssetService, AuthLinksService, BackfillService, CalendarService, ConfigService, ConnectionService, DagParsingService, DagReportService, DagRunService, DagService, DagSourceService, DagStatsService, DagVersionService, DagWarningService, DashboardService, DependenciesService, EventLogService, ExperimentalService, ExtraLinksService, GridService, ImportErrorService, JobService, LoginService, MonitorService, PluginService, PoolService, ProviderService, StructureService, TaskInstanceService, TaskService, VariableService, VersionService, XcomService } from "../requests/services.gen";
55
import { BackfillPostBody, BulkBody_BulkTaskInstanceBody_, BulkBody_ConnectionBody_, BulkBody_PoolBody_, BulkBody_VariableBody_, ClearTaskInstancesBody, ConnectionBody, CreateAssetEventsBody, DAGPatchBody, DAGRunClearBody, DAGRunPatchBody, DAGRunsBatchBody, DagRunState, DagWarningType, PatchTaskInstanceBody, PoolBody, PoolPatchBody, TaskInstancesBatchBody, TriggerDAGRunPostBody, VariableBody, XComCreateBody, XComUpdateBody } from "../requests/types.gen";
66
import * as Common from "./common";
77
/**
@@ -294,8 +294,8 @@ export const useDagRunServiceGetDagRuns = <TData = Common.DagRunServiceGetDagRun
294294
updatedAtLte?: string;
295295
}, queryKey?: TQueryKey, options?: Omit<UseQueryOptions<TData, TError>, "queryKey" | "queryFn">) => useQuery<TData, TError>({ queryKey: Common.UseDagRunServiceGetDagRunsKeyFn({ dagId, endDateGte, endDateLte, limit, logicalDateGte, logicalDateLte, offset, orderBy, runAfterGte, runAfterLte, runType, startDateGte, startDateLte, state, updatedAtGte, updatedAtLte }, queryKey), queryFn: () => DagRunService.getDagRuns({ dagId, endDateGte, endDateLte, limit, logicalDateGte, logicalDateLte, offset, orderBy, runAfterGte, runAfterLte, runType, startDateGte, startDateLte, state, updatedAtGte, updatedAtLte }) as TData, ...options });
296296
/**
297-
* Wait Dag Run Until Finished
298-
* Wait for a dag run until it finishes, and return its return value.
297+
* Experimental: Wait for a dag run to complete, and return task results if requested.
298+
* 🚧 This is an experimental endpoint and may change or be removed without notice.
299299
* @param data The data for the request.
300300
* @param data.dagId
301301
* @param data.dagRunId
@@ -311,6 +311,23 @@ export const useDagRunServiceWaitDagRunUntilFinished = <TData = Common.DagRunSer
311311
interval: number;
312312
}, queryKey?: TQueryKey, options?: Omit<UseQueryOptions<TData, TError>, "queryKey" | "queryFn">) => useQuery<TData, TError>({ queryKey: Common.UseDagRunServiceWaitDagRunUntilFinishedKeyFn({ collect, dagId, dagRunId, interval }, queryKey), queryFn: () => DagRunService.waitDagRunUntilFinished({ collect, dagId, dagRunId, interval }) as TData, ...options });
313313
/**
314+
* Experimental: Wait for a dag run to complete, and return task results if requested.
315+
* 🚧 This is an experimental endpoint and may change or be removed without notice.
316+
* @param data The data for the request.
317+
* @param data.dagId
318+
* @param data.dagRunId
319+
* @param data.interval Seconds to wait between dag run state checks
320+
* @param data.collect Collect return value XCom from task. Can be set multiple times.
321+
* @returns unknown Successful Response
322+
* @throws ApiError
323+
*/
324+
export const useExperimentalServiceWaitDagRunUntilFinished = <TData = Common.ExperimentalServiceWaitDagRunUntilFinishedDefaultResponse, TError = unknown, TQueryKey extends Array<unknown> = unknown[]>({ collect, dagId, dagRunId, interval }: {
325+
collect?: string[];
326+
dagId: string;
327+
dagRunId: string;
328+
interval: number;
329+
}, queryKey?: TQueryKey, options?: Omit<UseQueryOptions<TData, TError>, "queryKey" | "queryFn">) => useQuery<TData, TError>({ queryKey: Common.UseExperimentalServiceWaitDagRunUntilFinishedKeyFn({ collect, dagId, dagRunId, interval }, queryKey), queryFn: () => ExperimentalService.waitDagRunUntilFinished({ collect, dagId, dagRunId, interval }) as TData, ...options });
330+
/**
314331
* Get Dag Source
315332
* Get source code using file token.
316333
* @param data The data for the request.

0 commit comments

Comments
 (0)