Skip to content

Commit

Permalink
[8.x] Address some of the no_group_crossing dependencies (#198261) (#…
Browse files Browse the repository at this point in the history
…199165)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Address some of the `no_group_crossing` dependencies
(#198261)](#198261)

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

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

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T14:44:35Z","message":"Address
some of the `no_group_crossing` dependencies (#198261)\n\n###
Summary\r\n\r\nThis PR relocates some plugins and packages that are
incorrectly\r\ncategorised, aiming at reducing inter-solution
dependencies. It also\r\nfixes some incorrect import statements that
introduce unnecessary\r\ndependencies with other
components.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Maryam Saeidi
<[email protected]>","sha":"730f4c9d2a5119a9f30e9b94ccb28ec418af270a","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","Team:obs-ux-management"],"number":198261,"url":"https://github.com/elastic/kibana/pull/198261","mergeCommit":{"message":"Address
some of the `no_group_crossing` dependencies (#198261)\n\n###
Summary\r\n\r\nThis PR relocates some plugins and packages that are
incorrectly\r\ncategorised, aiming at reducing inter-solution
dependencies. It also\r\nfixes some incorrect import statements that
introduce unnecessary\r\ndependencies with other
components.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Maryam Saeidi
<[email protected]>","sha":"730f4c9d2a5119a9f30e9b94ccb28ec418af270a"}},"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/198261","number":198261,"mergeCommit":{"message":"Address
some of the `no_group_crossing` dependencies (#198261)\n\n###
Summary\r\n\r\nThis PR relocates some plugins and packages that are
incorrectly\r\ncategorised, aiming at reducing inter-solution
dependencies. It also\r\nfixes some incorrect import statements that
introduce unnecessary\r\ndependencies with other
components.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Maryam Saeidi
<[email protected]>","sha":"730f4c9d2a5119a9f30e9b94ccb28ec418af270a"}}]}]
BACKPORT-->
  • Loading branch information
gsoldevila authored Nov 8, 2024
1 parent b667b5a commit 722f758
Show file tree
Hide file tree
Showing 44 changed files with 121 additions and 173 deletions.
50 changes: 15 additions & 35 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1992,43 +1992,23 @@ module.exports = {
},
{
files: [
'packages/kbn-reporting/common/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package?
'packages/kbn-reporting/export_types/pdf_common/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package?
'packages/kbn-reporting/export_types/pdf/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package?
'packages/kbn-reporting/export_types/png_common/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package?
'packages/kbn-reporting/export_types/png/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package?
'packages/kbn-reporting/public/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package?
'packages/kbn-reporting/server/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package?
'packages/shared-ux/page/analytics_no_data/types/**',
'scripts/create_observability_rules.js', // TODO - is importing "@kbn/observability-alerting-test-data" (observability/private)
'src/cli_setup/**', // TODO @kibana/operations - is importing "@kbn/interactive-setup-plugin" (platform/private)
'src/dev/build/tasks/install_chromium.ts', // TODO @kibana/operations - is importing "@kbn/screenshotting-plugin" (platform/private)
'src/plugins/ai_assistant_management/selection/**',
'src/plugins/dashboard/**',
'src/plugins/discover/**',
'test/**',
'x-pack/examples/exploratory_view_example/**',
'x-pack/examples/screenshotting_example/**',
'x-pack/examples/ui_actions_enhanced_examples/**',
'x-pack/packages/security-solution/data_table/**',
'x-pack/plugins/aiops/**',
'x-pack/plugins/data_quality/**',
'x-pack/plugins/ingest_pipelines/**',
'x-pack/plugins/ml/**',
'x-pack/plugins/monitoring/**',
'x-pack/plugins/observability_solution/infra/**',
'x-pack/plugins/observability_solution/inventory/**',
'x-pack/plugins/observability_solution/investigate_app/**',
'x-pack/plugins/observability_solution/investigate/**',
// logsShared depends on o11y/private plugins, but platform plugins depend on it
'x-pack/plugins/observability_solution/logs_shared/**',
'x-pack/plugins/observability_solution/metrics_data_access/**',
'x-pack/plugins/observability_solution/observability_ai_assistant_app/**',
'x-pack/plugins/observability_solution/observability_ai_assistant_management/**',
'x-pack/plugins/observability_solution/observability/**',
'x-pack/plugins/observability_solution/slo/**',
'x-pack/plugins/observability_solution/synthetics/e2e/**',

// this plugin depends on visTypeTimeseries plugin (for TSVB viz) which is platform/private ATM
'x-pack/plugins/observability_solution/infra/**',

// TODO @kibana/operations
'scripts/create_observability_rules.js', // is importing "@kbn/observability-alerting-test-data" (observability/private)
'src/cli_setup/**', // is importing "@kbn/interactive-setup-plugin" (platform/private)
'src/dev/build/tasks/install_chromium.ts', // is importing "@kbn/screenshotting-plugin" (platform/private)

// @kbn/osquery-plugin could be categorised as Security, but @kbn/infra-plugin (observability) depends on it!
'x-pack/plugins/osquery/**',
'x-pack/plugins/search_assistant/**',

// For now, we keep the exception to let tests depend on anythying.
// Ideally, we need to classify the solution specific ones to reduce CI times
'test/**',
'x-pack/test_serverless/**',
'x-pack/test/**',
'x-pack/test/plugin_functional/plugins/resolver_test/**',
Expand Down
4 changes: 3 additions & 1 deletion packages/shared-ux/page/analytics_no_data/impl/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"type": "shared-browser",
"id": "@kbn/shared-ux-page-analytics-no-data",
"owner": "@elastic/appex-sharedux"
"owner": "@elastic/appex-sharedux",
"group": "platform",
"visibility": "private"
}
4 changes: 3 additions & 1 deletion packages/shared-ux/page/analytics_no_data/mocks/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"type": "shared-common",
"id": "@kbn/shared-ux-page-analytics-no-data-mocks",
"owner": "@elastic/appex-sharedux"
"owner": "@elastic/appex-sharedux",
"group": "platform",
"visibility": "private"
}
4 changes: 3 additions & 1 deletion packages/shared-ux/page/analytics_no_data/types/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"type": "shared-browser",
"id": "@kbn/shared-ux-page-analytics-no-data-types",
"owner": "@elastic/appex-sharedux"
"owner": "@elastic/appex-sharedux",
"group": "platform",
"visibility": "private"
}
5 changes: 3 additions & 2 deletions src/plugins/ai_assistant_management/selection/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"owner": [
"@elastic/obs-knowledge-team"
],
// This should probably be platform. While the code owner is currently observability, the package is a platform AI assistant selector.
"group": "platform",
"visibility": "private",
"visibility": "shared",
"plugin": {
"id": "aiAssistantManagementSelection",
"browser": true,
Expand All @@ -25,4 +26,4 @@
"kibanaReact"
]
}
}
}
2 changes: 2 additions & 0 deletions x-pack/examples/exploratory_view_example/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"type": "plugin",
"id": "@kbn/exploratory-view-example-plugin",
"owner": "@elastic/obs-ux-infra_services-team",
"group": "observability",
"visibility": "private",
"plugin": {
"id": "exploratoryViewExample",
"server": false,
Expand Down
4 changes: 4 additions & 0 deletions x-pack/examples/screenshotting_example/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"type": "plugin",
"id": "@kbn/screenshotting-example-plugin",
"owner": "@elastic/appex-sharedux",
// This plugin is not meant to be referenced or imported
"visibility": "private",
// If cloned / used as an inspiration, please bear in mind that your plugin might belong to a specific solution group
"group": "platform",
"description": "An example integration with the screenshotting plugin.",
"plugin": {
"id": "screenshottingExample",
Expand Down
4 changes: 4 additions & 0 deletions x-pack/examples/ui_actions_enhanced_examples/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"type": "plugin",
"id": "@kbn/ui-actions-enhanced-examples-plugin",
"owner": "@elastic/appex-sharedux",
// This plugin is not meant to be referenced or imported
"visibility": "private",
// If cloned / used as an inspiration, please bear in mind that your plugin might belong to a specific solution group
"group": "platform",
"plugin": {
"id": "uiActionsEnhancedExamples",
"server": false,
Expand Down
4 changes: 2 additions & 2 deletions x-pack/packages/kbn-ai-assistant/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"id": "@kbn/ai-assistant",
"owner": "@elastic/search-kibana",
"type": "shared-browser",
"group": "observability",
"visibility": "private"
"group": "platform",
"visibility": "shared"
}
4 changes: 3 additions & 1 deletion x-pack/packages/security-solution/data_table/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"type": "shared-common",
"id": "@kbn/securitysolution-data-table",
"owner": "@elastic/security-threat-hunting-investigations"
"owner": "@elastic/security-threat-hunting-investigations",
"group": "security",
"visibility": "private"
}
2 changes: 1 addition & 1 deletion x-pack/plugins/dashboard_enhanced/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@elastic/kibana-presentation"
],
"group": "platform",
"visibility": "private",
"visibility": "shared",
"plugin": {
"id": "dashboardEnhanced",
"browser": true,
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/data_quality/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"type": "plugin",
"id": "@kbn/data-quality-plugin",
"owner": "@elastic/obs-ux-logs-team",
"group": "observability",
"visibility": "private",
"plugin": {
"id": "dataQuality",
"server": true,
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/ingest_pipelines/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"type": "plugin",
"id": "@kbn/ingest-pipelines-plugin",
"owner": "@elastic/kibana-management",
"group": "platform",
"visibility": "shared",
"plugin": {
"id": "ingestPipelines",
"server": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { ElasticsearchClient } from '@kbn/core/server';
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { ESLicense } from '@kbn/telemetry-collection-xpack-plugin/server';
import type { LicenseGetLicenseInformation } from '@elastic/elasticsearch/lib/api/types';
import { INDEX_PATTERN_ELASTICSEARCH, USAGE_FETCH_INTERVAL } from '../../common/constants';

/**
Expand All @@ -18,7 +18,7 @@ export async function getLicenses(
callCluster: ElasticsearchClient,
timestamp: number,
maxBucketSize: number
): Promise<{ [clusterUuid: string]: ESLicense | undefined }> {
): Promise<{ [clusterUuid: string]: LicenseGetLicenseInformation | undefined }> {
const response = await fetchLicenses(callCluster, clusterUuids, timestamp, maxBucketSize);
return handleLicenses(response);
}
Expand Down Expand Up @@ -76,7 +76,7 @@ export async function fetchLicenses(
export interface ESClusterStatsWithLicense {
cluster_uuid: string;
type: 'cluster_stats';
license?: ESLicense;
license?: LicenseGetLicenseInformation;
}

/**
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/monitoring/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"@kbn/features-plugin",
"@kbn/infra-plugin",
"@kbn/licensing-plugin",
"@kbn/telemetry-collection-xpack-plugin",
"@kbn/triggers-actions-ui-plugin",
"@kbn/expect",
"@kbn/i18n",
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/observability_solution/infra/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"type": "plugin",
"id": "@kbn/infra-plugin",
"owner": ["@elastic/obs-ux-logs-team", "@elastic/obs-ux-infra_services-team"],
"group": "observability",
"visibility": "private",
"description": "This plugin visualizes data from Filebeat and Metricbeat, and integrates with other Observability solutions",
"plugin": {
"id": "infra",
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/observability_solution/inventory/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"type": "plugin",
"id": "@kbn/inventory-plugin",
"owner": "@elastic/obs-ux-infra_services-team",
"group": "observability",
"visibility": "private",
"plugin": {
"id": "inventory",
"server": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"type": "plugin",
"id": "@kbn/investigate-app-plugin",
"owner": "@elastic/obs-ux-management-team",
"group": "observability",
"visibility": "private",
"plugin": {
"id": "investigateApp",
"server": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
} from '@kbn/data-plugin/server';
import { PluginStart as DataViewsPluginStart } from '@kbn/data-views-plugin/server';
import { HomeServerPluginSetup } from '@kbn/home-plugin/server';
import { VisTypeTimeseriesSetup } from '@kbn/vis-type-timeseries-plugin/server';
import { FeaturesPluginSetup } from '@kbn/features-plugin/server';
import { SpacesPluginSetup } from '@kbn/spaces-plugin/server';
import { PluginSetupContract as AlertingPluginContract } from '@kbn/alerting-plugin/server';
Expand All @@ -37,7 +36,6 @@ export interface InfraServerPluginSetupDeps {
share: SharePluginSetup;
spaces: SpacesPluginSetup;
usageCollection: UsageCollectionSetup;
visTypeTimeseries: VisTypeTimeseriesSetup;
ml?: MlPluginSetup;
metricsDataAccess: MetricsDataPluginSetup;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@kbn/data-plugin",
"@kbn/data-views-plugin",
"@kbn/home-plugin",
"@kbn/vis-type-timeseries-plugin",
"@kbn/features-plugin",
"@kbn/spaces-plugin",
"@kbn/alerting-plugin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
ALERT_STATUS_RECOVERED,
ALERT_STATUS_UNTRACKED,
} from '@kbn/rule-data-utils';
import { Filter } from '@kbn/es-query';
import type { Filter } from '@kbn/es-query';
import { ALERT_STATUS_ALL } from './constants';

export type Maybe<T> = T | null | undefined;
Expand Down Expand Up @@ -54,5 +54,10 @@ export interface TimeRange {
to?: string;
}

export interface EventNonEcsData {
field: string;
value?: Maybe<string[]>;
}

// Alert fields['kibana.alert.group] type
export type GroupBy = Group[];
Loading

0 comments on commit 722f758

Please sign in to comment.