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 Solution] [Bug] Incorrect message as Duplicate entry? shown on creating New Knowledge Base index. #198892

Closed
arvindersingh-qasource opened this issue Nov 5, 2024 · 8 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience fixed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. QA:Validated Issue has been validated by QA Team:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. triage_needed v8.16.0

Comments

@arvindersingh-qasource
Copy link

Describe the bug
Incorrect message as Duplicate entry? shown on creating New Knowledge Base index.

Kibana/Elasticsearch Stack version

VERSION: 8.16.0 BC3
BUILD: 79556
COMMIT: f02d1303b5230c357ac7e4c49c8adadd5f66af38

Pre Conditions

  1. Kibana v8.16.0 build be must be available
  2. AI Connector must be configured.
  3. Custom Knowledge Base Index with sharing as Global must be available.
  4. Below mentioned xpack must be enabled in Kibana
xpack.securitySolution.enableExperimental:
  - 'assistantKnowledgeBaseByDefault'

Steps

  1. Navigate to Management -> AI Assistant - Knowledge Base
  2. For pre requisite Custom Knowledge Base Index with Sharing as Private , click on ✏ icon to edit Index.
  3. Switch Sharing from Global to Private.
  4. Click on Save button.
  5. Observe that there will be a confirmation message for duplicate entry creation.
  6. Click on Save button and a new Index will be created.
  7. Now, Click on New and select Index.
  8. Enter Name , Sharing , Index , Field , Data Description , Query Instruction , Output Fields .
  9. Click on on Save button.
  10. Observe that again there will be an message as Duplicate entry? shown on creating every New Knowledge Base index.

Expected Result
There should be no message as Duplicate entry? shown on creating every New Knowledge Base index even after creating a duplicate entry by switching Sharing of already present Index from Global to Private.

Screen Recording

Security.AI.settings.-.Elastic.-.Google.Chrome.2024-11-05.13-24-53.mp4
@arvindersingh-qasource arvindersingh-qasource added bug Fixes for quality problems that affect the customer experience impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. triage_needed v8.16.0 labels Nov 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@arvindersingh-qasource
Copy link
Author

@muskangulati-qasource Please review this ticket.

Thanks.

@muskangulati-qasource
Copy link

Reviewed and assigned to @MadameSheema

@muskangulati-qasource muskangulati-qasource added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. and removed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Nov 5, 2024
@MadameSheema MadameSheema added the Team:Security Generative AI Security Generative AI label Nov 5, 2024
@jamesspi
Copy link

jamesspi commented Nov 5, 2024

Thanks. @e40pud could you take a look please?

@e40pud
Copy link
Contributor

e40pud commented Nov 5, 2024

Here is the fix #199045

e40pud added a commit that referenced this issue Nov 5, 2024
…on creating New Knowledge Base index. (#198892) (#199045)

## Summary

BUG: #198892

This PR fixes the BUG where we would show `Duplicate entry?`
confirmation modal on new document creation. This happens because the
state is not being reset properly on flyout close and we use previous
values in the new entry creation flow.

### To test

1. Create a global entry (document or index)
2. Edit the entry from 1
3. Switch global to private
4. Save entry => This will trigger `Duplicate entry?` confirmation modal
(save it)
5. Press `New > Index/Document`
6. Fill out required fields
7. Press `Save` button

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 5, 2024
…on creating New Knowledge Base index. (elastic#198892) (elastic#199045)

## Summary

BUG: elastic#198892

This PR fixes the BUG where we would show `Duplicate entry?`
confirmation modal on new document creation. This happens because the
state is not being reset properly on flyout close and we use previous
values in the new entry creation flow.

### To test

1. Create a global entry (document or index)
2. Edit the entry from 1
3. Switch global to private
4. Save entry => This will trigger `Duplicate entry?` confirmation modal
(save it)
5. Press `New > Index/Document`
6. Fill out required fields
7. Press `Save` button

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 8ebe788)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 5, 2024
…on creating New Knowledge Base index. (elastic#198892) (elastic#199045)

## Summary

BUG: elastic#198892

This PR fixes the BUG where we would show `Duplicate entry?`
confirmation modal on new document creation. This happens because the
state is not being reset properly on flyout close and we use previous
values in the new entry creation flow.

### To test

1. Create a global entry (document or index)
2. Edit the entry from 1
3. Switch global to private
4. Save entry => This will trigger `Duplicate entry?` confirmation modal
(save it)
5. Press `New > Index/Document`
6. Fill out required fields
7. Press `Save` button

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 8ebe788)
kibanamachine added a commit that referenced this issue Nov 5, 2024
…shown on creating New Knowledge Base index. (#198892) (#199045) (#199063)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution][Bug] Incorrect message as Duplicate entry? shown
on creating New Knowledge Base index. (#198892)
(#199045)](#199045)

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

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

<!--BACKPORT [{"author":{"name":"Ievgen
Sorokopud","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-05T21:57:30Z","message":"[Security
Solution][Bug] Incorrect message as Duplicate entry? shown on creating
New Knowledge Base index. (#198892) (#199045)\n\n## Summary\r\n\r\nBUG:
https://github.com/elastic/kibana/issues/198892\r\n\r\nThis PR fixes the
BUG where we would show `Duplicate entry?`\r\nconfirmation modal on new
document creation. This happens because the\r\nstate is not being reset
properly on flyout close and we use previous\r\nvalues in the new entry
creation flow.\r\n\r\n### To test\r\n\r\n1. Create a global entry
(document or index)\r\n2. Edit the entry from 1\r\n3. Switch global to
private\r\n4. Save entry => This will trigger `Duplicate entry?`
confirmation modal\r\n(save it)\r\n5. Press `New > Index/Document`\r\n6.
Fill out required fields\r\n7. Press `Save` button\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"8ebe78857b11a20f4be5cdfbeb6b38897f270f19","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:
SecuritySolution","Team:Security Generative
AI","v8.16.0","backport:version","v8.17.0"],"title":"[Security
Solution][Bug] Incorrect message as Duplicate entry? shown on creating
New Knowledge Base index.
(#198892)","number":199045,"url":"https://github.com/elastic/kibana/pull/199045","mergeCommit":{"message":"[Security
Solution][Bug] Incorrect message as Duplicate entry? shown on creating
New Knowledge Base index. (#198892) (#199045)\n\n## Summary\r\n\r\nBUG:
https://github.com/elastic/kibana/issues/198892\r\n\r\nThis PR fixes the
BUG where we would show `Duplicate entry?`\r\nconfirmation modal on new
document creation. This happens because the\r\nstate is not being reset
properly on flyout close and we use previous\r\nvalues in the new entry
creation flow.\r\n\r\n### To test\r\n\r\n1. Create a global entry
(document or index)\r\n2. Edit the entry from 1\r\n3. Switch global to
private\r\n4. Save entry => This will trigger `Duplicate entry?`
confirmation modal\r\n(save it)\r\n5. Press `New > Index/Document`\r\n6.
Fill out required fields\r\n7. Press `Save` button\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"8ebe78857b11a20f4be5cdfbeb6b38897f270f19"}},"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/199045","number":199045,"mergeCommit":{"message":"[Security
Solution][Bug] Incorrect message as Duplicate entry? shown on creating
New Knowledge Base index. (#198892) (#199045)\n\n## Summary\r\n\r\nBUG:
https://github.com/elastic/kibana/issues/198892\r\n\r\nThis PR fixes the
BUG where we would show `Duplicate entry?`\r\nconfirmation modal on new
document creation. This happens because the\r\nstate is not being reset
properly on flyout close and we use previous\r\nvalues in the new entry
creation flow.\r\n\r\n### To test\r\n\r\n1. Create a global entry
(document or index)\r\n2. Edit the entry from 1\r\n3. Switch global to
private\r\n4. Save entry => This will trigger `Duplicate entry?`
confirmation modal\r\n(save it)\r\n5. Press `New > Index/Document`\r\n6.
Fill out required fields\r\n7. Press `Save` button\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"8ebe78857b11a20f4be5cdfbeb6b38897f270f19"}},{"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: Ievgen Sorokopud <[email protected]>
kibanamachine added a commit that referenced this issue Nov 5, 2024
… shown on creating New Knowledge Base index. (#198892) (#199045) (#199062)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Security Solution][Bug] Incorrect message as Duplicate entry? shown
on creating New Knowledge Base index. (#198892)
(#199045)](#199045)

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

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

<!--BACKPORT [{"author":{"name":"Ievgen
Sorokopud","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-05T21:57:30Z","message":"[Security
Solution][Bug] Incorrect message as Duplicate entry? shown on creating
New Knowledge Base index. (#198892) (#199045)\n\n## Summary\r\n\r\nBUG:
https://github.com/elastic/kibana/issues/198892\r\n\r\nThis PR fixes the
BUG where we would show `Duplicate entry?`\r\nconfirmation modal on new
document creation. This happens because the\r\nstate is not being reset
properly on flyout close and we use previous\r\nvalues in the new entry
creation flow.\r\n\r\n### To test\r\n\r\n1. Create a global entry
(document or index)\r\n2. Edit the entry from 1\r\n3. Switch global to
private\r\n4. Save entry => This will trigger `Duplicate entry?`
confirmation modal\r\n(save it)\r\n5. Press `New > Index/Document`\r\n6.
Fill out required fields\r\n7. Press `Save` button\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"8ebe78857b11a20f4be5cdfbeb6b38897f270f19","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:
SecuritySolution","Team:Security Generative
AI","v8.16.0","backport:version","v8.17.0"],"title":"[Security
Solution][Bug] Incorrect message as Duplicate entry? shown on creating
New Knowledge Base index.
(#198892)","number":199045,"url":"https://github.com/elastic/kibana/pull/199045","mergeCommit":{"message":"[Security
Solution][Bug] Incorrect message as Duplicate entry? shown on creating
New Knowledge Base index. (#198892) (#199045)\n\n## Summary\r\n\r\nBUG:
https://github.com/elastic/kibana/issues/198892\r\n\r\nThis PR fixes the
BUG where we would show `Duplicate entry?`\r\nconfirmation modal on new
document creation. This happens because the\r\nstate is not being reset
properly on flyout close and we use previous\r\nvalues in the new entry
creation flow.\r\n\r\n### To test\r\n\r\n1. Create a global entry
(document or index)\r\n2. Edit the entry from 1\r\n3. Switch global to
private\r\n4. Save entry => This will trigger `Duplicate entry?`
confirmation modal\r\n(save it)\r\n5. Press `New > Index/Document`\r\n6.
Fill out required fields\r\n7. Press `Save` button\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"8ebe78857b11a20f4be5cdfbeb6b38897f270f19"}},"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/199045","number":199045,"mergeCommit":{"message":"[Security
Solution][Bug] Incorrect message as Duplicate entry? shown on creating
New Knowledge Base index. (#198892) (#199045)\n\n## Summary\r\n\r\nBUG:
https://github.com/elastic/kibana/issues/198892\r\n\r\nThis PR fixes the
BUG where we would show `Duplicate entry?`\r\nconfirmation modal on new
document creation. This happens because the\r\nstate is not being reset
properly on flyout close and we use previous\r\nvalues in the new entry
creation flow.\r\n\r\n### To test\r\n\r\n1. Create a global entry
(document or index)\r\n2. Edit the entry from 1\r\n3. Switch global to
private\r\n4. Save entry => This will trigger `Duplicate entry?`
confirmation modal\r\n(save it)\r\n5. Press `New > Index/Document`\r\n6.
Fill out required fields\r\n7. Press `Save` button\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"8ebe78857b11a20f4be5cdfbeb6b38897f270f19"}},{"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: Ievgen Sorokopud <[email protected]>
@MadameSheema
Copy link
Member

@arvindersingh-qasource please validate the fix when BC4 is available. Thanks! :)

mgadewoll pushed a commit to mgadewoll/kibana that referenced this issue Nov 7, 2024
…on creating New Knowledge Base index. (elastic#198892) (elastic#199045)

## Summary

BUG: elastic#198892

This PR fixes the BUG where we would show `Duplicate entry?`
confirmation modal on new document creation. This happens because the
state is not being reset properly on flyout close and we use previous
values in the new entry creation flow.

### To test

1. Create a global entry (document or index)
2. Edit the entry from 1
3. Switch global to private
4. Save entry => This will trigger `Duplicate entry?` confirmation modal
(save it)
5. Press `New > Index/Document`
6. Fill out required fields
7. Press `Save` button

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
@MadameSheema
Copy link
Member

@arvindersingh-qasource @muskangulati-qasource can you please validate the fix on the latest BC?

@muskangulati-qasource
Copy link

Hi @MadameSheema,

We have tested this ticket on the latest 8.16.0 BC5 build and found the issue is now fixed 🟢

Please find below the testing details:

Build details

VERSION: 8.16.0
BUILD: 79644
COMMIT: a8a07dfc586d78b8f4b7997b00e126363d68c043

Screen Recording

Security.AI.settings.mp4

Hence, we are closing this issue and marking it as 'QA Validated'.

Thanks!

@muskangulati-qasource muskangulati-qasource added the QA:Validated Issue has been validated by QA label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience fixed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. QA:Validated Issue has been validated by QA Team:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. triage_needed v8.16.0
Projects
None yet
Development

No branches or pull requests

7 participants