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

[Logs] Remove AI Assistant specific log index setting #192003

Merged

Conversation

Kerry350
Copy link
Contributor

@Kerry350 Kerry350 commented Sep 3, 2024

Summary

Closes https://github.com/elastic/logs-dev/issues/167.

  • Removes registration of the AI Assistant specific advanced setting (observability:aiAssistantLogsIndexPattern).
  • Replaces the setting with use of the central log sources setting (observability:logSources).
  • ℹ️ Also registers the central log sources setting in serverless (this was missed previously).

Due to the impact that this setting has on alerts (Discussion) a migration path from one setting to the other isn't really possible, as values from the AI Assistant setting could potentially cause unwanted alerts. As such these changes opt for the route that we'll do a straight swap, and document this in release notes.

We will also need to do a migration on the config (for advanced settings) Saved Object to remove instances of the old setting / property. With the new "model version" migration model my understanding is this should happen in a separate followup PR.

⚠️ One potentially open question is whether the custom management section that the AI Assistant mounts when clicking "AI Assistant Settings" should render the log sources setting? (As this setting affects more than just the AI Assistant). Resolved

Screenshot 2024-09-05 at 11 53 31

@Kerry350 Kerry350 self-assigned this Sep 3, 2024
@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@Kerry350 Kerry350 added Team:obs-ux-logs Observability Logs User Experience Team release_note:deprecation labels Sep 3, 2024
@Kerry350
Copy link
Contributor Author

Kerry350 commented Sep 3, 2024

/ci

@Kerry350 Kerry350 force-pushed the 167-consolidate-obs-ai-assistant-settings branch from a1c2482 to 0de226a Compare September 3, 2024 15:28
@Kerry350
Copy link
Contributor Author

Kerry350 commented Sep 3, 2024

/ci

1 similar comment
@Kerry350
Copy link
Contributor Author

Kerry350 commented Sep 4, 2024

/ci

@Kerry350 Kerry350 force-pushed the 167-consolidate-obs-ai-assistant-settings branch from 0df4829 to 6238809 Compare September 4, 2024 15:58
@Kerry350
Copy link
Contributor Author

Kerry350 commented Sep 4, 2024

/ci

@Kerry350 Kerry350 force-pushed the 167-consolidate-obs-ai-assistant-settings branch from 02ffe2a to 695999f Compare September 5, 2024 10:48
@Kerry350
Copy link
Contributor Author

Kerry350 commented Sep 5, 2024

/ci

…s setting.

Register log sources setting in serverless.
@Kerry350 Kerry350 force-pushed the 167-consolidate-obs-ai-assistant-settings branch from 695999f to 0e7ab20 Compare September 5, 2024 11:53
@Kerry350
Copy link
Contributor Author

Kerry350 commented Sep 5, 2024

/ci

@Kerry350 Kerry350 marked this pull request as ready for review September 9, 2024 14:06
@Kerry350 Kerry350 requested review from a team as code owners September 9, 2024 14:06
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

@Kerry350
Copy link
Contributor Author

Kerry350 commented Sep 9, 2024

@elasticmachine merge upstream

@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant labels Sep 9, 2024
Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

LGTM

@Kerry350
Copy link
Contributor Author

@elasticmachine merge upstream

@neptunian
Copy link
Contributor

neptunian commented Sep 13, 2024

Similar to the way Logs settings does not allow editing of the Logs Sources advanced setting it renders and is read only, I think it might be confusing to have it editable in the AI Assistant settings. I think these settings are for AI Assistant only and not affecting other apps. I'd prefer to follow the same UX as Logs settings and have it read only with a link.

I think the "disabled" attribute might be better as it has the grey background and is clear its not editable, eg:

Screenshot 2024-09-13 at 1 11 57 PM

CC @dgieselaar @emma-raffenne

@dgieselaar
Copy link
Member

I think it might be confusing to have it editable in the AI Assistant settings.

Agree, let's disable it there.

@Kerry350
Copy link
Contributor Author

Kerry350 commented Sep 16, 2024

@neptunian Thanks for reviewing. I've copied the behaviour from the logs UI settings page (this is now a shared component from logs data access). Should be good for another look 👍

AI Assistant settings:

Screenshot 2024-09-16 at 12 59 38

Logs UI:

Screenshot 2024-09-16 at 12 59 24

Copy link
Contributor

@tonyghiani tonyghiani left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

Telemetry changes LGTM

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 17, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: 6510167
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-192003-6510167fac2e

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
logsDataAccess 12 14 +2
observabilityAIAssistant 104 105 +1
total +3

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/management-settings-ids 141 140 -1
logsDataAccess 11 13 +2
total +1

