Skip to content

Sustainable Kibana Architecture: Remove dependencies between plugins that are related by _App Links_#199492

Merged
gsoldevila merged 9 commits intoelastic:mainfrom
gsoldevila:kbn-team-1079-links-to-apps-are-not-deps
Nov 14, 2024
Merged

Sustainable Kibana Architecture: Remove dependencies between plugins that are related by _App Links_#199492
gsoldevila merged 9 commits intoelastic:mainfrom
gsoldevila:kbn-team-1079-links-to-apps-are-not-deps

Conversation

@gsoldevila
Copy link
Copy Markdown
Member

@gsoldevila gsoldevila commented Nov 8, 2024

Summary

This PR introduces a Core API to check whether a given application has been registered.
Plugins can use this for their App Links, without having to depend on the referenced plugin(s) anymore.

This way, we can get rid of some inter-solution dependencies, and categorise plugins more appropriately.

@gsoldevila gsoldevila added Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor labels Nov 8, 2024
@gsoldevila gsoldevila self-assigned this Nov 8, 2024
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Am I wrong or this URL was broken?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This was briefly broken last week in the O11y Solution nav because enterprise search was disabled, but we fixed that and the link worked when I checked. But you're right that the appId should be enterpriseSearch so that is very confusing 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I confirm this is fixed externally to this PR too (noticed when rebasing).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: it might be useful to mention in the tsdocs of navigateToApp something like:

If a plugin is disabled any applications it registers won't be available either. Before rendering a UI element that a user could use to navigate to another application, first check if the destination application is actually available using the isAppRegistered API.

@gsoldevila gsoldevila force-pushed the kbn-team-1079-links-to-apps-are-not-deps branch from 0e6742f to 9ef9cfa Compare November 9, 2024 14:43
@gsoldevila gsoldevila marked this pull request as ready for review November 9, 2024 14:44
@gsoldevila gsoldevila requested review from a team as code owners November 9, 2024 14:44
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-core (Team:Core)

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

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 9, 2024

🤖 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!)

@gsoldevila gsoldevila force-pushed the kbn-team-1079-links-to-apps-are-not-deps branch from 1771ae8 to 6c57443 Compare November 9, 2024 19:44
@gsoldevila gsoldevila requested a review from a team as a code owner November 9, 2024 19:44
@gsoldevila gsoldevila force-pushed the kbn-team-1079-links-to-apps-are-not-deps branch from 6c57443 to cb54b2c Compare November 10, 2024 07:56
@gsoldevila gsoldevila requested a review from a team as a code owner November 10, 2024 07:56
Copy link
Copy Markdown
Contributor

@adcoelho adcoelho 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 ok 👍

Copy link
Copy Markdown
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

Changes in Data Discovery mocks LGTM

@gsoldevila gsoldevila force-pushed the kbn-team-1079-links-to-apps-are-not-deps branch from cb54b2c to 29177a9 Compare November 11, 2024 10:03
@gsoldevila gsoldevila requested a review from a team as a code owner November 11, 2024 10:03
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Here I believe I went too far, I made enterpriseSearch part of "Search" solution only.

This will make observability-ai-assistant-management menu entry totally useless when we have independent solution builds.

However, if we rollback the changes, we have a domino effect that forces us to expose searchPlayground as platform/shared too.

@sphilipse WDYT?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, I think we need to make this platform/shared for now. Exposing playground as platform/shared is fine for now IMO. We have open tickets to separate this stuff and implement better RBAC which will eventually fix all of these problems. (we need to do that for our ent-search deprecation anyway)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This will make observability-ai-assistant-management menu entry totally useless when we have independent solution builds.

Sorry, what does this mean?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The observability-ai-assistant-management has a link to the searchPlayground.
This creates a dependency O11y=>Search that we are solving my making searchPlayground platform/shared for now.

I rollbacked the change at the root of this discussion in 0aa726b

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@dgieselaar could you PTAL? TIA

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As discussed, we can keep the conflicting search plugins as search/private for now.
These plugins need to be refactored and external dependencies issues addressed before solution-specific builds.

Copy link
Copy Markdown
Member

@kpollich kpollich left a comment

Choose a reason for hiding this comment

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

Fleet change 🚀

@gsoldevila gsoldevila force-pushed the kbn-team-1079-links-to-apps-are-not-deps branch from 29177a9 to dbc531b Compare November 12, 2024 08:29
@gsoldevila gsoldevila changed the title Sustainable Kibana Architecture: Make enterprise-search part of Search solution Sustainable Kibana Architecture: Remove dependencies between plugins that are related by _App Links_ Nov 12, 2024
@gsoldevila gsoldevila force-pushed the kbn-team-1079-links-to-apps-are-not-deps branch from dbc531b to eba5431 Compare November 12, 2024 09:22
@gsoldevila gsoldevila enabled auto-merge (squash) November 13, 2024 15:09
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Nov 14, 2024

💔 Build Failed

Failed CI Steps

Metrics [docs]

‼️ ERROR: no builds found for mergeBase sha [f4af267]

History

cc @gsoldevila

@gsoldevila gsoldevila merged commit ad56ec5 into elastic:main Nov 14, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.x

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

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Nov 14, 2024
…that are related by _App Links_ (elastic#199492)

## Summary

This PR introduces a Core API to check whether a given application has
been registered.
Plugins can use this for their _App Links_, without having to depend on
the referenced plugin(s) anymore.

This way, we can get rid of some inter-solution dependencies, and
categorise plugins more appropriately.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit ad56ec5)
@kibanamachine
Copy link
Copy Markdown
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 Nov 14, 2024
…ugins that are related by _App Links_ (#199492) (#200159)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Sustainable Kibana Architecture: Remove dependencies between plugins
that are related by _App Links_
(#199492)](#199492)

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

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

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2024-11-14T11:49:21Z","message":"Sustainable
Kibana Architecture: Remove dependencies between plugins that are
related by _App Links_ (#199492)\n\n## Summary\r\n\r\nThis PR introduces
a Core API to check whether a given application has\r\nbeen
registered.\r\nPlugins can use this for their _App Links_, without
having to depend on\r\nthe referenced plugin(s) anymore.\r\n\r\nThis
way, we can get rid of some inter-solution dependencies,
and\r\ncategorise plugins more
appropriately.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ad56ec5f1a838486d9b38c2d5aa92bbf77e127a3","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:prev-minor","Team:Obs
AI Assistant","ci:project-deploy-observability"],"title":"Sustainable
Kibana Architecture: Remove dependencies between plugins that are
related by _App
Links_","number":199492,"url":"https://github.com/elastic/kibana/pull/199492","mergeCommit":{"message":"Sustainable
Kibana Architecture: Remove dependencies between plugins that are
related by _App Links_ (#199492)\n\n## Summary\r\n\r\nThis PR introduces
a Core API to check whether a given application has\r\nbeen
registered.\r\nPlugins can use this for their _App Links_, without
having to depend on\r\nthe referenced plugin(s) anymore.\r\n\r\nThis
way, we can get rid of some inter-solution dependencies,
and\r\ncategorise plugins more
appropriately.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ad56ec5f1a838486d9b38c2d5aa92bbf77e127a3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199492","number":199492,"mergeCommit":{"message":"Sustainable
Kibana Architecture: Remove dependencies between plugins that are
related by _App Links_ (#199492)\n\n## Summary\r\n\r\nThis PR introduces
a Core API to check whether a given application has\r\nbeen
registered.\r\nPlugins can use this for their _App Links_, without
having to depend on\r\nthe referenced plugin(s) anymore.\r\n\r\nThis
way, we can get rid of some inter-solution dependencies,
and\r\ncategorise plugins more
appropriately.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ad56ec5f1a838486d9b38c2d5aa92bbf77e127a3"}}]}]
BACKPORT-->

Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
…that are related by _App Links_ (elastic#199492)

## Summary

This PR introduces a Core API to check whether a given application has
been registered.
Plugins can use this for their _App Links_, without having to depend on
the referenced plugin(s) anymore.

This way, we can get rid of some inter-solution dependencies, and
categorise plugins more appropriately.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
…that are related by _App Links_ (elastic#199492)

## Summary

This PR introduces a Core API to check whether a given application has
been registered.
Plugins can use this for their _App Links_, without having to depend on
the referenced plugin(s) anymore.

This way, we can get rid of some inter-solution dependencies, and
categorise plugins more appropriately.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// Team:Obs AI Assistant Observability AI Assistant v8.17.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants