-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 Fetch user instructions using user_id #200137
Obs AI Assistant Fetch user instructions using user_id #200137
Conversation
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
2cbe5be
to
791b51c
Compare
… for knowledge base instructions
6523db4
to
cc23a7c
Compare
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
|
Starting backport for target branches: 8.x |
## Summary [Obs AI Assistant] Fetch user instructions using id instead of username for knowledge base instructions elastic#192701 To avoid potential collisions when fetching data, we should query for the user id instead of the user name when getting instructions. (cherry picked from commit 518dc25)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
#200759) # Backport This will backport the following commits from `main` to `8.x`: - [Obs AI Assistant Fetch user instructions using user_id (#200137)](#200137) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Arturo Lidueña","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-19T15:16:32Z","message":"Obs AI Assistant Fetch user instructions using user_id (#200137)\n\n## Summary\r\n\r\n[Obs AI Assistant] Fetch user instructions using id instead of username\r\nfor knowledge base instructions #192701\r\n\r\nTo avoid potential collisions when fetching data, we should query for\r\nthe user id instead of the user name when getting instructions.","sha":"518dc2591f845b9e0772d367f71065cd787ad9bf","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-minor","Team:Obs AI Assistant","ci:project-deploy-observability"],"title":"Obs AI Assistant Fetch user instructions using user_id ","number":200137,"url":"https://github.com/elastic/kibana/pull/200137","mergeCommit":{"message":"Obs AI Assistant Fetch user instructions using user_id (#200137)\n\n## Summary\r\n\r\n[Obs AI Assistant] Fetch user instructions using id instead of username\r\nfor knowledge base instructions #192701\r\n\r\nTo avoid potential collisions when fetching data, we should query for\r\nthe user id instead of the user name when getting instructions.","sha":"518dc2591f845b9e0772d367f71065cd787ad9bf"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200137","number":200137,"mergeCommit":{"message":"Obs AI Assistant Fetch user instructions using user_id (#200137)\n\n## Summary\r\n\r\n[Obs AI Assistant] Fetch user instructions using id instead of username\r\nfor knowledge base instructions #192701\r\n\r\nTo avoid potential collisions when fetching data, we should query for\r\nthe user id instead of the user name when getting instructions.","sha":"518dc2591f845b9e0772d367f71065cd787ad9bf"}}]}] BACKPORT--> Co-authored-by: Arturo Lidueña <[email protected]>
## Summary [Obs AI Assistant] Fetch user instructions using id instead of username for knowledge base instructions elastic#192701 To avoid potential collisions when fetching data, we should query for the user id instead of the user name when getting instructions.
await supertestWithoutAuth | ||
.post(endpoint) | ||
.set('kbn-xsrf', 'xxx') | ||
.set('Cookie', cookie) | ||
.send(params.body); |
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.
@arturoliduena Just noticed this while looking at @viduni94's PR. We should aim to use observabilityAIAssistantAPIClient
when possible because it comes with type safety, making it easier to use, and "fails faster" when an endpoint is changed:
const fullConversation = await observabilityAIAssistantAPIClient.noAuth({
endpoint: "GET /internal/observability_ai_assistant/conversation",
params: {
// ...
},
});
noAuth
user doesn't exist but can be created here
## Summary [Obs AI Assistant] Fetch user instructions using id instead of username for knowledge base instructions elastic#192701 To avoid potential collisions when fetching data, we should query for the user id instead of the user name when getting instructions.
Summary
[Obs AI Assistant] Fetch user instructions using id instead of username for knowledge base instructions #192701
To avoid potential collisions when fetching data, we should query for the user id instead of the user name when getting instructions.
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breaking
label should be applied in these situations.release_node:*
label is applied per the guidelines