-
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
[Obs AI Assistant] fix knowledge base tests failing in MKI #205779
base: main
Are you sure you want to change the base?
Conversation
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
// Fails on MKI: https://github.com/elastic/kibana/issues/205581 | ||
this.tags(['failsOnMKI']); | ||
|
||
describe('Knowledge base', () => { |
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.
Hey @neptunian
The below tests are failing for me in MKI
1) Observability AI Assistant API tests
│ knowledge_base/knowledge_base.spec.ts
│ Knowledge base
│ when managing a single entry
│ returns 200 on create:
│
│ Error: expected 200 "OK", got 500 "Internal Server Error"
│ at Context.apply (knowledge_base.spec.ts:58:12)
│ at Object.apply (wrap_function.js:74:30)
│ ----
│ at Test._assertStatus (node_modules/supertest/lib/test.js:252:14)
│ at /Users/viduni/Workspace/Elastic/kibana/node_modules/supertest/lib/test.js:308:13
│ at Test._assertFunction (node_modules/supertest/lib/test.js:285:13)
│ at Test.assert (node_modules/supertest/lib/test.js:164:23)
│ at localAssert (node_modules/supertest/lib/test.js:120:14)
│ at fn (node_modules/supertest/lib/test.js:125:7)
│ at Test.callback (node_modules/supertest/node_modules/superagent/src/node/index.js:899:3)
│ at fn (node_modules/supertest/node_modules/superagent/src/node/index.js:1165:18)
│ at IncomingMessage.<anonymous> (node_modules/supertest/node_modules/superagent/src/node/parsers/json.js:19:7)
│ at IncomingMessage.emit (node:events:531:35)
│ at endReadableNT (node:internal/streams/readable:1696:12)
│ at processTicksAndRejections (node:internal/process/task_queues:82:21)
│
│
│2) Observability AI Assistant API tests
│ knowledge_base/knowledge_base.spec.ts
│ Knowledge base
│ when managing a single entry
│ returns 200 on get entries and entry exists:
│
│ TypeError: Cannot read properties of undefined (reading 'id')
│ at Context.<anonymous> (knowledge_base.spec.ts:89:22)
│ at processTicksAndRejections (node:internal/process/task_queues:95:5)
│ at Object.apply (wrap_function.js:74:16)
│
│
│3) Observability AI Assistant API tests
│ knowledge_base/knowledge_base.spec.ts
│ Knowledge base
│ when managing a single entry
│ returns 200 on delete:
│
│ Error: expected 200 "OK", got 500 "Internal Server Error"
│ at Context.apply (knowledge_base.spec.ts:103:12)
│ at Object.apply (wrap_function.js:74:30)
│ ----
│ at Test._assertStatus (node_modules/supertest/lib/test.js:252:14)
│ at /Users/viduni/Workspace/Elastic/kibana/node_modules/supertest/lib/test.js:308:13
│ at Test._assertFunction (node_modules/supertest/lib/test.js:285:13)
│ at Test.assert (node_modules/supertest/lib/test.js:164:23)
│ at localAssert (node_modules/supertest/lib/test.js:120:14)
│ at fn (node_modules/supertest/lib/test.js:125:7)
│ at Test.callback (node_modules/supertest/node_modules/superagent/src/node/index.js:899:3)
│ at fn (node_modules/supertest/node_modules/superagent/src/node/index.js:1165:18)
│ at IncomingMessage.<anonymous> (node_modules/supertest/node_modules/superagent/src/node/parsers/json.js:19:7)
│ at IncomingMessage.emit (node:events:531:35)
│ at endReadableNT (node:internal/streams/readable:1696:12)
│ at processTicksAndRejections (node:internal/process/task_queues:82:21)
│
│
│4) Observability AI Assistant API tests
│ knowledge_base/knowledge_base.spec.ts
│ Knowledge base
│ when managing multiple entries
│ "before each" hook for "returns 200 on create":
│
│ Error: expected 200 "OK", got 500 "Internal Server Error"
│ at Context.<anonymous> (knowledge_base.spec.ts:181:12)
│ at processTicksAndRejections (node:internal/process/task_queues:95:5)
│ at Object.apply (wrap_function.js:74:16)
│ ----
│ at Test._assertStatus (node_modules/supertest/lib/test.js:252:14)
│ at /Users/viduni/Workspace/Elastic/kibana/node_modules/supertest/lib/test.js:308:13
│ at Test._assertFunction (node_modules/supertest/lib/test.js:285:13)
│ at Test.assert (node_modules/supertest/lib/test.js:164:23)
│ at localAssert (node_modules/supertest/lib/test.js:120:14)
│ at fn (node_modules/supertest/lib/test.js:125:7)
│ at Test.callback (node_modules/supertest/node_modules/superagent/src/node/index.js:899:3)
│ at fn (node_modules/supertest/node_modules/superagent/src/node/index.js:1165:18)
│ at IncomingMessage.<anonymous> (node_modules/supertest/node_modules/superagent/src/node/parsers/json.js:19:7)
│ at IncomingMessage.emit (node:events:531:35)
│ at endReadableNT (node:internal/streams/readable:1696:12)
│ at processTicksAndRejections (node:internal/process/task_queues:82:21)
│
│
│5) Observability AI Assistant API tests
│ knowledge_base/knowledge_base_status.spec.ts
│ /internal/observability_ai_assistant/kb/status
│ returns correct status after knowledge base is setup:
│
│ Error: expected false to equal true
│ at Assertion.assert (expect.js:100:11)
│ at Assertion.apply (expect.js:227:8)
│ at Assertion.be (expect.js:69:22)
│ at Context.<anonymous> (knowledge_base_status.spec.ts:49:33)
│ at processTicksAndRejections (node:internal/process/task_queues:95:5)
│ at Object.apply (wrap_function.js:74:16)
Am I missing something?
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.
Interesting. Thanks for testing. I initially was able to reproduce that, but after updating the other knowledge base tests in this PR, I no longer got them. Did you run all the tests together?
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.
Yeah, I used node --no-warnings scripts/functional_test_runner --exclude-tag skipMKI --config x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/config.ts
Here's the complete log:
MKI-test-run.log
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.
I just ran them again and am now getting the errors... Guess this is inconsistent on my end for some reason.
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.
I did another run and knowledge_base_status.spec.ts
passed this time. Only tests in knowledge_base.spec.ts
failed.
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
|
Resolves #205677
Resolves #205581
Brings the serverless tests in line with changes made in the stateful tests. Tested they were passing in MKI.