Async chunks

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

id before after diff
infra 1.6MB 1.6MB -1.4KB
observabilityAiAssistantManagement 91.5KB 91.6KB +149.0B
total -1.3KB

Page load bundle

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

id before after diff
logsDataAccess 5.1KB 6.7KB +1.7KB
observabilityAIAssistant 46.0KB 46.0KB -17.0B
observabilityAiAssistantManagement 4.8KB 5.0KB +144.0B
total +1.8KB
Unknown metric groups

API count

id before after diff
@kbn/management-settings-ids 143 142 -1
logsDataAccess 13 15 +2
total +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @Kerry350

@Kerry350 Kerry350 merged commit ebe4686 into elastic:main Sep 17, 2024
23 checks passed
@kibanamachine kibanamachine added v9.0.0 backport:skip This commit does not require backporting labels Sep 17, 2024
@jbudz
Copy link
Member

jbudz commented Sep 20, 2024

@Kerry350 can you check if this needs to be backported to 8.x?

@Kerry350
Copy link
Contributor Author

💚 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

Kerry350 added a commit to Kerry350/kibana that referenced this pull request Sep 23, 2024
## Summary

Closes elastic/logs-dev#167.

- Removes registration of the AI Assistant specific advanced setting
(`observability:aiAssistantLogsIndexPattern`).
- Replaces the setting with use of the central log sources setting
(`observability:logSources`).
- ℹ️ Also registers the central log sources setting in serverless (this
was missed previously).

