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

Bug when using the event editor with Azure OpenAI connector on Elastic Cloud #201713

Closed
iTiagoCO opened this issue Nov 26, 2024 · 2 comments · Fixed by #203344
Closed

Bug when using the event editor with Azure OpenAI connector on Elastic Cloud #201713

iTiagoCO opened this issue Nov 26, 2024 · 2 comments · Fixed by #203344
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Obs AI Assistant Observability AI Assistant

Comments

@iTiagoCO
Copy link

Kibana version:
8.15.4

Elasticsearch version:
8.15.4

Server OS version:
GCP - South Carolina (us-east1)

Browser version:
Google Chrome
Versión 131.0.6778.86 (Build oficial) (64 bits)

Browser OS version:
Windows 10

Original installation method (e.g., download page, yum, from source, etc.):
Elastic Cloud

Describe the error:
When setting up an Azure OpenAI connector in Kibana and performing a query related to a hostname, if you try to expand an event in the corresponding section and then click on the event editor, Kibana throws an unexpected error that logs you out or reloads the page.

Steps to reproduce:

Set up an Azure OpenAI connector in Kibana.
Perform a query related to a hostname.
Expand the events resulting from the query.
Click on the event editor.
Expected behavior:
The event editor should open successfully to allow editing or review of the selected event without errors or interruptions.

Screenshots (if applicable):

Image

Image

Logs
logs.txt

Errors in browser console (if applicable):
[If possible, include relevant browser console messages that can help diagnose the issue.]

Provide server logs or output (if applicable):
[If you have access, include relevant server or Kibana logs that can provide more details about the error.]

Any additional context:

This issue occurs specifically on Elastic Cloud, version 8.15.4, with the Azure OpenAI connector.

@iTiagoCO iTiagoCO added the bug Fixes for quality problems that affect the customer experience label Nov 26, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 26, 2024
@jsanz jsanz added the Team:Obs AI Assistant Observability AI Assistant label Nov 29, 2024
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Nov 29, 2024
@sorenlouv
Copy link
Member

I was able to reproduce the error. Afaict the error is thrown because functionDefinition.parameters is undefined.

: functionDefinition.parameters.properties

use_json_editor_model.ts:38 Uncaught TypeError: Cannot read properties of undefined (reading 'properties')
    at use_json_editor_model.ts:38:1
    at updateMemo (react-dom.development.js:15867:1)
    at Object.useMemo (react-dom.development.js:16413:1)
    at useMemo (react.development.js:1532:1)
    at useJsonEditorModel (use_json_editor_model.ts:30:1)
    at PromptEditorFunction (prompt_editor_function.tsx:40:1)
    at renderWithHooks (react-dom.development.js:14985:1)
    at updateFunctionComponent (react-dom.development.js:17356:1)
    at beginWork (react-dom.development.js:19063:1)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)

@sorenlouv sorenlouv self-assigned this Dec 6, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 9, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 9, 2024
kibanamachine added a commit that referenced this issue Dec 9, 2024
…03344) (#203435)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Obs AI Assistant] Fix null pointer in function definition
(#203344)](#203344)

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

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

<!--BACKPORT [{"author":{"name":"Søren
Louv-Jansen","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-09T14:00:05Z","message":"[Obs
AI Assistant] Fix null pointer in function definition
(#203344)\n\nCloses
#201713","sha":"1d9ca1ebf66f4cb8a367de8a8854d40dd4789ec8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-minor","Team:Obs
AI
Assistant","ci:project-deploy-observability","v8.16.0","v8.17.0"],"title":"[Obs
AI Assistant] Fix null pointer in function
definition","number":203344,"url":"https://github.com/elastic/kibana/pull/203344","mergeCommit":{"message":"[Obs
AI Assistant] Fix null pointer in function definition
(#203344)\n\nCloses
#201713","sha":"1d9ca1ebf66f4cb8a367de8a8854d40dd4789ec8"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203344","number":203344,"mergeCommit":{"message":"[Obs
AI Assistant] Fix null pointer in function definition
(#203344)\n\nCloses
#201713","sha":"1d9ca1ebf66f4cb8a367de8a8854d40dd4789ec8"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Søren Louv-Jansen <[email protected]>
kibanamachine added a commit that referenced this issue Dec 9, 2024
…3344) (#203436)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Obs AI Assistant] Fix null pointer in function definition
(#203344)](#203344)

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

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

<!--BACKPORT [{"author":{"name":"Søren
Louv-Jansen","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-09T14:00:05Z","message":"[Obs
AI Assistant] Fix null pointer in function definition
(#203344)\n\nCloses
#201713","sha":"1d9ca1ebf66f4cb8a367de8a8854d40dd4789ec8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-minor","Team:Obs
AI
Assistant","ci:project-deploy-observability","v8.16.0","v8.17.0"],"title":"[Obs
AI Assistant] Fix null pointer in function
definition","number":203344,"url":"https://github.com/elastic/kibana/pull/203344","mergeCommit":{"message":"[Obs
AI Assistant] Fix null pointer in function definition
(#203344)\n\nCloses
#201713","sha":"1d9ca1ebf66f4cb8a367de8a8854d40dd4789ec8"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203344","number":203344,"mergeCommit":{"message":"[Obs
AI Assistant] Fix null pointer in function definition
(#203344)\n\nCloses
#201713","sha":"1d9ca1ebf66f4cb8a367de8a8854d40dd4789ec8"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Søren Louv-Jansen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Obs AI Assistant Observability AI Assistant
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants