-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Remove dependency on infra in monitoring plugin #203551
Remove dependency on infra in monitoring plugin #203551
Conversation
@@ -26,7 +26,6 @@ export function enableAlertsRoute(server: MonitoringCore, npRoute: RouteDependen | |||
async (context, request, response) => { | |||
try { | |||
const alertingContext = await context.alerting; | |||
const infraContext = await context.infra; |
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.
ℹ️ This is the only place the infra plugin was used on the server side - it filled in the space it in some server info logs about rule creation.
Theoretically it would be possible to add the spaces plugin as dependency to get the same information, but it doesn't seem worth it doing so as this is strictly about info logging. So I just removed the space id from the log line
@@ -126,6 +126,10 @@ function getLogsUiLink(clusterUuid, nodeId, indexUuid, sharePlugin, logsIndices) | |||
const filter = params.join(' and '); | |||
const discoverLocator = sharePlugin.url.locators.get('DISCOVER_APP_LOCATOR'); | |||
|
|||
if (!discoverLocator) { |
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.
ℹ️ If for some reason the discover locator is not available, sharePlugin.url.locators.get
will return undefined - this is catching this case.
|
||
return infra ? ( |
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.
ℹ️ Rendering the callout was guarded by whether infra
is available or not, which doesn't make a lot of sense anymore since we provide a link to discover, not infra here.
So it's now guarded by whether we can successfully generate a discover link or not.
…ana into flash1293/monitoring-infra
…ana into flash1293/monitoring-infra
/oblt-deploy |
@consulthys this was missing a prerequisite - I just merged it in, now it hopefully works (we will see what CI says) |
Thanks @flash1293 |
@consulthys I think so, but we can also wait for CI to check whether it even builds or whether I missed something somewhere |
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.
LGT Stack Monitoring
No issues encountered while testing:
- default rules could be created successfully
- the Discover link appeared below the logs (when available)
…ana into flash1293/monitoring-infra
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.
Lastest fixes LGT Stack Monitoring
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
|
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.
classification makes sense:
- logstash is owned by platform/ingest
- monitoring is owned by platform/opex
Starting backport for target branches: 8.x |
Blocked by elastic#203492 The monitoring plugin is currently marked as observability plugin because it's relying on the `infra` plugin. However, in practice, no functionality is actually used. This PR removes the dependency -it makes monitoring and logstash a `platform/private` plugin as well (logstash needs to go along with monitoring, but that should be fine because it's only required by monitoring). Some considerations left as comments in the code. --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 59d3ac6)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Blocked by elastic#203492 The monitoring plugin is currently marked as observability plugin because it's relying on the `infra` plugin. However, in practice, no functionality is actually used. This PR removes the dependency -it makes monitoring and logstash a `platform/private` plugin as well (logstash needs to go along with monitoring, but that should be fine because it's only required by monitoring). Some considerations left as comments in the code. --------- Co-authored-by: kibanamachine <[email protected]>
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. |
4 similar comments
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. |
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. |
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. |
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. |
) # Backport This will backport the following commits from `main` to `8.x`: - [Remove dependency on infra in monitoring plugin (#203551)](#203551) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Joe Reuter","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-11T16:11:06Z","message":"Remove dependency on infra in monitoring plugin (#203551)\n\nBlocked by https://github.com/elastic/kibana/pull/203492\r\n\r\nThe monitoring plugin is currently marked as observability plugin\r\nbecause it's relying on the `infra` plugin.\r\n\r\nHowever, in practice, no functionality is actually used. This PR removes\r\nthe dependency -it makes monitoring and logstash a `platform/private`\r\nplugin as well (logstash needs to go along with monitoring, but that\r\nshould be fine because it's only required by monitoring).\r\n\r\nSome considerations left as comments in the code.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"59d3ac65ec59408f22c31e629ea563292943727e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","v8.18.0"],"title":"Remove dependency on infra in monitoring plugin","number":203551,"url":"https://github.com/elastic/kibana/pull/203551","mergeCommit":{"message":"Remove dependency on infra in monitoring plugin (#203551)\n\nBlocked by https://github.com/elastic/kibana/pull/203492\r\n\r\nThe monitoring plugin is currently marked as observability plugin\r\nbecause it's relying on the `infra` plugin.\r\n\r\nHowever, in practice, no functionality is actually used. This PR removes\r\nthe dependency -it makes monitoring and logstash a `platform/private`\r\nplugin as well (logstash needs to go along with monitoring, but that\r\nshould be fine because it's only required by monitoring).\r\n\r\nSome considerations left as comments in the code.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"59d3ac65ec59408f22c31e629ea563292943727e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203551","number":203551,"mergeCommit":{"message":"Remove dependency on infra in monitoring plugin (#203551)\n\nBlocked by https://github.com/elastic/kibana/pull/203492\r\n\r\nThe monitoring plugin is currently marked as observability plugin\r\nbecause it's relying on the `infra` plugin.\r\n\r\nHowever, in practice, no functionality is actually used. This PR removes\r\nthe dependency -it makes monitoring and logstash a `platform/private`\r\nplugin as well (logstash needs to go along with monitoring, but that\r\nshould be fine because it's only required by monitoring).\r\n\r\nSome considerations left as comments in the code.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"59d3ac65ec59408f22c31e629ea563292943727e"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Joe Reuter <[email protected]>
Blocked by elastic#203492 The monitoring plugin is currently marked as observability plugin because it's relying on the `infra` plugin. However, in practice, no functionality is actually used. This PR removes the dependency -it makes monitoring and logstash a `platform/private` plugin as well (logstash needs to go along with monitoring, but that should be fine because it's only required by monitoring). Some considerations left as comments in the code. --------- Co-authored-by: kibanamachine <[email protected]>
Blocked by #203492
The monitoring plugin is currently marked as observability plugin because it's relying on the
infra
plugin.However, in practice, no functionality is actually used. This PR removes the dependency -it makes monitoring and logstash a
platform/private
plugin as well (logstash needs to go along with monitoring, but that should be fine because it's only required by monitoring).Some considerations left as comments in the code.