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

Make data depend on security and task manager #128730

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 3 additions & 6 deletions src/plugins/custom_integrations/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
"description": "Add custom data integrations so they can be displayed in the Fleet integrations app",
"ui": true,
"server": true,
"extraPublicDirs": [
"common"
],
"requiredPlugins": [
"presentationUtil"
],
"extraPublicDirs": ["common"],
"requiredPlugins": [],
"requiredBundles": ["presentationUtil"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically there is still a circular dependency through requiredBundles that should be fixed. But it isn't blocking.

data -> security -> home -> customIntegrations -> presentationUtils -> data. I think we can break up customIntegrations -> presentationUtils

Issue: #121951

"optionalPlugins": []
}
7 changes: 2 additions & 5 deletions src/plugins/custom_integrations/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* Side Public License, v 1.
*/

import type { PresentationUtilPluginStart } from '../../presentation_util/public';

import { CustomIntegration } from '../common';

export interface CustomIntegrationsSetup {
Expand All @@ -19,6 +17,5 @@ export interface CustomIntegrationsStart {
ContextProvider: React.FC;
}

export interface CustomIntegrationsStartDependencies {
presentationUtil: PresentationUtilPluginStart;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface CustomIntegrationsStartDependencies {}
2 changes: 1 addition & 1 deletion src/plugins/data/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ui": true,
"requiredPlugins": ["bfetch", "expressions", "uiActions", "share", "inspector", "fieldFormats", "dataViews"],
"serviceFolders": ["search", "query", "autocomplete", "ui"],
"optionalPlugins": ["usageCollection"],
"optionalPlugins": ["usageCollection", "taskManager", "security"],
"extraPublicDirs": ["common"],
"requiredBundles": ["kibanaUtils", "kibanaReact", "inspector"],
"owner": {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/home/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"include": ["common/**/*", "public/**/*", "server/**/*", "config.ts"],
"references": [
{ "path": "../../core/tsconfig.json" },
{ "path": "../data/tsconfig.json" },
{ "path": "../data_views/tsconfig.json" },
{ "path": "../custom_integrations/tsconfig.json" },
{ "path": "../kibana_react/tsconfig.json" },
{ "path": "../share/tsconfig.json" },
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/security/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"version": "8.0.0",
"kibanaVersion": "kibana",
"configPath": ["xpack", "security"],
"requiredPlugins": ["data", "features", "licensing", "taskManager"],
"requiredPlugins": ["dataViews", "features", "licensing", "taskManager"],
"optionalPlugins": ["home", "management", "usageCollection", "spaces", "share"],
"server": true,
"ui": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const rolesManagementApp = Object.freeze({
title,
async mount({ element, theme$, setBreadcrumbs, history }) {
const [
[startServices, { data, features, spaces }],
[startServices, { dataViews, features, spaces }],
{ RolesGridPage },
{ EditRolePage },
{ RolesAPIClient },
Expand Down Expand Up @@ -108,7 +108,7 @@ export const rolesManagementApp = Object.freeze({
license={license}
docLinks={docLinks}
uiCapabilities={application.capabilities}
dataViews={data.dataViews}
dataViews={dataViews}
history={history}
spacesApiUi={spacesApiUi}
/>
Expand Down
8 changes: 4 additions & 4 deletions x-pack/plugins/security/public/plugin.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Observable } from 'rxjs';

import type { CoreSetup } from 'src/core/public';
import { coreMock } from 'src/core/public/mocks';
import type { DataPublicPluginStart } from 'src/plugins/data/public';
import type { DataViewsPublicPluginStart } from 'src/plugins/data_views/public';
import { managementPluginMock } from 'src/plugins/management/public/mocks';

import type { FeaturesPluginStart } from '../../features/public';
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('Security Plugin', () => {

expect(
plugin.start(coreMock.createStart({ basePath: '/some-base-path' }), {
data: {} as DataPublicPluginStart,
dataViews: {} as DataViewsPublicPluginStart,
features: {} as FeaturesPluginStart,
})
).toEqual({
Expand Down Expand Up @@ -133,7 +133,7 @@ describe('Security Plugin', () => {

const coreStart = coreMock.createStart({ basePath: '/some-base-path' });
plugin.start(coreStart, {
data: {} as DataPublicPluginStart,
dataViews: {} as DataViewsPublicPluginStart,
features: {} as FeaturesPluginStart,
management: managementStartMock,
});
Expand Down Expand Up @@ -162,7 +162,7 @@ describe('Security Plugin', () => {
);

plugin.start(coreMock.createStart({ basePath: '/some-base-path' }), {
data: {} as DataPublicPluginStart,
dataViews: {} as DataViewsPublicPluginStart,
features: {} as FeaturesPluginStart,
});

Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/security/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { i18n } from '@kbn/i18n';
import type { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from 'src/core/public';
import type { DataPublicPluginStart } from 'src/plugins/data/public';
import type { DataViewsPublicPluginStart } from 'src/plugins/data_views/public';
import type { HomePublicPluginSetup } from 'src/plugins/home/public';
import type { ManagementSetup, ManagementStart } from 'src/plugins/management/public';

Expand Down Expand Up @@ -39,7 +39,7 @@ export interface PluginSetupDependencies {
}

export interface PluginStartDependencies {
data: DataPublicPluginStart;
dataViews: DataViewsPublicPluginStart;
features: FeaturesPluginStart;
management?: ManagementStart;
spaces?: SpacesPluginStart;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/security/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{ "path": "../licensing/tsconfig.json" },
{ "path": "../spaces/tsconfig.json" },
{ "path": "../task_manager/tsconfig.json" },
{ "path": "../../../src/plugins/data/tsconfig.json" },
{ "path": "../../../src/plugins/data_views/tsconfig.json" },
{ "path": "../../../src/plugins/es_ui_shared/tsconfig.json" },
{ "path": "../../../src/plugins/home/tsconfig.json" },
{ "path": "../../../src/plugins/kibana_react/tsconfig.json" },
Expand Down