Skip to content

Commit

Permalink
Re-run static checks
Browse files Browse the repository at this point in the history
  • Loading branch information
omkar-foss committed Nov 13, 2024
1 parent 2752caf commit ee693e7
Show file tree
Hide file tree
Showing 8 changed files with 812 additions and 0 deletions.
246 changes: 246 additions & 0 deletions airflow/api_fastapi/core_api/openapi/v1-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3321,6 +3321,62 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/public/dags/{dag_id}/tasks/{task_id}:
get:
tags:
- Task
summary: Get Task
description: Get simplified representation of a task.
operationId: get_task
parameters:
- name: dag_id
in: path
required: true
schema:
type: string
title: Dag Id
- name: task_id
in: path
required: true
schema:
title: Task Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TaskResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPExceptionResponse'
description: Bad Request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPExceptionResponse'
description: Unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPExceptionResponse'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPExceptionResponse'
description: Not Found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
AppBuilderMenuItemResponse:
Expand Down Expand Up @@ -5343,6 +5399,196 @@ components:
- updated_at
title: TaskOutletAssetReference
description: Serializable version of the TaskOutletAssetReference ORM SqlAlchemyModel.
TaskResponse:
properties:
task_id:
anyOf:
- type: string
- type: 'null'
title: Task Id
task_display_name:
anyOf:
- type: string
- type: 'null'
title: Task Display Name
owner:
anyOf:
- type: string
- type: 'null'
title: Owner
start_date:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Start Date
end_date:
anyOf:
- type: string
format: date-time
- type: 'null'
title: End Date
trigger_rule:
anyOf:
- type: string
- type: 'null'
title: Trigger Rule
depends_on_past:
type: boolean
title: Depends On Past
wait_for_downstream:
type: boolean
title: Wait For Downstream
retries:
anyOf:
- type: number
- type: 'null'
title: Retries
queue:
anyOf:
- type: string
- type: 'null'
title: Queue
pool:
anyOf:
- type: string
- type: 'null'
title: Pool
pool_slots:
anyOf:
- type: number
- type: 'null'
title: Pool Slots
execution_timeout:
anyOf:
- $ref: '#/components/schemas/TimeDelta'
- type: 'null'
retry_delay:
anyOf:
- $ref: '#/components/schemas/TimeDelta'
- type: 'null'
retry_exponential_backoff:
type: boolean
title: Retry Exponential Backoff
priority_weight:
anyOf:
- type: number
- type: 'null'
title: Priority Weight
weight_rule:
anyOf:
- type: string
- type: 'null'
title: Weight Rule
ui_color:
anyOf:
- type: string
- type: 'null'
title: Ui Color
ui_fgcolor:
anyOf:
- type: string
- type: 'null'
title: Ui Fgcolor
template_fields:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Template Fields
downstream_task_ids:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Downstream Task Ids
doc_md:
anyOf:
- type: string
- type: 'null'
title: Doc Md
operator_name:
anyOf:
- type: string
- type: 'null'
title: Operator Name
params:
anyOf:
- type: object
- type: 'null'
title: Params
class_ref:
anyOf:
- type: object
- type: 'null'
title: Class Ref
is_mapped:
anyOf:
- type: boolean
- type: 'null'
title: Is Mapped
extra_links:
items:
type: string
type: array
title: Extra Links
description: Extract and return extra_links.
readOnly: true
type: object
required:
- task_id
- task_display_name
- owner
- start_date
- end_date
- trigger_rule
- depends_on_past
- wait_for_downstream
- retries
- queue
- pool
- pool_slots
- execution_timeout
- retry_delay
- retry_exponential_backoff
- priority_weight
- weight_rule
- ui_color
- ui_fgcolor
- template_fields
- downstream_task_ids
- doc_md
- operator_name
- params
- class_ref
- is_mapped
- extra_links
title: TaskResponse
description: Task serializer for responses.
TimeDelta:
properties:
__type:
type: string
title: ' Type'
default: TimeDelta
days:
type: integer
title: Days
seconds:
type: integer
title: Seconds
microseconds:
type: integer
title: Microseconds
type: object
required:
- days
- seconds
- microseconds
title: TimeDelta
description: TimeDelta can be used to interact with datetime.timedelta objects.
TriggerResponse:
properties:
id:
Expand Down
19 changes: 19 additions & 0 deletions airflow/ui/openapi-gen/queries/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
PoolService,
ProviderService,
TaskInstanceService,
TaskService,
VariableService,
VersionService,
XcomService,
Expand Down Expand Up @@ -966,6 +967,24 @@ export const UseXcomServiceGetXcomEntryKeyFn = (
{ dagId, dagRunId, deserialize, mapIndex, stringify, taskId, xcomKey },
]),
];
export type TaskServiceGetTaskDefaultResponse = Awaited<
ReturnType<typeof TaskService.getTask>
>;
export type TaskServiceGetTaskQueryResult<
TData = TaskServiceGetTaskDefaultResponse,
TError = unknown,
> = UseQueryResult<TData, TError>;
export const useTaskServiceGetTaskKey = "TaskServiceGetTask";
export const UseTaskServiceGetTaskKeyFn = (
{
dagId,
taskId,
}: {
dagId: string;
taskId: unknown;
},
queryKey?: Array<unknown>,
) => [useTaskServiceGetTaskKey, ...(queryKey ?? [{ dagId, taskId }])];
export type BackfillServiceCreateBackfillMutationResult = Awaited<
ReturnType<typeof BackfillService.createBackfill>
>;
Expand Down
24 changes: 24 additions & 0 deletions airflow/ui/openapi-gen/queries/prefetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
PoolService,
ProviderService,
TaskInstanceService,
TaskService,
VariableService,
VersionService,
XcomService,
Expand Down Expand Up @@ -1309,3 +1310,26 @@ export const prefetchUseXcomServiceGetXcomEntry = (
xcomKey,
}),
});
/**
* Get Task
* Get simplified representation of a task.
* @param data The data for the request.
* @param data.dagId
* @param data.taskId
* @returns TaskResponse Successful Response
* @throws ApiError
*/
export const prefetchUseTaskServiceGetTask = (
queryClient: QueryClient,
{
dagId,
taskId,
}: {
dagId: string;
taskId: unknown;
},
) =>
queryClient.prefetchQuery({
queryKey: Common.UseTaskServiceGetTaskKeyFn({ dagId, taskId }),
queryFn: () => TaskService.getTask({ dagId, taskId }),
});
30 changes: 30 additions & 0 deletions airflow/ui/openapi-gen/queries/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
PoolService,
ProviderService,
TaskInstanceService,
TaskService,
VariableService,
VersionService,
XcomService,
Expand Down Expand Up @@ -1569,6 +1570,35 @@ export const useXcomServiceGetXcomEntry = <
}) as TData,
...options,
});
/**
* Get Task
* Get simplified representation of a task.
* @param data The data for the request.
* @param data.dagId
* @param data.taskId
* @returns TaskResponse Successful Response
* @throws ApiError
*/
export const useTaskServiceGetTask = <
TData = Common.TaskServiceGetTaskDefaultResponse,
TError = unknown,
TQueryKey extends Array<unknown> = unknown[],
>(
{
dagId,
taskId,
}: {
dagId: string;
taskId: unknown;
},
queryKey?: TQueryKey,
options?: Omit<UseQueryOptions<TData, TError>, "queryKey" | "queryFn">,
) =>
useQuery<TData, TError>({
queryKey: Common.UseTaskServiceGetTaskKeyFn({ dagId, taskId }, queryKey),
queryFn: () => TaskService.getTask({ dagId, taskId }) as TData,
...options,
});
/**
* Create Backfill
* @param data The data for the request.
Expand Down
Loading

0 comments on commit ee693e7

Please sign in to comment.