Skip to content

Commit

Permalink
Assume invocation step state is not null.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Mar 12, 2024
1 parent a87af2b commit 694ae09
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7501,7 +7501,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"] | components["schemas"]["JobState"];
/** Subworkflow Invocation Id */
subworkflow_invocation_id: string | null;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { computed } from "vue";
import { InvocationJobsSummary } from "@/api/invocations";
import ProgressBar from "@/components/ProgressBar.vue";
import {
errorCount as jobStatesSummaryErrorCount,
Expand All @@ -12,6 +11,8 @@ import {
runningCount as jobStatesSummaryRunningCount,
} from "./util";
import ProgressBar from "@/components/ProgressBar.vue";
interface Props {
jobStatesSummary: InvocationJobsSummary;
invocationSchedulingTerminal: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { computed } from "vue";
import { InvocationStep, WorkflowInvocationElementView } from "@/api/invocations";
import ProgressBar from "@/components/ProgressBar.vue";
interface Props {
Expand All @@ -28,8 +29,7 @@ const stepStates = computed<StepStateType>(() => {
if (!step) {
continue;
}
// the API defined state here allowing null and undefined is odd...
const stepState: string = step.state || "unknown";
const stepState: string = step.state;
if (!stepStates[stepState]) {
stepStates[stepState] = 1;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import { InvocationJobsSummary, WorkflowInvocationElementView } from "@/api/invo
import { runningCount as jobStatesSummaryRunningCount } from "./util";
import LoadingSpan from "@/components/LoadingSpan.vue";
import ProgressBar from "@/components/ProgressBar.vue";
import InvocationMessage from "./InvocationMessage.vue";
import InvocationSummaryActionButtons from "./InvocationSummaryActionButtons.vue";
import InvocationJobsProgressBar from "./InvocationJobsProgressBar.vue";
import InvocationMessage from "./InvocationMessage.vue";
import InvocationStepsProgressBar from "./InvocationStepsProgressBar.vue";
import InvocationSummaryActionButtons from "./InvocationSummaryActionButtons.vue";
import LoadingSpan from "@/components/LoadingSpan.vue";
interface Props {
invocation: WorkflowInvocationElementView;
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/schema/invocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ class InvocationStep(Model, WithModelClass):
),
]
]
state: Optional[Union[InvocationStepState, JobState]] = Field(
default=None,
state: Union[InvocationStepState, JobState] = Field(
...,
title="State of the invocation step",
description="Describes where in the scheduling process the workflow invocation step is.",
)
Expand Down

0 comments on commit 694ae09

Please sign in to comment.