-
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
[Epic] Knowledge Base - API integration tests (#8737) #197290
[Epic] Knowledge Base - API integration tests (#8737) #197290
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
@@ -117,8 +117,13 @@ export class DocumentsDataWriter implements DocumentsDataWriter { | |||
{ | |||
bool: { | |||
must_not: { | |||
exists: { | |||
field: 'users', | |||
nested: { |
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.
Since users
field is nested we should use that in the query otherwise it does nothing.
@@ -241,9 +294,10 @@ export const bulkActionKnowledgeBaseEntriesRoute = (router: ElasticAssistantPlug | |||
|
|||
return buildBulkResponse(response, { | |||
// @ts-ignore-next-line TS2322 | |||
updated: docsUpdated, | |||
updated: transformESToKnowledgeBase(docsUpdated), |
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.
The schema expectation is to return updated
as an array of KnowledgeBaseEntryResponse
, so we need to do this transformation.
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7208[✅] x-pack/test/security_solution_api_integration/test_suites/genai/knowledge_base/entries/trial_license_complete_tier/configs/ess.config.ts: 100/100 tests passed. |
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
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]
History
cc @e40pud |
Starting backport for target branches: 8.16, 8.x https://github.com/elastic/kibana/actions/runs/11487198124 |
…#197290) ## Summary This is a followup to the main Knowledge Base changes where we've: 1. Fixed the issue with access control to KB entries via bulk actions APIs 2. Added the RBAC validation for the bulk actions API 3. Added integration tests to cover the bulk actions API ### 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 - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - Genai KB integration tests: [100 ESS + 100 Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7208) --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit fd53861)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
…#197290) ## Summary This is a followup to the main Knowledge Base changes where we've: 1. Fixed the issue with access control to KB entries via bulk actions APIs 2. Added the RBAC validation for the bulk actions API 3. Added integration tests to cover the bulk actions API ### 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 - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - Genai KB integration tests: [100 ESS + 100 Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7208) --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit fd53861) # Conflicts: # x-pack/test/security_solution_api_integration/tsconfig.json
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…#197525) # Backport This will backport the following commits from `main` to `8.x`: - [[Epic] Knowledge Base - API integration tests (#8737) (#197290)](#197290) <!--- 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-10-23T19:58:09Z","message":"[Epic] Knowledge Base - API integration tests (#8737) (#197290)\n\n## Summary\r\n\r\nThis is a followup to the main Knowledge Base changes where we've:\r\n1. Fixed the issue with access control to KB entries via bulk actions\r\nAPIs\r\n2. Added the RBAC validation for the bulk actions API\r\n3. Added integration tests to cover the bulk actions API\r\n\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\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- Genai KB integration tests: [100 ESS + 100\r\nServerless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7208)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"fd538614631c85c7cd3580e7d3270b9d38c57713","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","backport:prev-minor","Feature:Security Assistant","Team:Security Generative AI","v8.16.0"],"title":"[Epic] Knowledge Base - API integration tests (#8737)","number":197290,"url":"https://github.com/elastic/kibana/pull/197290","mergeCommit":{"message":"[Epic] Knowledge Base - API integration tests (#8737) (#197290)\n\n## Summary\r\n\r\nThis is a followup to the main Knowledge Base changes where we've:\r\n1. Fixed the issue with access control to KB entries via bulk actions\r\nAPIs\r\n2. Added the RBAC validation for the bulk actions API\r\n3. Added integration tests to cover the bulk actions API\r\n\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\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- Genai KB integration tests: [100 ESS + 100\r\nServerless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7208)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"fd538614631c85c7cd3580e7d3270b9d38c57713"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197290","number":197290,"mergeCommit":{"message":"[Epic] Knowledge Base - API integration tests (#8737) (#197290)\n\n## Summary\r\n\r\nThis is a followup to the main Knowledge Base changes where we've:\r\n1. Fixed the issue with access control to KB entries via bulk actions\r\nAPIs\r\n2. Added the RBAC validation for the bulk actions API\r\n3. Added integration tests to cover the bulk actions API\r\n\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\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- Genai KB integration tests: [100 ESS + 100\r\nServerless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7208)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"fd538614631c85c7cd3580e7d3270b9d38c57713"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Ievgen Sorokopud <[email protected]>
#197528) # Backport This will backport the following commits from `main` to `8.16`: - [[Epic] Knowledge Base - API integration tests (#8737) (#197290)](#197290) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ievgen Sorokopud","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-23T19:58:09Z","message":"[Epic] Knowledge Base - API integration tests (#8737) (#197290)\n\n## Summary\r\n\r\nThis is a followup to the main Knowledge Base changes where we've:\r\n1. Fixed the issue with access control to KB entries via bulk actions\r\nAPIs\r\n2. Added the RBAC validation for the bulk actions API\r\n3. Added integration tests to cover the bulk actions API\r\n\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\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- Genai KB integration tests: [100 ESS + 100\r\nServerless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7208)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"fd538614631c85c7cd3580e7d3270b9d38c57713","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","backport:prev-minor","Feature:Security Assistant","Team:Security Generative AI","v8.16.0"],"number":197290,"url":"https://github.com/elastic/kibana/pull/197290","mergeCommit":{"message":"[Epic] Knowledge Base - API integration tests (#8737) (#197290)\n\n## Summary\r\n\r\nThis is a followup to the main Knowledge Base changes where we've:\r\n1. Fixed the issue with access control to KB entries via bulk actions\r\nAPIs\r\n2. Added the RBAC validation for the bulk actions API\r\n3. Added integration tests to cover the bulk actions API\r\n\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\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- Genai KB integration tests: [100 ESS + 100\r\nServerless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7208)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"fd538614631c85c7cd3580e7d3270b9d38c57713"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197290","number":197290,"mergeCommit":{"message":"[Epic] Knowledge Base - API integration tests (#8737) (#197290)\n\n## Summary\r\n\r\nThis is a followup to the main Knowledge Base changes where we've:\r\n1. Fixed the issue with access control to KB entries via bulk actions\r\nAPIs\r\n2. Added the RBAC validation for the bulk actions API\r\n3. Added integration tests to cover the bulk actions API\r\n\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\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- Genai KB integration tests: [100 ESS + 100\r\nServerless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7208)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"fd538614631c85c7cd3580e7d3270b9d38c57713"}},{"branch":"8.16","label":"v8.16.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"url":"https://github.com/elastic/kibana/pull/197525","number":197525,"branch":"8.x","state":"OPEN"}]}] BACKPORT-->
Summary
This is a followup to the main Knowledge Base changes where we've:
Checklist
Delete any items that are not applicable to this PR.