Due to the impact that this setting has on alerts
([Discussion](elastic/logs-dev#170 (comment)))
a migration path from one setting to the other isn't really possible, as
values from the AI Assistant setting could potentially cause unwanted
alerts. As such these changes opt for the route that we'll do a straight
swap, and document this in release notes.

We will also need to do a migration on the `config` (for advanced
settings) Saved Object to remove instances of the old setting /
property. With the new "model version" migration model [my understanding
is this should happen in a separate followup
PR](https://github.com/elastic/kibana/blob/main/packages/core/saved-objects/core-saved-objects-server/src/model_version/model_change.ts#L131).

⚠️ ~One potentially open question is whether the custom management
section that the AI Assistant mounts when clicking "AI Assistant
Settings" should render the log sources setting? (As this setting
affects more than just the AI Assistant).~
[Resolved](elastic#192003 (comment))

![Screenshot 2024-09-05 at 11 53
31](https://github.com/user-attachments/assets/ac3816ca-9021-42f1-9a9c-4c623c6943bb)

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit ebe4686)

# Conflicts:
#	packages/serverless/settings/observability_project/index.ts
Kerry350 added a commit that referenced this pull request Sep 24, 2024
…#193723)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Logs] Remove AI Assistant specific log index setting
(#192003)](#192003)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Kerry
Gallagher","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-17T13:26:54Z","message":"[Logs]
Remove AI Assistant specific log index setting (#192003)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/logs-dev/issues/167.\r\n\r\n- Removes
registration of the AI Assistant specific advanced
setting\r\n(`observability:aiAssistantLogsIndexPattern`).\r\n- Replaces
the setting with use of the central log sources
setting\r\n(`observability:logSources`).\r\n- ℹ️ Also registers the
central log sources setting in serverless (this\r\nwas missed
previously).\r\n\r\nDue to the impact that this setting has on
alerts\r\n([Discussion](https://github.com/elastic/logs-dev/issues/170#issuecomment-2229130314))\r\na
migration path from one setting to the other isn't really possible,
as\r\nvalues from the AI Assistant setting could potentially cause
unwanted\r\nalerts. As such these changes opt for the route that we'll
do a straight\r\nswap, and document this in release notes.\r\n\r\nWe
will also need to do a migration on the `config` (for
advanced\r\nsettings) Saved Object to remove instances of the old
setting /\r\nproperty. With the new \"model version\" migration model
[my understanding\r\nis this should happen in a separate
followup\r\nPR](https://github.com/elastic/kibana/blob/main/packages/core/saved-objects/core-saved-objects-server/src/model_version/model_change.ts#L131).\r\n\r\n⚠️
~One potentially open question is whether the custom
management\r\nsection that the AI Assistant mounts when clicking \"AI
Assistant\r\nSettings\" should render the log sources setting? (As this
setting\r\naffects more than just the AI
Assistant).~\r\n[Resolved](https://github.com/elastic/kibana/pull/192003#issuecomment-2352727034)\r\n\r\n![Screenshot
2024-09-05 at 11
53\r\n31](https://github.com/user-attachments/assets/ac3816ca-9021-42f1-9a9c-4c623c6943bb)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"ebe4686e6c53a640d8ff2cfc60a7eeceb132812b","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:deprecation","backport:skip","v9.0.0","Team:Obs
AI
Assistant","ci:project-deploy-observability","Team:obs-ux-logs","Team:obs-ux-infra_services","apm:review"],"number":192003,"url":"https://github.com/elastic/kibana/pull/192003","mergeCommit":{"message":"[Logs]
Remove AI Assistant specific log index setting (#192003)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/logs-dev/issues/167.\r\n\r\n- Removes
registration of the AI Assistant specific advanced
setting\r\n(`observability:aiAssistantLogsIndexPattern`).\r\n- Replaces
the setting with use of the central log sources
setting\r\n(`observability:logSources`).\r\n- ℹ️ Also registers the
central log sources setting in serverless (this\r\nwas missed
previously).\r\n\r\nDue to the impact that this setting has on
alerts\r\n([Discussion](https://github.com/elastic/logs-dev/issues/170#issuecomment-2229130314))\r\na
migration path from one setting to the other isn't really possible,
as\r\nvalues from the AI Assistant setting could potentially cause
unwanted\r\nalerts. As such these changes opt for the route that we'll
do a straight\r\nswap, and document this in release notes.\r\n\r\nWe
will also need to do a migration on the `config` (for
advanced\r\nsettings) Saved Object to remove instances of the old
setting /\r\nproperty. With the new \"model version\" migration model
[my understanding\r\nis this should happen in a separate
followup\r\nPR](https://github.com/elastic/kibana/blob/main/packages/core/saved-objects/core-saved-objects-server/src/model_version/model_change.ts#L131).\r\n\r\n⚠️
~One potentially open question is whether the custom
management\r\nsection that the AI Assistant mounts when clicking \"AI
Assistant\r\nSettings\" should render the log sources setting? (As this
setting\r\naffects more than just the AI
Assistant).~\r\n[Resolved](https://github.com/elastic/kibana/pull/192003#issuecomment-2352727034)\r\n\r\n![Screenshot
2024-09-05 at 11
53\r\n31](https://github.com/user-attachments/assets/ac3816ca-9021-42f1-9a9c-4c623c6943bb)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"ebe4686e6c53a640d8ff2cfc60a7eeceb132812b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192003","number":192003,"mergeCommit":{"message":"[Logs]
Remove AI Assistant specific log index setting (#192003)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/logs-dev/issues/167.\r\n\r\n- Removes
registration of the AI Assistant specific advanced
setting\r\n(`observability:aiAssistantLogsIndexPattern`).\r\n- Replaces
the setting with use of the central log sources
setting\r\n(`observability:logSources`).\r\n- ℹ️ Also registers the
central log sources setting in serverless (this\r\nwas missed
previously).\r\n\r\nDue to the impact that this setting has on
alerts\r\n([Discussion](https://github.com/elastic/logs-dev/issues/170#issuecomment-2229130314))\r\na
migration path from one setting to the other isn't really possible,
as\r\nvalues from the AI Assistant setting could potentially cause
unwanted\r\nalerts. As such these changes opt for the route that we'll
do a straight\r\nswap, and document this in release notes.\r\n\r\nWe
will also need to do a migration on the `config` (for
advanced\r\nsettings) Saved Object to remove instances of the old
setting /\r\nproperty. With the new \"model version\" migration model
[my understanding\r\nis this should happen in a separate
followup\r\nPR](https://github.com/elastic/kibana/blob/main/packages/core/saved-objects/core-saved-objects-server/src/model_version/model_change.ts#L131).\r\n\r\n⚠️
~One potentially open question is whether the custom
management\r\nsection that the AI Assistant mounts when clicking \"AI
Assistant\r\nSettings\" should render the log sources setting? (As this
setting\r\naffects more than just the AI
Assistant).~\r\n[Resolved](https://github.com/elastic/kibana/pull/192003#issuecomment-2352727034)\r\n\r\n![Screenshot
2024-09-05 at 11
53\r\n31](https://github.com/user-attachments/assets/ac3816ca-9021-42f1-9a9c-4c623c6943bb)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"ebe4686e6c53a640d8ff2cfc60a7eeceb132812b"}}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:review backport:skip This commit does not require backporting ci:project-deploy-observability Create an Observability project release_note:deprecation Team:Obs AI Assistant Observability AI Assistant Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:obs-ux-logs Observability Logs User Experience Team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.