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

Observability AI Assistant Tests Deployment Agnostic #205194

Conversation

arturoliduena
Copy link
Contributor

@arturoliduena arturoliduena commented Dec 27, 2024

Closes #192718

Summary

This PR add a deployment-agnostic testing environment for Observability AI Assistant tests by unifying the duplicated tests for stateful and serverless environments. It create the ObservabilityAIAssistantApiClient to work seamlessly in both environments, enabling a single test to run across stateful, CI, and MKI.

Initial efforts focus on deduplicating the conversations.spec.ts and connectors.spec.ts files, as these already run in all environments.

Move / dedup the tests that exist in stateful and serverless. They run in serverless CI but not MKI and add the skipMki tag.
chat.spec.ts
complete.spec.ts
elasticsearch.spec.ts
public_complete.spec.ts
alerts.spec.ts
knowledge_base_setup.spec.ts
knowledge_base_status.spec.ts
knowledge_base.spec.ts
summarize.ts
knowledge_base_user_instructions.spec.ts

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, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests 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
  • 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 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

@arturoliduena arturoliduena added release_note:skip Skip the PR/issue when compiling release notes Team:Obs AI Assistant Observability AI Assistant v8.18.0 labels Dec 27, 2024
@arturoliduena arturoliduena requested a review from a team as a code owner December 27, 2024 11:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

@arturoliduena arturoliduena requested a review from a team as a code owner December 27, 2024 12:05
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Dec 27, 2024
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)


it('Returns a 2xx for enterprise license', async () => {
const { status } = await observabilityAIAssistantAPIClient.editor({
endpoint: `GET ${CONNECTOR_API_URL}`,
Copy link
Member

@sorenlouv sorenlouv Jan 2, 2025

Choose a reason for hiding this comment

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

nit: I suggest not using variables here. It's harder to read and search for. Also, I'm not sure the typescript intellisense for parameters and typed responses works when using variables

Suggested change
endpoint: `GET ${CONNECTOR_API_URL}`,
endpoint: `GET /internal/observability_ai_assistant/connectors`,

Copy link
Member

Choose a reason for hiding this comment

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

If you really want to make it DRY I suggest adding a helper and re-use that instead:

const getConnectors = () =>
  observabilityAIAssistantAPIClient.editor({
    endpoint: `GET /internal/observability_ai_assistant/connectors`,
  });

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree. Now that I’m moving many of these tests, I won’t use a variable and will ensure they follow a consistent pattern since we currently have a mix.

}
}

async function createProxyActionConnector({
Copy link
Member

Choose a reason for hiding this comment

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

Should we have a shared helper for creating the proxy action connector? It's already defined at least 3 times:

export async function createProxyActionConnector({

export async function createConnector(proxy: LlmProxy, supertest: SuperTestAgent) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will keep only one, I will get rid of the duplicate functions.

Comment on lines 119 to 121
await observabilityAIAssistantAPIClient
.slsEditor({
try {
await observabilityAIAssistantAPIClient.editor({
Copy link
Member

Choose a reason for hiding this comment

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

Feels good getting rid of the serverless-specific client. Is the plan to get rid of x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/common/observability_ai_assistant_api_client.ts entirely?

Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove it entirely if we get all the tests running in deployment agnostic, unless there is some case where we want a serverless only test because of some serverless only feature. Probably wouldn't hurt to leave it.

@@ -46,212 +46,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
});

describe('Conversations', () => {
describe('without conversations', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This whole file should be safe to move over to deployment agnostic and not exist in stateful tests. I'm assuming you decided not to move it was because of the security roles and access privileges test suite which doesn't exist in serverless, but it soon will: #205210

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly. I only moved the common tests between stateful and serverless. I’ll move the security roles and access privaleges to deployment-agnostic and remove it from stateful and serverless.

@@ -8,13 +8,11 @@
import expect from '@kbn/expect';
import type { Agent as SuperTestAgent } from 'supertest';
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -1264,7 +1264,7 @@ packages/kbn-monaco/src/esql @elastic/kibana-esql
/x-pack/test/observability_ai_assistant_functional @elastic/obs-ai-assistant
/x-pack/test_serverless/**/test_suites/observability/ai_assistant @elastic/obs-ai-assistant
/x-pack/test/functional/es_archives/observability/ai_assistant @elastic/obs-ai-assistant

/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant @elastic/obs-ai-assistant
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't look related to your change but Github complains about errors in this file

image

Copy link
Member

Choose a reason for hiding this comment

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

It's valid on main which is odd

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing that out, @sorenlouv. I checked, and the file is now valid in this branch as well. It might have been a temporary issue or something resolved during recent changes(I did a rebase recently).

Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

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

Just one comment about CODEOWNERS file

@arturoliduena arturoliduena force-pushed the obs-ai-assistant-192718-deployment-agnostic-api-integration-tests branch from c1c4339 to 1dc1987 Compare January 3, 2025 20:38
@arturoliduena arturoliduena added the backport:skip This commit does not require backporting label Jan 4, 2025
@@ -201,6 +201,7 @@ export function ObservabilityAIAssistantApiProvider(context: DeploymentAgnosticF
admin: observabilityAIAssistantApiClient.makeInternalApiRequest('admin'),
viewer: observabilityAIAssistantApiClient.makeInternalApiRequest('viewer'),
editor: observabilityAIAssistantApiClient.makeInternalApiRequest('editor'),
unauthorizedUser: observabilityAIAssistantApiClient.makeInternalApiRequest('viewer'),
Copy link
Member

@sorenlouv sorenlouv Jan 6, 2025

Choose a reason for hiding this comment

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

Can't we simply use the existing viewer? Also, what do you expect to happen if unauthorizedUser is used to call an endpoint that viewer is allowed to access?

Copy link
Contributor

@viduni94 viduni94 Jan 6, 2025

Choose a reason for hiding this comment

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

Hey @arturoliduena
You might not be able to use the viewer role for unauthorizedUser in this manner for DA tests. It was done for serverless this way, because we force the user to be unauthorized by not passing the cookie header.

https://github.com/elastic/kibana/pull/205210/files#diff-febc7c89d3de714505db725fb9c264974eea6a5b29542b8782ebb0bab98a92d7R219

However, since the cookie is always included in makeInternalApiRequest, this user will be a viewer with authorization.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @sorenlouv and @viduni94,
We can simulate an unauthorized user by omitting credentials entirely with a function like makeInternalApiRequestWithoutCredentials:

  function makeInternalApiRequest(role: string) {
    return async <TEndpoint extends InternalEndpoint<APIEndpoint>>(
      options: Options<TEndpoint>
    ): Promise<SupertestReturnType<TEndpoint>> => {
      const headers: Record<string, string> = {
        ...samlAuth.getInternalRequestHeader(),
        ...(await samlAuth.getM2MApiCookieCredentialsWithRoleScope(role)),
      };

      return makeApiRequest({
        options,
        headers,
      });
    };
  }

  function makeInternalApiRequestWithoutCredentials() {
    return async <TEndpoint extends InternalEndpoint<APIEndpoint>>(
      options: Options<TEndpoint>
    ): Promise<SupertestReturnType<TEndpoint>> => {
      const headers: Record<string, string> = {
        ...samlAuth.getInternalRequestHeader(),
      };

      return makeApiRequest({
        options,
        headers,
      });
    };
  }

However, the problem with this approach is that omitting credentials will result in a 401 Unauthorized response instead of a 403 Forbidden. This doesn’t align with the intention of the test, which is to verify whether a user with insufficient permissions can access specific endpoints (DELETE, POST, PUT).

To properly simulate this, the user needs to be authenticated (avoiding 401 Unauthorized) but lack the necessary permissions, resulting in a 403 Forbidden. This is why I think it makes sense to use the viewer role here.

I agree with Søren that adding an additional unauthorizedUser role like this:

unauthorizedUser: observabilityAIAssistantApiClient.makeInternalApiRequest('viewer')

is unnecessary. Instead, we can simply use the existing viewer role:

viewer: observabilityAIAssistantApiClient.makeInternalApiRequest('viewer')

This keeps the implementation clean and ensures that we’re testing for insufficient permissions correctly. Let me know if you agree

Copy link
Member

@sorenlouv sorenlouv Jan 7, 2025

Choose a reason for hiding this comment

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

If I read that correctly, you'll authenticate as the viewer user. That sounds good to me.

Copy link
Contributor

@viduni94 viduni94 Jan 7, 2025

Choose a reason for hiding this comment

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

What I meant is not to have a user without credentials, but to have a user with a role that has insufficient privileges to access the AI Assistant APIs.

If the viewer role fits that criteria, I'm good with this.

Copy link
Member

Choose a reason for hiding this comment

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

It just seems odd to have a user called unauthorizedUser. Because even with just the viewer role there are APIs they are authorised to access.


type PublicEndpoint<T extends APIEndpoint> = T extends `${string} /api/${string}` ? T : never;

function createObservabilityAIAssistantApiClient({
Copy link
Member

@sorenlouv sorenlouv Jan 7, 2025

Choose a reason for hiding this comment

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

describe('/internal/observability_ai_assistant/chat', () => {
describe('/internal/observability_ai_assistant/chat', function () {
// TODO: https://github.com/elastic/kibana/issues/192751
this.tags(['skipMKI']);
Copy link
Contributor

Choose a reason for hiding this comment

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

We can be replace skipMKI with failsOnMKI if we want to be more descriptive that we aren't wanting to skip but that its failing so we have to skip.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

viduni94 added a commit that referenced this pull request Jan 8, 2025
…s test suite (#205631)

Closes #205537

## Summary

The knowledge base migration test suite is missing in serverless. This
PR adds it to the serverless test suite.
- This has a dependancy to #205194
since we are removing all serverless tests and adding them to DA tests.
- If the DA tests PR gets merged first, I'll refactor this PR to add it
there.

### Checklist

- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] 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)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 8, 2025
…s test suite (elastic#205631)

Closes elastic#205537

## Summary

The knowledge base migration test suite is missing in serverless. This
PR adds it to the serverless test suite.
- This has a dependancy to elastic#205194
since we are removing all serverless tests and adding them to DA tests.
- If the DA tests PR gets merged first, I'll refactor this PR to add it
there.

### Checklist

- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] 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)

(cherry picked from commit e32ff8e)
@arturoliduena
Copy link
Contributor Author

@neptunian, @sorenlouv and @viduni94
Here’s an update:
After enabling the ml test service, I continued with the migration of the knowledge_base tests.

export const deploymentAgnosticServices = _.pick(apiIntegrationServices, [

Migrated to Deployment-Agnostic:

  • conversations.spec.ts
  • connectors.spec.ts
  • chat.spec.ts
  • complete.spec.ts
  • elasticsearch.spec.ts
  • public_complete.spec.ts
  • alerts.spec.ts
  • knowledge_base_setup.spec.ts
  • knowledge_base_status.spec.ts
  • knowledge_base.spec.ts
  • summarize.ts

Pending:

  • Migrate knowledge_base_user_instructions.spec.ts
  • Clean up all duplicated code

Issue with knowledge_base_user_instructions.spec.ts:

there is a difference between stateful and serverless environments.

In the Stateful Environment:

  • We create users (e.g., editor and secondary_editor) and their respective user_instructions.
  • The test ensures:
    • User A can access their own user_instructions and the public ones.
    • User B can do the same for their user_instructions.

Code reference:

describe('when creating private and public user instructions', () => {
before(async () => {
await clearKnowledgeBase(es);
const promises = [
{
username: 'editor' as const,
isPublic: true,
},
{
username: 'editor' as const,
isPublic: false,
},
{
username: 'secondary_editor' as const,
isPublic: true,
},
{
username: 'secondary_editor' as const,
isPublic: false,
},
].map(async ({ username, isPublic }) => {
const visibility = isPublic ? 'Public' : 'Private';
await getScopedApiClientForUsername(username)({
endpoint: 'PUT /internal/observability_ai_assistant/kb/user_instructions',
params: {
body: {
id: `${visibility.toLowerCase()}-doc-from-${username}`,
text: `${visibility} user instruction from "${username}"`,
public: isPublic,
},

In the Serverless Environment:

  • We rely on roles (editor and admin) rather than user creation.
  • The same functionality is tested, but achieved differently due to the lack of specific user creation.

Code reference:

describe('when creating private and public user instructions', () => {
before(async () => {
await clearKnowledgeBase(es);
const promises = [
{
username: 'editor' as const,
isPublic: true,
},
{
username: 'editor' as const,
isPublic: false,
},
{
username: 'secondary_editor' as const,
isPublic: true,
},
{
username: 'secondary_editor' as const,
isPublic: false,
},
].map(async ({ username, isPublic }) => {
const visibility = isPublic ? 'Public' : 'Private';
const user = username === 'editor' ? 'slsEditor' : 'slsAdmin';
await observabilityAIAssistantAPIClient[user]({
endpoint: 'PUT /internal/observability_ai_assistant/kb/user_instructions',

Question:

Should we migrate these tests to deployment-agnostic in a similar manner to how it is implemented in the serverless environment, or should we maintain them as separate implementations between stateful and serverless environments?

crespocarlos pushed a commit to crespocarlos/kibana that referenced this pull request Jan 8, 2025
…s test suite (elastic#205631)

Closes elastic#205537

## Summary

The knowledge base migration test suite is missing in serverless. This
PR adds it to the serverless test suite.
- This has a dependancy to elastic#205194
since we are removing all serverless tests and adding them to DA tests.
- If the DA tests PR gets merged first, I'll refactor this PR to add it
there.

### Checklist

- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] 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)
@neptunian
Copy link
Contributor

neptunian commented Jan 8, 2025

Should we migrate these tests to deployment-agnostic in a similar manner to how it is implemented in the serverless environment, or should we maintain them as separate implementations between stateful and serverless environments?

@arturoliduena Thanks for bringing that question up. From what I've read here, my understanding is we should use the deployment agnostic samlAuth in the client (which you've done) and not create these users using basic auth as we currently are in stateful. Since the roles exist in stateful, they should be able to adopt the serverless approach and use the roles instead which should be tied to separate users. So yes, assuming this is a simple implementation using serverless-like roles, I would say we can make them deployment agnostic.

@arturoliduena arturoliduena force-pushed the obs-ai-assistant-192718-deployment-agnostic-api-integration-tests branch from 4c57434 to d2028d2 Compare January 13, 2025 13:04
@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 13, 2025

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: d2028d2
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-205194-d2028d2a6987

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #63 / Actions and Triggers app Maintenance Windows Maintenance windows table paginates maintenance windows correctly

Metrics [docs]

✅ unchanged

History

@arturoliduena arturoliduena merged commit ee6c5bd into elastic:main Jan 13, 2025
8 checks passed
delanni pushed a commit to delanni/kibana that referenced this pull request Jan 13, 2025
Closes elastic#192718

## Summary

This PR add a deployment-agnostic testing environment for Observability
AI Assistant tests by unifying the duplicated tests for stateful and
serverless environments. It create the ObservabilityAIAssistantApiClient
to work seamlessly in both environments, enabling a single test to run
across stateful, CI, and MKI.

Initial efforts focus on deduplicating the `conversations.spec.ts` and
`connectors.spec.ts` files, as these already run in all environments.

Move / dedup the tests that exist in stateful and serverless. They run
in serverless CI but not MKI and add the skipMki tag.
`chat.spec.ts`
`complete.spec.ts`
`elasticsearch.spec.ts`
`public_complete.spec.ts`
`alerts.spec.ts`
`knowledge_base_setup.spec.ts`  
`knowledge_base_status.spec.ts`  
`knowledge_base.spec.ts`  
`summarize.ts`  
`knowledge_base_user_instructions.spec.ts`
@arturoliduena arturoliduena added backport:version Backport to applied version labels and removed backport:skip This commit does not require backporting labels Jan 13, 2025
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 205194

Questions ?

Please refer to the Backport tool documentation

1 similar comment
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 205194

Questions ?

Please refer to the Backport tool documentation

@arturoliduena
Copy link
Contributor Author

💚 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

arturoliduena added a commit that referenced this pull request Jan 13, 2025
…206516)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Observability AI Assistant Tests Deployment Agnostic
(#205194)](#205194)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Arturo
Lidueña","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-13T15:03:51Z","message":"Observability
AI Assistant Tests Deployment Agnostic (#205194)\n\nCloses
#192718\r\n\r\n## Summary\r\n\r\nThis PR add a deployment-agnostic
testing environment for Observability\r\nAI Assistant tests by unifying
the duplicated tests for stateful and\r\nserverless environments. It
create the ObservabilityAIAssistantApiClient\r\nto work seamlessly in
both environments, enabling a single test to run\r\nacross stateful, CI,
and MKI.\r\n\r\nInitial efforts focus on deduplicating the
`conversations.spec.ts` and\r\n`connectors.spec.ts` files, as these
already run in all environments.\r\n\r\nMove / dedup the tests that
exist in stateful and serverless. They run\r\nin serverless CI but not
MKI and add the skipMki
tag.\r\n`chat.spec.ts`\r\n`complete.spec.ts`\r\n`elasticsearch.spec.ts`\r\n`public_complete.spec.ts`\r\n`alerts.spec.ts`\r\n`knowledge_base_setup.spec.ts`
\r\n`knowledge_base_status.spec.ts` \r\n`knowledge_base.spec.ts`
\r\n`summarize.ts`
\r\n`knowledge_base_user_instructions.spec.ts`","sha":"ee6c5bde34b984e14889eb136cfa1a9baa9991c0","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Obs
AI
Assistant","ci:project-deploy-observability","backport:version","v8.18.0"],"number":205194,"url":"https://github.com/elastic/kibana/pull/205194","mergeCommit":{"message":"Observability
AI Assistant Tests Deployment Agnostic (#205194)\n\nCloses
#192718\r\n\r\n## Summary\r\n\r\nThis PR add a deployment-agnostic
testing environment for Observability\r\nAI Assistant tests by unifying
the duplicated tests for stateful and\r\nserverless environments. It
create the ObservabilityAIAssistantApiClient\r\nto work seamlessly in
both environments, enabling a single test to run\r\nacross stateful, CI,
and MKI.\r\n\r\nInitial efforts focus on deduplicating the
`conversations.spec.ts` and\r\n`connectors.spec.ts` files, as these
already run in all environments.\r\n\r\nMove / dedup the tests that
exist in stateful and serverless. They run\r\nin serverless CI but not
MKI and add the skipMki
tag.\r\n`chat.spec.ts`\r\n`complete.spec.ts`\r\n`elasticsearch.spec.ts`\r\n`public_complete.spec.ts`\r\n`alerts.spec.ts`\r\n`knowledge_base_setup.spec.ts`
\r\n`knowledge_base_status.spec.ts` \r\n`knowledge_base.spec.ts`
\r\n`summarize.ts`
\r\n`knowledge_base_user_instructions.spec.ts`","sha":"ee6c5bde34b984e14889eb136cfa1a9baa9991c0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205194","number":205194,"mergeCommit":{"message":"Observability
AI Assistant Tests Deployment Agnostic (#205194)\n\nCloses
#192718\r\n\r\n## Summary\r\n\r\nThis PR add a deployment-agnostic
testing environment for Observability\r\nAI Assistant tests by unifying
the duplicated tests for stateful and\r\nserverless environments. It
create the ObservabilityAIAssistantApiClient\r\nto work seamlessly in
both environments, enabling a single test to run\r\nacross stateful, CI,
and MKI.\r\n\r\nInitial efforts focus on deduplicating the
`conversations.spec.ts` and\r\n`connectors.spec.ts` files, as these
already run in all environments.\r\n\r\nMove / dedup the tests that
exist in stateful and serverless. They run\r\nin serverless CI but not
MKI and add the skipMki
tag.\r\n`chat.spec.ts`\r\n`complete.spec.ts`\r\n`elasticsearch.spec.ts`\r\n`public_complete.spec.ts`\r\n`alerts.spec.ts`\r\n`knowledge_base_setup.spec.ts`
\r\n`knowledge_base_status.spec.ts` \r\n`knowledge_base.spec.ts`
\r\n`summarize.ts`
\r\n`knowledge_base_user_instructions.spec.ts`","sha":"ee6c5bde34b984e14889eb136cfa1a9baa9991c0"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
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 ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:Obs AI Assistant Observability AI Assistant v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Obs AI Assistant] Deployment agnostic API integration tests
8 participants