Skip to content

Conversation

@stephmilovic
Copy link
Contributor

@stephmilovic stephmilovic commented May 21, 2025

Summary

I was noticing some issues around the dashboard link in GenAI connectors. It was not appearing in the connector edit view. Additionally, when some connector types tried to get token telemetry off of the getDashboard subaction resulting in an error:

[ERROR][plugins.actions.gen-ai] Response did not contain usage object

Error log resolution

I resolved the error log by adding a check to skip token telemetry if the action is getDashboard as this action never invokes a model.

Missing link resolution

I noticed that this line hand changed from dashboard.locator to use something called the share service in this PR: #212968. It seems that the share plugin was not properly initialized in triger_actions_ui/public/plugin.ts, so I added it there and this fixed the issue with the dashboard link missing.

To test

  1. Open an existing OpenAI connector edit tab. There should be a link to the token count dashboard like:
Screenshot 2025-05-21 at 4 34 17 PM
  1. Check the kibana log to ensure the Response did not contain usage object no longer appears

@stephmilovic stephmilovic added the release_note:skip Skip the PR/issue when compiling release notes label May 21, 2025
@stephmilovic stephmilovic requested a review from a team as a code owner May 21, 2025 22:36
@stephmilovic stephmilovic added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label May 21, 2025
@stephmilovic stephmilovic requested review from a team as code owners May 21, 2025 22:36
@stephmilovic stephmilovic added Team:Security Generative AI Security Generative AI backport:version Backport to applied version labels v9.1.0 v8.19.0 labels May 21, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Copy link
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

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

Response Ops changes LGTM. Code review only.

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #30 / Alerting maintenanceWindowFlows alerts triggered within a MW should fire actions if still active or recoveres after the MW expired

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
stackConnectors 607.1KB 607.3KB +144.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
triggersActionsUi 108.9KB 108.9KB +28.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
stackConnectors 134 133 -1

Total ESLint disabled count

id before after diff
stackConnectors 138 137 -1

History

@stephmilovic stephmilovic merged commit 5623f65 into elastic:main May 22, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 221209

Questions ?

Please refer to the Backport tool documentation

stephmilovic added a commit to stephmilovic/kibana that referenced this pull request May 22, 2025
…ic#221209)

(cherry picked from commit 5623f65)

# Conflicts:
#	x-pack/platform/plugins/shared/triggers_actions_ui/public/plugin.ts
@stephmilovic
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label May 26, 2025
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @stephmilovic

1 similar comment
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @stephmilovic

stephmilovic added a commit that referenced this pull request May 27, 2025
…#221209) (#221287)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[GenAI Connectors] Resolves missing dashboard link in edit tab
(#221209)](#221209)

<!--- Backport version: 10.0.0 -->

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

<!--BACKPORT [{"author":{"name":"Steph
Milovic","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-05-22T16:15:32Z","message":"[GenAI
Connectors] Resolves missing dashboard link in edit tab
(#221209)","sha":"5623f654aa8bdb11eff5c0b9f4a3c7dff2aba8c4","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
SecuritySolution","Team:Security Generative
AI","backport:version","v9.1.0","v8.19.0"],"title":"[GenAI Connectors]
Resolves missing dashboard link in edit
tab","number":221209,"url":"https://github.com/elastic/kibana/pull/221209","mergeCommit":{"message":"[GenAI
Connectors] Resolves missing dashboard link in edit tab
(#221209)","sha":"5623f654aa8bdb11eff5c0b9f4a3c7dff2aba8c4"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221209","number":221209,"mergeCommit":{"message":"[GenAI
Connectors] Resolves missing dashboard link in edit tab
(#221209)","sha":"5623f654aa8bdb11eff5c0b9f4a3c7dff2aba8c4"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: Elastic Machine <[email protected]>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label May 27, 2025
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
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:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants