Skip to content

Commit

Permalink
[8.11] [ML] Fix the model state column in the Trained Models UI (elas…
Browse files Browse the repository at this point in the history
…tic#169068) (elastic#169086)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[ML] Fix the model state column in the Trained Models UI
(elastic#169068)](elastic#169068)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-10-17T11:02:30Z","message":"[ML]
Fix the model state column in the Trained Models UI (elastic#169068)\n\n##
Summary\r\n\r\nFixes an issue when the `Ready to deploy` download state
was overriding\r\nthe `starting` and `stopping` deployment
states.","sha":"3164eca0dc8ef4f5201f79d29d330488013e98d9","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","Team:ML","v8.11.0","v8.12.0"],"number":169068,"url":"https://github.com/elastic/kibana/pull/169068","mergeCommit":{"message":"[ML]
Fix the model state column in the Trained Models UI (elastic#169068)\n\n##
Summary\r\n\r\nFixes an issue when the `Ready to deploy` download state
was overriding\r\nthe `starting` and `stopping` deployment
states.","sha":"3164eca0dc8ef4f5201f79d29d330488013e98d9"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/169068","number":169068,"mergeCommit":{"message":"[ML]
Fix the model state column in the Trained Models UI (elastic#169068)\n\n##
Summary\r\n\r\nFixes an issue when the `Ready to deploy` download state
was overriding\r\nthe `starting` and `stopping` deployment
states.","sha":"3164eca0dc8ef4f5201f79d29d330488013e98d9"}}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <[email protected]>
  • Loading branch information
kibanamachine and darnautov authored Oct 17, 2023
1 parent db418ff commit 0c0c177
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
BUILT_IN_MODEL_TAG,
BUILT_IN_MODEL_TYPE,
DEPLOYMENT_STATE,
DeploymentState,
ELASTIC_MODEL_DEFINITIONS,
ELASTIC_MODEL_TAG,
ELASTIC_MODEL_TYPE,
Expand Down Expand Up @@ -349,7 +350,7 @@ export const ModelsList: FC<Props> = ({
);
if (elasticModels.length > 0) {
for (const model of elasticModels) {
if (model.state === MODEL_STATE.STARTED) {
if (Object.values(DEPLOYMENT_STATE).includes(model.state as DeploymentState)) {
// no need to check for the download status if the model has been deployed
continue;
}
Expand Down

0 comments on commit 0c0c177

Please sign in to comment.