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

[Search][Index Management] Removing Model deployment from Kibana #198409

Conversation

Samiul-TheSoccerFan
Copy link
Contributor

@Samiul-TheSoccerFan Samiul-TheSoccerFan commented Oct 30, 2024

Summary

Clicking on the Try Again button tries to redeploy and receives an error. We tried to disable the Try Again button if there are no errors in deployment stage.

Before

with-errors.mov

After

without-error-message.mov

@Samiul-TheSoccerFan Samiul-TheSoccerFan added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Search v8.16.0 backport:version Backport to applied version labels v8.17.0 labels Oct 30, 2024
@Samiul-TheSoccerFan Samiul-TheSoccerFan requested a review from a team as a code owner October 30, 2024 17:00
@Samiul-TheSoccerFan
Copy link
Contributor Author

@elasticmachine merge upstream

@Samiul-TheSoccerFan Samiul-TheSoccerFan enabled auto-merge (squash) October 30, 2024 20:03
@Samiul-TheSoccerFan
Copy link
Contributor Author

@elasticmachine merge upstream

@Samiul-TheSoccerFan
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@ElenaStoeva ElenaStoeva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Samiul-TheSoccerFan, it seems that with the added logic, the button will always be disabled even after the model is successfully deployed. I tested it and IMO, from a user's perspective, it looks as if the "Try again" button is to try saving the mappings again instead of trying to redeploy the model, so it gets confusing why the button stays disabled after the model is deployed:

Screen.Recording.2024-10-31.at.17.28.06.mov

Wouldn't it be better if we enable the button if the model is deployed (not sure if there is an easy way to check this)?
Also, could you please add in the PR description a link to a related issue (if there's one) and add test instructions since we have new members in @elastic/kibana-management who might not be familiar with the semantic text functionality.

@Mikep86
Copy link
Contributor

Mikep86 commented Oct 31, 2024

@ElenaStoeva We discussed offline and this PR should not be merged as-is. As you noticed, the "Try Again" button is disabled after a successful model deployment and there is no way for the user to dismiss the modal besides clicking "Cancel".

Copy link
Contributor

@Mikep86 Mikep86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change the implementation to enable users to dismiss the modal after a successful model deployment.

@Samiul-TheSoccerFan
Copy link
Contributor Author

@ElenaStoeva : I added the test scenarios that might help test this PR. I also added you in the slack thread

@Samiul-TheSoccerFan Samiul-TheSoccerFan changed the title Disabling try again button while model is still deploying [Search][Index Management] Removing Model deployment from Kibana Nov 6, 2024
@Samiul-TheSoccerFan
Copy link
Contributor Author

@elasticmachine merge upstream

@Samiul-TheSoccerFan
Copy link
Contributor Author

@elasticmachine merge upstream

@@ -104,7 +104,7 @@ export const useDetailsPageMappingsModelManagement = () => {
Record<string, TrainedModelStat['deployment_stats'] | undefined>
>((acc, { model_id: modelId, deployment_stats: stats }) => {
if (modelId && stats) {
acc[stats.deployment_id] = stats;
acc[modelId] = stats;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct. Semantic text models should be referenced by their deployment ID, not their model ID, because they only reference the model ID with the deployment ID that is identical to the inference endpoint name.

@@ -34,9 +34,9 @@ const getCustomInferenceIdMap = (
? {
trainedModelId: model.service_settings.model_id,
isDeployable: model.service === Service.elser || model.service === Service.elasticsearch,
isDeployed: modelStatsById[model.inference_id]?.state === 'started',
isDeployed: modelStatsById[model.service_settings.model_id]?.state === 'started',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct. We should be looking at the inference ID, because we don't care about the model in general, we care about the deployment of the model that is specific to the inference ID.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexManagement 690.3KB 689.7KB -626.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
indexManagement 16 15 -1

Total ESLint disabled count

id before after diff
indexManagement 19 18 -1

History

Copy link
Member

@sphilipse sphilipse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, approved!

@Samiul-TheSoccerFan
Copy link
Contributor Author

Removing @Mikep86 from the reviewers list as he is currently on PTO, and this PR needs to be merged in time for the release.

@Samiul-TheSoccerFan Samiul-TheSoccerFan requested review from ElenaStoeva and removed request for Mikep86 November 6, 2024 15:46
Copy link
Contributor

@ElenaStoeva ElenaStoeva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested again and it works well. Changes also lgtm.

@Samiul-TheSoccerFan Samiul-TheSoccerFan merged commit bc313f4 into elastic:main Nov 6, 2024
25 checks passed
@Samiul-TheSoccerFan Samiul-TheSoccerFan deleted the fix-model-redeploying-issue branch November 6, 2024 18:04
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11709304493

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 6, 2024
…stic#198409)

## Summary

Clicking on the `Try Again` button tries to redeploy and receives an
error. We tried to disable the `Try Again` button if there are no errors
in deployment stage.

### Before

https://github.com/user-attachments/assets/b1c7b7ce-afba-42ba-a958-d9ad7cbc8777

### After

https://github.com/user-attachments/assets/15ca3a78-a1fc-4079-8ab6-f4b54e7ed333

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit bc313f4)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 6, 2024
…stic#198409)

## Summary

Clicking on the `Try Again` button tries to redeploy and receives an
error. We tried to disable the `Try Again` button if there are no errors
in deployment stage.

### Before

https://github.com/user-attachments/assets/b1c7b7ce-afba-42ba-a958-d9ad7cbc8777

### After

https://github.com/user-attachments/assets/15ca3a78-a1fc-4079-8ab6-f4b54e7ed333

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit bc313f4)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 6, 2024
…na (#198409) (#199201)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Search][Index Management] Removing Model deployment from Kibana
(#198409)](#198409)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Samiul
Monir","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T18:04:24Z","message":"[Search][Index
Management] Removing Model deployment from Kibana (#198409)\n\n##
Summary\r\n\r\nClicking on the `Try Again` button tries to redeploy and
receives an\r\nerror. We tried to disable the `Try Again` button if
there are no errors\r\nin deployment stage.\r\n\r\n\r\n###
Before\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b1c7b7ce-afba-42ba-a958-d9ad7cbc8777\r\n\r\n###
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/15ca3a78-a1fc-4079-8ab6-f4b54e7ed333\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"bc313f4b48680624a0f778eb02eb10158f604a15","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","v8.16.0","backport:version","v8.17.0"],"title":"[Search][Index
Management] Removing Model deployment from
Kibana","number":198409,"url":"https://github.com/elastic/kibana/pull/198409","mergeCommit":{"message":"[Search][Index
Management] Removing Model deployment from Kibana (#198409)\n\n##
Summary\r\n\r\nClicking on the `Try Again` button tries to redeploy and
receives an\r\nerror. We tried to disable the `Try Again` button if
there are no errors\r\nin deployment stage.\r\n\r\n\r\n###
Before\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b1c7b7ce-afba-42ba-a958-d9ad7cbc8777\r\n\r\n###
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/15ca3a78-a1fc-4079-8ab6-f4b54e7ed333\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"bc313f4b48680624a0f778eb02eb10158f604a15"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198409","number":198409,"mergeCommit":{"message":"[Search][Index
Management] Removing Model deployment from Kibana (#198409)\n\n##
Summary\r\n\r\nClicking on the `Try Again` button tries to redeploy and
receives an\r\nerror. We tried to disable the `Try Again` button if
there are no errors\r\nin deployment stage.\r\n\r\n\r\n###
Before\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b1c7b7ce-afba-42ba-a958-d9ad7cbc8777\r\n\r\n###
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/15ca3a78-a1fc-4079-8ab6-f4b54e7ed333\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"bc313f4b48680624a0f778eb02eb10158f604a15"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Samiul Monir <[email protected]>
kibanamachine added a commit that referenced this pull request Nov 6, 2024
#198409) (#199202)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Search][Index Management] Removing Model deployment from Kibana
(#198409)](#198409)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Samiul
Monir","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T18:04:24Z","message":"[Search][Index
Management] Removing Model deployment from Kibana (#198409)\n\n##
Summary\r\n\r\nClicking on the `Try Again` button tries to redeploy and
receives an\r\nerror. We tried to disable the `Try Again` button if
there are no errors\r\nin deployment stage.\r\n\r\n\r\n###
Before\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b1c7b7ce-afba-42ba-a958-d9ad7cbc8777\r\n\r\n###
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/15ca3a78-a1fc-4079-8ab6-f4b54e7ed333\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"bc313f4b48680624a0f778eb02eb10158f604a15","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","v8.16.0","backport:version","v8.17.0"],"title":"[Search][Index
Management] Removing Model deployment from
Kibana","number":198409,"url":"https://github.com/elastic/kibana/pull/198409","mergeCommit":{"message":"[Search][Index
Management] Removing Model deployment from Kibana (#198409)\n\n##
Summary\r\n\r\nClicking on the `Try Again` button tries to redeploy and
receives an\r\nerror. We tried to disable the `Try Again` button if
there are no errors\r\nin deployment stage.\r\n\r\n\r\n###
Before\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b1c7b7ce-afba-42ba-a958-d9ad7cbc8777\r\n\r\n###
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/15ca3a78-a1fc-4079-8ab6-f4b54e7ed333\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"bc313f4b48680624a0f778eb02eb10158f604a15"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198409","number":198409,"mergeCommit":{"message":"[Search][Index
Management] Removing Model deployment from Kibana (#198409)\n\n##
Summary\r\n\r\nClicking on the `Try Again` button tries to redeploy and
receives an\r\nerror. We tried to disable the `Try Again` button if
there are no errors\r\nin deployment stage.\r\n\r\n\r\n###
Before\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b1c7b7ce-afba-42ba-a958-d9ad7cbc8777\r\n\r\n###
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/15ca3a78-a1fc-4079-8ab6-f4b54e7ed333\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"bc313f4b48680624a0f778eb02eb10158f604a15"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Samiul Monir <[email protected]>
mgadewoll pushed a commit to mgadewoll/kibana that referenced this pull request Nov 7, 2024
…stic#198409)

## Summary

Clicking on the `Try Again` button tries to redeploy and receives an
error. We tried to disable the `Try Again` button if there are no errors
in deployment stage.


### Before


https://github.com/user-attachments/assets/b1c7b7ce-afba-42ba-a958-d9ad7cbc8777

### After


https://github.com/user-attachments/assets/15ca3a78-a1fc-4079-8ab6-f4b54e7ed333

---------

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Search v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants