Skip to content

Commit b17cc23

Browse files
committed
fix: fix issues with the ui test job
1 parent b6a5f49 commit b17cc23

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/components/instances/JobDetails/JobInputSection/useGetJobInputs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { type InstanceGetResponse, type InstanceSummary } from "@squonk/data-man
22
import { useGetJob } from "@squonk/data-manager-client/job";
33

44
import { type InputFieldSchema } from "../../../runCards/JobCard/JobInputFields";
5+
import { TEST_JOB_ID } from "../../../runCards/TestJob/jobId";
56

67
// Contains only fields we are interested in
78
type ApplicationSpecification = {
@@ -31,7 +32,7 @@ export const useGetJobInputs = (instance: InstanceGetResponse | InstanceSummary)
3132
instance.job_id ?? -1,
3233
undefined,
3334
{
34-
query: { enabled: inputsEnabled },
35+
query: { enabled: inputsEnabled, retry: instance.job_id === TEST_JOB_ID ? 1 : 3 },
3536
},
3637
);
3738

src/components/runCards/JobCard/JobModal.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { useEnqueueError } from "../../../hooks/useEnqueueStackError";
1919
import { CenterLoader } from "../../CenterLoader";
2020
import { ModalWrapper } from "../../modals/ModalWrapper";
2121
import { DebugCheckbox, type DebugValue } from "../DebugCheckbox";
22+
import { TEST_JOB_ID } from "../TestJob/jobId";
2223
import { type CommonModalProps } from "../types";
2324
import { type InputSchema, type JobInputFieldsProps, validateInputData } from "./JobInputFields";
2425

@@ -85,8 +86,9 @@ export const JobModal = ({
8586

8687
const { mutateAsync: createInstance } = useCreateInstance();
8788
// Get extra details about the job
88-
const { data: job } = useGetJob(jobId);
89-
89+
const { data: job } = useGetJob(jobId, undefined, {
90+
query: { retry: jobId === TEST_JOB_ID ? 1 : 3 },
91+
});
9092
const name = nameState || (job?.job ?? "");
9193

9294
const spec = instance?.application_specification;

src/pages/run.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ const Run = () => {
8282
</Grid>
8383
)) ?? [];
8484

85+
process.env.NODE_ENV === "development" && jobCards.push(<TestJobCard key={TEST_JOB_ID} />);
86+
8587
const showApplications = executionTypes.includes("application");
8688
const showJobs = executionTypes.includes("job");
8789

@@ -100,8 +102,6 @@ const Run = () => {
100102
hasPermissionToRun,
101103
]);
102104

103-
process.env.NODE_ENV === "development" && cards.push(<TestJobCard key={TEST_JOB_ID} />);
104-
105105
return (
106106
<>
107107
<Head>

0 commit comments

Comments
 (0)