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

[8.x] Address some of the no_group_crossing dependencies (#198261) #199165

Merged
merged 3 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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"
}
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"
}
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
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