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

[Obs AI Assistant] Add tokenCount event to complete event stream in serverless tests #205397

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

viduni94
Copy link
Contributor

@viduni94 viduni94 commented Jan 2, 2025

Closes #203407 #203408 #203478

Summary

Problem

Some tests in serverless are failing after the migration to the Inference endpoints. This is due to not emitting the tokenCount event, which enables successfully closing the stream.

Solution

Emit the tokenCount event in the serverless tests when the title or conversation is simulated.

Checklist

  • Unit or functional tests were updated or added to match the most common scenarios
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

@viduni94 viduni94 added release_note:skip Skip the PR/issue when compiling release notes Team:Obs AI Assistant Observability AI Assistant backport:version Backport to applied version labels v8.18.0 labels Jan 2, 2025
@viduni94 viduni94 self-assigned this Jan 2, 2025
@viduni94 viduni94 requested a review from a team as a code owner January 2, 2025 14:31
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@arturoliduena arturoliduena left a comment

Choose a reason for hiding this comment

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

LGTM

@viduni94 viduni94 force-pushed the fix-llm-proxy-last-event branch from 7aa27b1 to 8b6dd1a Compare January 2, 2025 14:35
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @viduni94

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7640

[✅] x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/config.ts: 200/200 tests passed.

see run history

@viduni94 viduni94 merged commit a5909f3 into elastic:main Jan 3, 2025
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 3, 2025
…erverless tests (elastic#205397)

Closes elastic#203407
elastic#203408
elastic#203478

## Summary

### Problem
Some tests in serverless are failing after the migration to the
Inference endpoints. This is due to not emitting the tokenCount event,
which enables successfully closing the stream.

### Solution
Emit the tokenCount event in the serverless tests when the title or
conversation is simulated.

### Checklist

- [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] 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 a5909f3)
@kibanamachine
Copy link
Contributor

💚 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

kibanamachine added a commit that referenced this pull request Jan 3, 2025
…m in serverless tests (#205397) (#205455)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Obs AI Assistant] Add tokenCount event to complete event stream in
serverless tests
(#205397)](#205397)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Viduni
Wickramarachchi","email":"viduni.wickramarachchi@elastic.co"},"sourceCommit":{"committedDate":"2025-01-03T00:24:30Z","message":"[Obs
AI Assistant] Add tokenCount event to complete event stream in
serverless tests (#205397)\n\nCloses
https://github.com/elastic/kibana/issues/203407\nhttps://github.com/elastic/kibana/issues/203408\nhttps://github.com/elastic/kibana/issues/203478\n\n##
Summary\n\n### Problem\nSome tests in serverless are failing after the
migration to the\nInference endpoints. This is due to not emitting the
tokenCount event,\nwhich enables successfully closing the stream.\n\n###
Solution\nEmit the tokenCount event in the serverless tests when the
title or\nconversation is simulated.\n\n### Checklist\n\n- [x] [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- [x] 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)","sha":"a5909f391f5cb5e64268517ff10e0cfb88926023","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","backport:version","v8.18.0"],"title":"[Obs AI Assistant]
Add tokenCount event to complete event stream in serverless
tests","number":205397,"url":"https://github.com/elastic/kibana/pull/205397","mergeCommit":{"message":"[Obs
AI Assistant] Add tokenCount event to complete event stream in
serverless tests (#205397)\n\nCloses
https://github.com/elastic/kibana/issues/203407\nhttps://github.com/elastic/kibana/issues/203408\nhttps://github.com/elastic/kibana/issues/203478\n\n##
Summary\n\n### Problem\nSome tests in serverless are failing after the
migration to the\nInference endpoints. This is due to not emitting the
tokenCount event,\nwhich enables successfully closing the stream.\n\n###
Solution\nEmit the tokenCount event in the serverless tests when the
title or\nconversation is simulated.\n\n### Checklist\n\n- [x] [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- [x] 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)","sha":"a5909f391f5cb5e64268517ff10e0cfb88926023"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205397","number":205397,"mergeCommit":{"message":"[Obs
AI Assistant] Add tokenCount event to complete event stream in
serverless tests (#205397)\n\nCloses
https://github.com/elastic/kibana/issues/203407\nhttps://github.com/elastic/kibana/issues/203408\nhttps://github.com/elastic/kibana/issues/203478\n\n##
Summary\n\n### Problem\nSome tests in serverless are failing after the
migration to the\nInference endpoints. This is due to not emitting the
tokenCount event,\nwhich enables successfully closing the stream.\n\n###
Solution\nEmit the tokenCount event in the serverless tests when the
title or\nconversation is simulated.\n\n### Checklist\n\n- [x] [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- [x] 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)","sha":"a5909f391f5cb5e64268517ff10e0cfb88926023"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
…erverless tests (elastic#205397)

Closes elastic#203407
elastic#203408
elastic#203478

## Summary

### Problem
Some tests in serverless are failing after the migration to the
Inference endpoints. This is due to not emitting the tokenCount event,
which enables successfully closing the stream.

### Solution
Emit the tokenCount event in the serverless tests when the title or
conversation is simulated.

### Checklist

- [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] 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)
viduni94 added a commit to viduni94/kibana that referenced this pull request Jan 23, 2025
…erverless tests (elastic#205397)

Closes elastic#203407
elastic#203408
elastic#203478

## Summary

### Problem
Some tests in serverless are failing after the migration to the
Inference endpoints. This is due to not emitting the tokenCount event,
which enables successfully closing the stream.

### Solution
Emit the tokenCount event in the serverless tests when the title or
conversation is simulated.

### Checklist

- [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] 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)
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 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
4 participants