-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[Obs AI Assistant] Fix re-deploy model timeout and status polling #220445
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
[Obs AI Assistant] Fix re-deploy model timeout and status polling #220445
Conversation
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
x-pack/platform/plugins/shared/observability_ai_assistant/server/service/client/index.ts
Outdated
Show resolved
Hide resolved
@@ -84,7 +84,7 @@ const warmupModelKnowledgeBase = createObservabilityAIAssistantServerRoute({ | |||
requiredPrivileges: ['ai_assistant'], | |||
}, | |||
}, | |||
handler: async (resources): Promise<void> => { | |||
handler: async (resources): Promise<{ currentInferenceId: string }> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currentInferenceId
will always be the same as inferenceId
, right? What's the use case for returning this to the client?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sorenlouv yes, we don't need to return it back. I updated it to just return instead of returning the inferenceId
6ed092f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Just one question about a return value
bdf985b
to
082fbcb
Compare
⏳ Build in-progress
Failed CI StepsHistory
cc @viduni94 |
Starting backport for target branches: 8.19 |
…astic#220445) Closes elastic/obs-ai-assistant-team#247 Closes elastic#217912 ## Summary ### Problems - The `/warmup_model` endpoint doesn't return immediately and waits for the KB to be ready. If there is no ML nodes or sufficient capacity in the ML node, the API can timeout. - Since the endpoint doesn't return immediately, we don't poll for status continuously. - Knowledge base tab doesn't show `Inspect` if no ML nodes are available. ### Solutions - Show `Inspect` information in the knowledge base - Return `/warmup_model` immediately (we don't need to wait for the model to be ready since we are polling), and start polling - If the user refreshes the browser and if the `kbState` is in `DEPLOYING_MODEL` keep polling for status ### Checklist - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) (cherry picked from commit ff3822d)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ing (#220445) (#220591) # Backport This will backport the following commits from `main` to `8.19`: - [[Obs AI Assistant] Fix re-deploy model timeout and status polling (#220445)](#220445) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Viduni Wickramarachchi","email":"viduni.wickramarachchi@elastic.co"},"sourceCommit":{"committedDate":"2025-05-08T21:49:20Z","message":"[Obs AI Assistant] Fix re-deploy model timeout and status polling (#220445)\n\nCloses https://github.com/elastic/obs-ai-assistant-team/issues/247\nCloses https://github.com/elastic/kibana/issues/217912\n\n## Summary\n\n### Problems\n- The `/warmup_model` endpoint doesn't return immediately and waits for\nthe KB to be ready. If there is no ML nodes or sufficient capacity in\nthe ML node, the API can timeout.\n- Since the endpoint doesn't return immediately, we don't poll for\nstatus continuously.\n- Knowledge base tab doesn't show `Inspect` if no ML nodes are\navailable.\n\n### Solutions\n\n- Show `Inspect` information in the knowledge base\n- Return `/warmup_model` immediately (we don't need to wait for the\nmodel to be ready since we are polling), and start polling\n- If the user refreshes the browser and if the `kbState` is in\n`DEPLOYING_MODEL` keep polling for status\n\n### Checklist\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"ff3822d0a34f7d2c9ac00953b9d198be2661f717","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Obs AI Assistant","ci:project-deploy-observability","backport:version","v9.1.0","v8.19.0"],"title":"[Obs AI Assistant] Fix re-deploy model timeout and status polling","number":220445,"url":"https://github.com/elastic/kibana/pull/220445","mergeCommit":{"message":"[Obs AI Assistant] Fix re-deploy model timeout and status polling (#220445)\n\nCloses https://github.com/elastic/obs-ai-assistant-team/issues/247\nCloses https://github.com/elastic/kibana/issues/217912\n\n## Summary\n\n### Problems\n- The `/warmup_model` endpoint doesn't return immediately and waits for\nthe KB to be ready. If there is no ML nodes or sufficient capacity in\nthe ML node, the API can timeout.\n- Since the endpoint doesn't return immediately, we don't poll for\nstatus continuously.\n- Knowledge base tab doesn't show `Inspect` if no ML nodes are\navailable.\n\n### Solutions\n\n- Show `Inspect` information in the knowledge base\n- Return `/warmup_model` immediately (we don't need to wait for the\nmodel to be ready since we are polling), and start polling\n- If the user refreshes the browser and if the `kbState` is in\n`DEPLOYING_MODEL` keep polling for status\n\n### Checklist\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"ff3822d0a34f7d2c9ac00953b9d198be2661f717"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/220445","number":220445,"mergeCommit":{"message":"[Obs AI Assistant] Fix re-deploy model timeout and status polling (#220445)\n\nCloses https://github.com/elastic/obs-ai-assistant-team/issues/247\nCloses https://github.com/elastic/kibana/issues/217912\n\n## Summary\n\n### Problems\n- The `/warmup_model` endpoint doesn't return immediately and waits for\nthe KB to be ready. If there is no ML nodes or sufficient capacity in\nthe ML node, the API can timeout.\n- Since the endpoint doesn't return immediately, we don't poll for\nstatus continuously.\n- Knowledge base tab doesn't show `Inspect` if no ML nodes are\navailable.\n\n### Solutions\n\n- Show `Inspect` information in the knowledge base\n- Return `/warmup_model` immediately (we don't need to wait for the\nmodel to be ready since we are polling), and start polling\n- If the user refreshes the browser and if the `kbState` is in\n`DEPLOYING_MODEL` keep polling for status\n\n### Checklist\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"ff3822d0a34f7d2c9ac00953b9d198be2661f717"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
…astic#220445) Closes elastic/obs-ai-assistant-team#247 Closes elastic#217912 ## Summary ### Problems - The `/warmup_model` endpoint doesn't return immediately and waits for the KB to be ready. If there is no ML nodes or sufficient capacity in the ML node, the API can timeout. - Since the endpoint doesn't return immediately, we don't poll for status continuously. - Knowledge base tab doesn't show `Inspect` if no ML nodes are available. ### Solutions - Show `Inspect` information in the knowledge base - Return `/warmup_model` immediately (we don't need to wait for the model to be ready since we are polling), and start polling - If the user refreshes the browser and if the `kbState` is in `DEPLOYING_MODEL` keep polling for status ### Checklist - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
…astic#220445) Closes elastic/obs-ai-assistant-team#247 Closes elastic#217912 ## Summary ### Problems - The `/warmup_model` endpoint doesn't return immediately and waits for the KB to be ready. If there is no ML nodes or sufficient capacity in the ML node, the API can timeout. - Since the endpoint doesn't return immediately, we don't poll for status continuously. - Knowledge base tab doesn't show `Inspect` if no ML nodes are available. ### Solutions - Show `Inspect` information in the knowledge base - Return `/warmup_model` immediately (we don't need to wait for the model to be ready since we are polling), and start polling - If the user refreshes the browser and if the `kbState` is in `DEPLOYING_MODEL` keep polling for status ### Checklist - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
…astic#220445) Closes elastic/obs-ai-assistant-team#247 Closes elastic#217912 ## Summary ### Problems - The `/warmup_model` endpoint doesn't return immediately and waits for the KB to be ready. If there is no ML nodes or sufficient capacity in the ML node, the API can timeout. - Since the endpoint doesn't return immediately, we don't poll for status continuously. - Knowledge base tab doesn't show `Inspect` if no ML nodes are available. ### Solutions - Show `Inspect` information in the knowledge base - Return `/warmup_model` immediately (we don't need to wait for the model to be ready since we are polling), and start polling - If the user refreshes the browser and if the `kbState` is in `DEPLOYING_MODEL` keep polling for status ### Checklist - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Closes https://github.com/elastic/obs-ai-assistant-team/issues/247
Closes #217912
Summary
Problems
/warmup_model
endpoint doesn't return immediately and waits for the KB to be ready. If there is no ML nodes or sufficient capacity in the ML node, the API can timeout.Inspect
if no ML nodes are available.Solutions
Inspect
information in the knowledge base/warmup_model
immediately (we don't need to wait for the model to be ready since we are polling), and start pollingkbState
is inDEPLOYING_MODEL
keep polling for statusChecklist
release_note:*
label is applied per the guidelines