[Epic] Knowledge Base - API integration tests (#8737)#197290
[Epic] Knowledge Base - API integration tests (#8737)#197290e40pud merged 4 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
| must_not: { | ||
| exists: { | ||
| field: 'users', | ||
| nested: { |
There was a problem hiding this comment.
Since users field is nested we should use that in the query otherwise it does nothing.
| return buildBulkResponse(response, { | ||
| // @ts-ignore-next-line TS2322 | ||
| updated: docsUpdated, | ||
| updated: transformESToKnowledgeBase(docsUpdated), |
There was a problem hiding this comment.
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. |
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]
History
cc @e40pud |
|
Starting backport for target branches: 8.16, 8.x |
…#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 <42973632+kibanamachine@users.noreply.github.com> (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 <42973632+kibanamachine@users.noreply.github.com> (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":"ievgen.sorokopud@elastic.co"},"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 <42973632+kibanamachine@users.noreply.github.com>","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 <42973632+kibanamachine@users.noreply.github.com>","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 <42973632+kibanamachine@users.noreply.github.com>","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 <ievgen.sorokopud@elastic.co>
#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":"ievgen.sorokopud@elastic.co"},"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 <42973632+kibanamachine@users.noreply.github.com>","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 <42973632+kibanamachine@users.noreply.github.com>","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 <42973632+kibanamachine@users.noreply.github.com>","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.