-
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
[Security Assistant] Fix Knowledge Base index entry form #208268
[Security Assistant] Fix Knowledge Base index entry form #208268
Conversation
/ci |
/ci |
…bana into fix/index-entry-form
/ci |
/ci |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
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! Left couple comments
if (value.type === 'semantic_text') { | ||
paths.push( | ||
newPath.filter( | ||
(pathPart) => pathPart !== 'properties' && pathPart !== 'mappings' |
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.
are properties
and mappings
both reserved names and never can be field names?
let paths: string[][] = []; | ||
|
||
for (const key in obj) { | ||
if (Object.prototype.hasOwnProperty.call(obj, key)) { |
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.
Just curious why we need to do Object.prototype.hasOwnProperty
check here and at line 105
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.
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/13016463867 |
) ## Summary Fix showing indices with `semantic_text` fields in Knowledge Base Index entry form <img width="1751" alt="Zrzut ekranu 2025-01-27 o 20 43 43" src="https://github.com/user-attachments/assets/f4cb0364-3228-4909-84be-a5bcca00943a" /> <img width="1751" alt="Zrzut ekranu 2025-01-27 o 20 43 43" src="https://github.com/user-attachments/assets/02d80c11-f40b-4ac7-8906-2f11ab75f20d" /> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 590b4c7)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…) (#208589) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Assistant] Fix Knowledge Base index entry form (#208268)](#208268) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Patryk Kopyciński","email":"contact@patrykkopycinski.com"},"sourceCommit":{"committedDate":"2025-01-28T17:50:31Z","message":"[Security Assistant] Fix Knowledge Base index entry form (#208268)\n\n## Summary\r\n\r\nFix showing indices with `semantic_text` fields in Knowledge Base Index\r\nentry form\r\n\r\n<img width=\"1751\" alt=\"Zrzut ekranu 2025-01-27 o 20 43 43\"\r\nsrc=\"https://github.com/user-attachments/assets/f4cb0364-3228-4909-84be-a5bcca00943a\"\r\n/>\r\n\r\n<img width=\"1751\" alt=\"Zrzut ekranu 2025-01-27 o 20 43 43\"\r\nsrc=\"https://github.com/user-attachments/assets/02d80c11-f40b-4ac7-8906-2f11ab75f20d\"\r\n/>\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"590b4c7fb1123e6241243c6fb6a13aec4073fcd8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Feature:Security Assistant","Team:Security Generative AI","backport:version","v8.18.0"],"title":"[Security Assistant] Fix Knowledge Base index entry form","number":208268,"url":"https://github.com/elastic/kibana/pull/208268","mergeCommit":{"message":"[Security Assistant] Fix Knowledge Base index entry form (#208268)\n\n## Summary\r\n\r\nFix showing indices with `semantic_text` fields in Knowledge Base Index\r\nentry form\r\n\r\n<img width=\"1751\" alt=\"Zrzut ekranu 2025-01-27 o 20 43 43\"\r\nsrc=\"https://github.com/user-attachments/assets/f4cb0364-3228-4909-84be-a5bcca00943a\"\r\n/>\r\n\r\n<img width=\"1751\" alt=\"Zrzut ekranu 2025-01-27 o 20 43 43\"\r\nsrc=\"https://github.com/user-attachments/assets/02d80c11-f40b-4ac7-8906-2f11ab75f20d\"\r\n/>\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"590b4c7fb1123e6241243c6fb6a13aec4073fcd8"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208268","number":208268,"mergeCommit":{"message":"[Security Assistant] Fix Knowledge Base index entry form (#208268)\n\n## Summary\r\n\r\nFix showing indices with `semantic_text` fields in Knowledge Base Index\r\nentry form\r\n\r\n<img width=\"1751\" alt=\"Zrzut ekranu 2025-01-27 o 20 43 43\"\r\nsrc=\"https://github.com/user-attachments/assets/f4cb0364-3228-4909-84be-a5bcca00943a\"\r\n/>\r\n\r\n<img width=\"1751\" alt=\"Zrzut ekranu 2025-01-27 o 20 43 43\"\r\nsrc=\"https://github.com/user-attachments/assets/02d80c11-f40b-4ac7-8906-2f11ab75f20d\"\r\n/>\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"590b4c7fb1123e6241243c6fb6a13aec4073fcd8"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
Summary
Fix showing indices with
semantic_text
fields in Knowledge Base Index entry form