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

[Security Assistant] Fix Knowledge Base index entry form #208268

Merged
merged 8 commits into from
Jan 28, 2025

Conversation

patrykkopycinski
Copy link
Contributor

@patrykkopycinski patrykkopycinski commented Jan 24, 2025

Summary

Fix showing indices with semantic_text fields in Knowledge Base Index entry form

Zrzut ekranu 2025-01-27 o 20 43 43 Zrzut ekranu 2025-01-27 o 20 43 43

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski
Copy link
Contributor Author

/ci

@patrykkopycinski patrykkopycinski changed the title fix index entry form [Security Assistant] Fix Knowledge Base index entry form Jan 27, 2025
@patrykkopycinski patrykkopycinski self-assigned this Jan 27, 2025
@patrykkopycinski patrykkopycinski added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Feature:Security Assistant Security Assistant Team:Security Generative AI Security Generative AI backport:version Backport to applied version labels v8.18.0 labels Jan 27, 2025
@patrykkopycinski patrykkopycinski marked this pull request as ready for review January 28, 2025 03:12
@patrykkopycinski patrykkopycinski requested review from a team as code owners January 28, 2025 03:12
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #1 / createCommonUpdateUserActionBuilder it copies the reference link when clicking the reference button

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
securitySolution 21.3MB 21.3MB -83.0B

History

cc @patrykkopycinski

Copy link
Contributor

@e40pud e40pud left a 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'
Copy link
Contributor

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)) {
Copy link
Contributor

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

Copy link
Contributor Author

@patrykkopycinski patrykkopycinski Jan 28, 2025

Choose a reason for hiding this comment

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

image

@patrykkopycinski patrykkopycinski merged commit 590b4c7 into elastic:main Jan 28, 2025
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 28, 2025
)

## 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)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

@patrykkopycinski patrykkopycinski deleted the fix/index-entry-form branch January 28, 2025 19:15
kibanamachine added a commit that referenced this pull request Jan 28, 2025
…) (#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>
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 Feature:Security Assistant Security Assistant release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants