Move test utils from legacy api to agnostic#224381
Move test utils from legacy api to agnostic#224381yuliia-fryshko merged 14 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
jbudz
left a comment
There was a problem hiding this comment.
.buildkite/ftr_oblt_stateful_configs.yml LGTM
60c2a7e to
885cb9b
Compare
084845d to
d3606a2
Compare
| getScopedApiClientForUsername: () => getScopedApiClientForUsername, | ||
| apmSynthtraceEsClient: (context: InheritedFtrProviderContext) => | ||
| getApmSynthtraceEsClient(context, apmSynthtraceKibanaClient), | ||
| observabilityAIAssistantAPIClient: async () => { |
There was a problem hiding this comment.
Is this being used anywhere? If not, can we remove it?
There was a problem hiding this comment.
Is this file needed? Are we using the API client in this anywhere?
The deployment agnostic API client is in x-pack/test/api_integration/deployment_agnostic/services/observability_ai_assistant_api.ts
.github/CODEOWNERS
Outdated
| /x-pack/test_serverless/functional/page_objects/svl_data_usage.ts @elastic/kibana-management | ||
| /x-pack/test/observability_ai_assistant_api_integration @elastic/obs-ai-assistant | ||
| /x-pack/test/observability_ai_assistant_functional @elastic/obs-ai-assistant | ||
| /x-pack/test_serverless/**/test_suites/observability/ai_assistant @elastic/obs-ai-assistant |
7ce5728 to
703348e
Compare
6cd8fbd to
0347510
Compare
| getApmSynthtraceEsClient(context, apmSynthtraceKibanaClient), | ||
| }, | ||
| junit: { | ||
| reportName: `Observability AI Assistant API Integration tests (${name})`, |
There was a problem hiding this comment.
It looks like we're creating an API integration test config here in the functional test plugin. AFAIK, unlike UI tests, API integration tests aren't considered functional tests. Is this intended?
| @@ -5,29 +5,108 @@ | |||
| * 2.0. | |||
There was a problem hiding this comment.
In line with the Sustainable Kibana Architecture we're aiming to move solution-specific x-pack/test plugins to the x-pack/solutions/SOLUTION/test directory (this is the related observability directory). Could we please move this plugin to that directory?
There was a problem hiding this comment.
We talked offline and agreed to leave this item as a follow-up. Thank you!
viduni94
left a comment
There was a problem hiding this comment.
Thanks for removing the test_serverless/**/test_suites/observability/ai_assistant test folder @yuliia-fryshko
Can you please remove all references to it as well?
I see it being referred in
- CODEOWNERS file
.buildkite/ftr_oblt_serverless_configs.ymlfile
| export type CreateTestConfig = ReturnType<typeof createTestConfig>; | ||
| export type TestConfig = Awaited<ReturnType<typeof getTestConfig>>; | ||
|
|
||
| export function createObservabilityAIAssistantAPIConfig({ |
There was a problem hiding this comment.
Why do we have a createObservabilityAIAssistantAPIConfig and getTestConfig?
AFAICT, only apmSynthtraceEsClient from createObservabilityAIAssistantAPIConfig is being used in functional tests (correct me if I'm wrong). If that's the case, can we move apmSynthtraceEsClient to getTestConfig and move everything else that's needed from the base config to getTestConfig and completely get rid of createObservabilityAIAssistantAPIConfig? Would that work?
⏳ Build in-progress
History
|
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
3 similar comments
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Starting backport for target branches: 9.1 https://github.com/elastic/kibana/actions/runs/16081123349 |
## Summary Closes [219684](elastic#219684) This PR removes the `observability_ai_assistant_api_integration` folder, relocating its tests and dependencies into relevant functional test directories or agnostic api tests. Common utilities used across both (functional and agnostic) suites have been moved to the agnostic folder. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 994ebc0)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
|
Starting backport for target branches: 8.19, 9.1 https://github.com/elastic/kibana/actions/runs/16081790737 |
## Summary Closes [219684](elastic#219684) This PR removes the `observability_ai_assistant_api_integration` folder, relocating its tests and dependencies into relevant functional test directories or agnostic api tests. Common utilities used across both (functional and agnostic) suites have been moved to the agnostic folder. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 994ebc0)
💔 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 |
# Backport This will backport the following commits from `main` to `9.1`: - [Move test utils from legacy api to agnostic (#224381)](#224381) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Yuliia Fryshko","email":"yuliia.fryshko@elastic.co"},"sourceCommit":{"committedDate":"2025-06-27T19:22:06Z","message":"Move test utils from legacy api to agnostic (#224381)\n\n## Summary\n\nCloses [219684](https://github.com/elastic/kibana/issues/219684)\n\nThis PR removes the `observability_ai_assistant_api_integration` folder,\nrelocating its tests and dependencies into relevant functional test\ndirectories or agnostic api tests. Common utilities used across both\n(functional and agnostic) suites have been moved to the agnostic folder.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"994ebc0f9c51e92e0725675b550255cb486fde6a","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport missing","Team:Obs AI Assistant","ci:project-deploy-observability","backport:version","v9.1.0","v9.2.0"],"title":"Move test utils from legacy api to agnostic","number":224381,"url":"https://github.com/elastic/kibana/pull/224381","mergeCommit":{"message":"Move test utils from legacy api to agnostic (#224381)\n\n## Summary\n\nCloses [219684](https://github.com/elastic/kibana/issues/219684)\n\nThis PR removes the `observability_ai_assistant_api_integration` folder,\nrelocating its tests and dependencies into relevant functional test\ndirectories or agnostic api tests. Common utilities used across both\n(functional and agnostic) suites have been moved to the agnostic folder.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"994ebc0f9c51e92e0725675b550255cb486fde6a"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224381","number":224381,"mergeCommit":{"message":"Move test utils from legacy api to agnostic (#224381)\n\n## Summary\n\nCloses [219684](https://github.com/elastic/kibana/issues/219684)\n\nThis PR removes the `observability_ai_assistant_api_integration` folder,\nrelocating its tests and dependencies into relevant functional test\ndirectories or agnostic api tests. Common utilities used across both\n(functional and agnostic) suites have been moved to the agnostic folder.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"994ebc0f9c51e92e0725675b550255cb486fde6a"}}]}] BACKPORT--> Co-authored-by: Yuliia Fryshko <yuliia.fryshko@elastic.co>
Closes [219684](elastic#219684) This PR removes the `observability_ai_assistant_api_integration` folder, relocating its tests and dependencies into relevant functional test directories or agnostic api tests. Common utilities used across both (functional and agnostic) suites have been moved to the agnostic folder. Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 994ebc0)
Backport This will backport the following commits from main to 8.19: #224381 Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>

Summary
Closes 219684
This PR removes the
observability_ai_assistant_api_integrationfolder, relocating its tests and dependencies into relevant functional test directories or agnostic api tests. Common utilities used across both (functional and agnostic) suites have been moved to the agnostic folder.Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesIdentify risks
Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.