Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Place invocation state in list #17708

Draft
wants to merge 12 commits into
base: dev
Choose a base branch
from
Draft
3 changes: 3 additions & 0 deletions client/src/api/invocations.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { type components } from "./schema";

export type WorkflowInvocationElementView = components["schemas"]["WorkflowInvocationElementView"];
export type LegacyWorkflowInvocationElementView = components["schemas"]["LegacyWorkflowInvocationElementView"];
export type WorkflowInvocationCollectionView = components["schemas"]["WorkflowInvocationCollectionView"];
export type WorkflowInvocationStepStatesView = components["schemas"]["WorkflowInvocationStepStatesView"];
export type InvocationJobsSummary = components["schemas"]["InvocationJobsResponse"];
export type InvocationStep = components["schemas"]["InvocationStep"];
export type LegacyInvocationStep = components["schemas"]["LegacyInvocationStep"];
export type InvocationMessage = components["schemas"]["InvocationMessageResponseUnion"];

export type StepJobSummary =
Expand Down
247 changes: 238 additions & 9 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12161,7 +12161,7 @@ export interface components {
* InvocationSerializationView
* @enum {string}
*/
InvocationSerializationView: "element" | "collection";
InvocationSerializationView: "element" | "collection" | "step_states";
/**
* InvocationSortByEnum
* @enum {string}
Expand All @@ -12179,10 +12179,7 @@ export interface components {
| "cancelled"
| "cancelling"
| "failed";
/**
* InvocationStep
* @description Information about workflow invocation step
*/
/** InvocationStep */
InvocationStep: {
/**
* Action
Expand All @@ -12199,8 +12196,6 @@ export interface components {
* @description The implicit collection job ID associated with the workflow invocation step.
*/
implicit_collection_jobs_id?: string | null;
/** Job Id */
job_id: string | null;
/**
* Jobs
* @description Jobs associated with the workflow invocation step.
Expand Down Expand Up @@ -12239,7 +12234,7 @@ export interface components {
* State of the invocation step
* @description Describes where in the scheduling process the workflow invocation step is.
*/
state?: components["schemas"]["InvocationStepState"] | components["schemas"]["JobState"] | null;
state: components["schemas"]["InvocationStepState"];
/** Subworkflow Invocation Id */
subworkflow_invocation_id: string | null;
/**
Expand Down Expand Up @@ -13113,6 +13108,88 @@ export interface components {
* @enum {string}
*/
LandingRequestState: "unclaimed" | "claimed";
/** LegacyInvocationStep */
LegacyInvocationStep: {
/**
* Action
* @description Whether to take action on the invocation step.
*/
action: boolean | null;
/**
* Invocation Step ID
* @example 0123456789ABCDEF
*/
id: string;
/**
* Implicit Collection Jobs ID
* @description The implicit collection job ID associated with the workflow invocation step.
*/
implicit_collection_jobs_id?: string | null;
/** Job Id */
job_id: string | null;
/**
* Jobs
* @description Jobs associated with the workflow invocation step.
* @default []
*/
jobs: components["schemas"]["JobBaseModel"][];
/**
* Model class
* @description The name of the database model class.
* @constant
* @enum {string}
*/
model_class: "WorkflowInvocationStep";
/**
* Order index
* @description The index of the workflow step in the workflow.
*/
order_index: number;
/**
* Output collections
* @description The dataset collection outputs of the workflow invocation step.
* @default {}
*/
output_collections: {
[key: string]: components["schemas"]["InvocationStepCollectionOutput"];
};
/**
* Outputs
* @description The outputs of the workflow invocation step.
* @default {}
*/
outputs: {
[key: string]: components["schemas"]["InvocationStepOutput"];
};
/**
* State of the invocation step
* @description Describes the job state corresponding to this invocation step.
*/
state: components["schemas"]["JobState"] | null;
/** Subworkflow Invocation Id */
subworkflow_invocation_id: string | null;
/**
* Update Time
* @description The last time and date this item was updated.
*/
update_time: string | null;
/**
* Workflow step ID
* @description The encoded ID of the workflow step associated with this workflow invocation step.
* @example 0123456789ABCDEF
*/
workflow_step_id: string;
/**
* Step label
* @description The label of the workflow step
*/
workflow_step_label?: string | null;
/**
* UUID
* @description Universal unique identifier of the workflow step.
*/
workflow_step_uuid?: string | null;
};
/** LegacyLibraryPermissionsPayload */
LegacyLibraryPermissionsPayload: {
/**
Expand Down Expand Up @@ -13140,6 +13217,99 @@ export interface components {
*/
LIBRARY_MODIFY_in: string[] | string | null;
};
/** LegacyWorkflowInvocationElementView */
LegacyWorkflowInvocationElementView: {
/**
* Create Time
* Format: date-time
* @description The time and date this item was created.
*/
create_time: string;
/**
* History ID
* @description The encoded ID of the history associated with the invocation.
* @example 0123456789ABCDEF
*/
history_id: string;
/**
* ID
* @description The encoded ID of the workflow invocation.
* @example 0123456789ABCDEF
*/
id: string;
/**
* Input step parameters
* @description Input step parameters of the workflow invocation.
*/
input_step_parameters: {
[key: string]: components["schemas"]["InvocationInputParameter"];
};
/**
* Inputs
* @description Input datasets/dataset collections of the workflow invocation.
*/
inputs: {
[key: string]: components["schemas"]["InvocationInput"];
};
/**
* Messages
* @description A list of messages about why the invocation did not succeed.
*/
messages: components["schemas"]["InvocationMessageResponseUnion"][];
/**
* Model class
* @description The name of the database model class.
* @constant
* @enum {string}
*/
model_class: "WorkflowInvocation";
/**
* Output collections
* @description Output dataset collections of the workflow invocation.
*/
output_collections: {
[key: string]: components["schemas"]["InvocationOutputCollection"];
};
/**
* Output values
* @description Output values of the workflow invocation.
*/
output_values: Record<string, never>;
/**
* Outputs
* @description Output datasets of the workflow invocation.
*/
outputs: {
[key: string]: components["schemas"]["InvocationOutput"];
};
/**
* Invocation state
* @description State of workflow invocation.
*/
state: components["schemas"]["InvocationState"];
/**
* Steps
* @description Steps of the workflow invocation (legacy view using job state).
*/
steps: components["schemas"]["LegacyInvocationStep"][];
/**
* Update Time
* Format: date-time
* @description The last time and date this item was updated.
*/
update_time: string;
/**
* UUID
* @description Universal unique identifier of the workflow invocation.
*/
uuid?: string | null;
/**
* Workflow ID
* @description The encoded Workflow ID associated with the invocation.
* @example 0123456789ABCDEF
*/
workflow_id: string;
};
/** LibraryAvailablePermissions */
LibraryAvailablePermissions: {
/**
Expand Down Expand Up @@ -18317,7 +18487,9 @@ export interface components {
/** WorkflowInvocationResponse */
WorkflowInvocationResponse:
| components["schemas"]["WorkflowInvocationElementView"]
| components["schemas"]["WorkflowInvocationCollectionView"];
| components["schemas"]["LegacyWorkflowInvocationElementView"]
| components["schemas"]["WorkflowInvocationCollectionView"]
| components["schemas"]["WorkflowInvocationStepStatesView"];
/** WorkflowInvocationStateSummary */
WorkflowInvocationStateSummary: {
/**
Expand All @@ -18344,6 +18516,61 @@ export interface components {
[key: string]: number;
};
};
/** WorkflowInvocationStepStatesView */
WorkflowInvocationStepStatesView: {
/**
* Create Time
* Format: date-time
* @description The time and date this item was created.
*/
create_time: string;
/**
* History ID
* @description The encoded ID of the history associated with the invocation.
* @example 0123456789ABCDEF
*/
history_id: string;
/**
* ID
* @description The encoded ID of the workflow invocation.
* @example 0123456789ABCDEF
*/
id: string;
/**
* Model class
* @description The name of the database model class.
* @constant
* @enum {string}
*/
model_class: "WorkflowInvocation";
/**
* Invocation state
* @description State of workflow invocation.
*/
state: components["schemas"]["InvocationState"];
/**
* Steps
* @description Steps of the workflow invocation.
*/
steps: components["schemas"]["InvocationStep"][];
/**
* Update Time
* Format: date-time
* @description The last time and date this item was updated.
*/
update_time: string;
/**
* UUID
* @description Universal unique identifier of the workflow invocation.
*/
uuid?: string | null;
/**
* Workflow ID
* @description The encoded Workflow ID associated with the invocation.
* @example 0123456789ABCDEF
*/
workflow_id: string;
};
/**
* WorkflowJobMetric
* @example {
Expand Down Expand Up @@ -26946,6 +27173,8 @@ export interface operations {
show_invocation_api_invocations__invocation_id__get: {
parameters: {
query?: {
/** @description View to be passed to the serializer */
view?: string | null;
/** @description Include details for individual invocation steps and populate a steps attribute in the resulting dictionary. */
step_details?: boolean;
/** @description Populate the invocation step state with the job state instead of the invocation step state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { BAlert, BButton, BCard, BCardBody, BCardHeader } from "bootstrap-vue";
import { storeToRefs } from "pinia";
import { computed, onUnmounted, ref, watch } from "vue";

import type { WorkflowInvocationElementView } from "@/api/invocations";
import type { LegacyWorkflowInvocationElementView } from "@/api/invocations";
import { JobProvider } from "@/components/providers";
import { useDatatypesMapper } from "@/composables/datatypesMapper";
import { useInvocationGraph } from "@/composables/useInvocationGraph";
Expand All @@ -35,7 +35,7 @@ library.add(faArrowDown, faChevronDown, faChevronUp, faSignInAlt, faSitemap, faT

interface Props {
/** The invocation to display */
invocation: WorkflowInvocationElementView;
invocation: LegacyWorkflowInvocationElementView;
/** The workflow which was run */
workflow: Workflow;
/** Whether the invocation is terminal */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { faChevronDown, faChevronUp, faSignInAlt } from "@fortawesome/free-solid
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { computed, nextTick, ref, watch } from "vue";

import type { WorkflowInvocationElementView } from "@/api/invocations";
import type { LegacyWorkflowInvocationElementView } from "@/api/invocations";
import { isWorkflowInput } from "@/components/Workflow/constants";
import type { GraphStep } from "@/composables/useInvocationGraph";
import type { Workflow } from "@/stores/workflowStore";
Expand All @@ -19,7 +19,7 @@ interface Props {
/** The store id for the invocation graph */
storeId: string;
/** The invocation to display */
invocation: WorkflowInvocationElementView;
invocation: LegacyWorkflowInvocationElementView;
/** The workflow which was run */
workflow: Workflow;
/** Whether the invocation graph is hidden */
Expand Down
Loading