Skip to content

Commit

Permalink
[Infra UI] Correctly interpret the resetting and reverting job st…
Browse files Browse the repository at this point in the history
…ates (#129570)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
weltenwort and kibanamachine authored Apr 19, 2022
1 parent ef56370 commit b62c815
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ const datafeedStateRT = rt.keyof({
'': null,
});

// this is the union of the ML API's job state and block reasons
const jobStateRT = rt.keyof({
closed: null,
closing: null,
deleting: null,
failed: null,
opened: null,
opening: null,
resetting: null,
reverting: null,
});

const jobAnalysisConfigRT = rt.partial({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ const getJobStatus =
) {
return 'stopped';
} else if (
jobSummary.jobState === 'opening' &&
jobSummary.awaitingNodeAssignment === false
(jobSummary.jobState === 'opening' && jobSummary.awaitingNodeAssignment === false) ||
jobSummary.jobState === 'resetting' ||
jobSummary.jobState === 'reverting'
) {
return 'initializing';
} else if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ const datafeedStateRT = rt.keyof({
'': null,
});

// this is the union of the ML API's job state and block reasons
const jobStateRT = rt.keyof({
closed: null,
closing: null,
deleting: null,
failed: null,
opened: null,
opening: null,
resetting: null,
reverting: null,
});

const jobCategorizationStatusRT = rt.keyof({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ const getJobStatus =
) {
return 'stopped';
} else if (
jobSummary.jobState === 'opening' &&
jobSummary.awaitingNodeAssignment === false
(jobSummary.jobState === 'opening' && jobSummary.awaitingNodeAssignment === false) ||
jobSummary.jobState === 'resetting' ||
jobSummary.jobState === 'reverting'
) {
return 'initializing';
} else if (
Expand Down

0 comments on commit b62c815

Please sign in to comment.