-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Fixing - Failing test: Stateful Observability - Deployment-agnostic A… #213530
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
Fixing - Failing test: Stateful Observability - Deployment-agnostic A… #213530
Conversation
|
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
💚 Build Succeeded
Metrics [docs]
|
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.
@sorenlouv added a function to sort the system message:
kibana/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts
Lines 470 to 475 in 5d565ab
| function sortSystemMessage(message: string) { | |
| return message | |
| .split('\n\n') | |
| .map((line) => line.trim()) | |
| .sort(); | |
| } |
Will that help here?
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.
Thanks @viduni94, I've moved sortSystemMessage to a helpers file and updated the complete test to use it
…PI Integration Tests.x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/complete·spec·ts
fc1d200 to
066ed68
Compare
|
Starting backport for target branches: 8.x, 9.0 |
elastic#213530) Closes [elastic#213209](elastic#213209) ### Ordering Issue - The instruction about `retrieve_elastic_doc` appears before the `get_dataset_info` instruction. - The content is the same, but the order of instructions has changed, causing a failure in an exact string match. ### Minor Formatting Differences - Even slight variations in spacing, newlines, or indentations can cause a test failure. ## Solution use `systemMessageSorted` - order of instructions can vary, so we sort to compare them (cherry picked from commit 5d0e0f4)
elastic#213530) Closes [elastic#213209](elastic#213209) ### Ordering Issue - The instruction about `retrieve_elastic_doc` appears before the `get_dataset_info` instruction. - The content is the same, but the order of instructions has changed, causing a failure in an exact string match. ### Minor Formatting Differences - Even slight variations in spacing, newlines, or indentations can cause a test failure. ## Solution use `systemMessageSorted` - order of instructions can vary, so we sort to compare them (cherry picked from commit 5d0e0f4)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…stic A… (#213530) (#213603) # Backport This will backport the following commits from `main` to `9.0`: - [Fixing - Failing test: Stateful Observability - Deployment-agnostic A… (#213530)](#213530) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Arturo Lidueña","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-03-07T16:10:09Z","message":"Fixing - Failing test: Stateful Observability - Deployment-agnostic A… (#213530)\n\nCloses [#213209](https://github.com/elastic/kibana/issues/213209)\n\n### Ordering Issue\n- The instruction about `retrieve_elastic_doc` appears before the\n`get_dataset_info` instruction.\n- The content is the same, but the order of instructions has changed,\ncausing a failure in an exact string match.\n### Minor Formatting Differences\n- Even slight variations in spacing, newlines, or indentations can cause\na test failure.\n\n## Solution\nuse `systemMessageSorted` - order of instructions can vary, so we sort to compare them","sha":"5d0e0f48adc176d95a223116e1767eedf324740b","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Obs AI Assistant","backport:version","v9.1.0","v8.19.0"],"title":"Fixing - Failing test: Stateful Observability - Deployment-agnostic A…","number":213530,"url":"https://github.com/elastic/kibana/pull/213530","mergeCommit":{"message":"Fixing - Failing test: Stateful Observability - Deployment-agnostic A… (#213530)\n\nCloses [#213209](https://github.com/elastic/kibana/issues/213209)\n\n### Ordering Issue\n- The instruction about `retrieve_elastic_doc` appears before the\n`get_dataset_info` instruction.\n- The content is the same, but the order of instructions has changed,\ncausing a failure in an exact string match.\n### Minor Formatting Differences\n- Even slight variations in spacing, newlines, or indentations can cause\na test failure.\n\n## Solution\nuse `systemMessageSorted` - order of instructions can vary, so we sort to compare them","sha":"5d0e0f48adc176d95a223116e1767eedf324740b"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213530","number":213530,"mergeCommit":{"message":"Fixing - Failing test: Stateful Observability - Deployment-agnostic A… (#213530)\n\nCloses [#213209](https://github.com/elastic/kibana/issues/213209)\n\n### Ordering Issue\n- The instruction about `retrieve_elastic_doc` appears before the\n`get_dataset_info` instruction.\n- The content is the same, but the order of instructions has changed,\ncausing a failure in an exact string match.\n### Minor Formatting Differences\n- Even slight variations in spacing, newlines, or indentations can cause\na test failure.\n\n## Solution\nuse `systemMessageSorted` - order of instructions can vary, so we sort to compare them","sha":"5d0e0f48adc176d95a223116e1767eedf324740b"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Arturo Lidueña <[email protected]>
…stic A… (#213530) (#213601) # Backport This will backport the following commits from `main` to `8.x`: - [Fixing - Failing test: Stateful Observability - Deployment-agnostic A… (#213530)](#213530) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Arturo Lidueña","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-03-07T16:10:09Z","message":"Fixing - Failing test: Stateful Observability - Deployment-agnostic A… (#213530)\n\nCloses [#213209](https://github.com/elastic/kibana/issues/213209)\n\n### Ordering Issue\n- The instruction about `retrieve_elastic_doc` appears before the\n`get_dataset_info` instruction.\n- The content is the same, but the order of instructions has changed,\ncausing a failure in an exact string match.\n### Minor Formatting Differences\n- Even slight variations in spacing, newlines, or indentations can cause\na test failure.\n\n## Solution\nuse `systemMessageSorted` - order of instructions can vary, so we sort to compare them","sha":"5d0e0f48adc176d95a223116e1767eedf324740b","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Obs AI Assistant","backport:version","v9.1.0","v8.19.0"],"title":"Fixing - Failing test: Stateful Observability - Deployment-agnostic A…","number":213530,"url":"https://github.com/elastic/kibana/pull/213530","mergeCommit":{"message":"Fixing - Failing test: Stateful Observability - Deployment-agnostic A… (#213530)\n\nCloses [#213209](https://github.com/elastic/kibana/issues/213209)\n\n### Ordering Issue\n- The instruction about `retrieve_elastic_doc` appears before the\n`get_dataset_info` instruction.\n- The content is the same, but the order of instructions has changed,\ncausing a failure in an exact string match.\n### Minor Formatting Differences\n- Even slight variations in spacing, newlines, or indentations can cause\na test failure.\n\n## Solution\nuse `systemMessageSorted` - order of instructions can vary, so we sort to compare them","sha":"5d0e0f48adc176d95a223116e1767eedf324740b"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213530","number":213530,"mergeCommit":{"message":"Fixing - Failing test: Stateful Observability - Deployment-agnostic A… (#213530)\n\nCloses [#213209](https://github.com/elastic/kibana/issues/213209)\n\n### Ordering Issue\n- The instruction about `retrieve_elastic_doc` appears before the\n`get_dataset_info` instruction.\n- The content is the same, but the order of instructions has changed,\ncausing a failure in an exact string match.\n### Minor Formatting Differences\n- Even slight variations in spacing, newlines, or indentations can cause\na test failure.\n\n## Solution\nuse `systemMessageSorted` - order of instructions can vary, so we sort to compare them","sha":"5d0e0f48adc176d95a223116e1767eedf324740b"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Arturo Lidueña <[email protected]>
elastic#213530) Closes [elastic#213209](elastic#213209) ### Ordering Issue - The instruction about `retrieve_elastic_doc` appears before the `get_dataset_info` instruction. - The content is the same, but the order of instructions has changed, causing a failure in an exact string match. ### Minor Formatting Differences - Even slight variations in spacing, newlines, or indentations can cause a test failure. ## Solution use `systemMessageSorted` - order of instructions can vary, so we sort to compare them
Closes #213209
Ordering Issue
retrieve_elastic_docappears before theget_dataset_infoinstruction.Minor Formatting Differences
Solution
Update the test assertion to check for content inclusion rather than exact string equality. order of the instructions doesn’t matter