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

[Alerting] migrates acceptance and functional test fixtures to KP #64888

Merged
merged 16 commits into from
May 6, 2020
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
16 changes: 16 additions & 0 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,14 @@
'@types/podium',
],
},
{
groupSlug: 'pretty-ms',
groupName: 'pretty-ms related packages',
packageNames: [
'pretty-ms',
'@types/pretty-ms',
],
},
{
groupSlug: 'proper-lockfile',
groupName: 'proper-lockfile related packages',
Expand Down Expand Up @@ -864,6 +872,14 @@
'@types/sinon',
],
},
{
groupSlug: 'stats-lite',
groupName: 'stats-lite related packages',
packageNames: [
'stats-lite',
'@types/stats-lite',
],
},
{
groupSlug: 'storybook',
groupName: 'storybook related packages',
Expand Down
2 changes: 2 additions & 0 deletions test/scripts/jenkins_xpack_build_kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ echo " -> building kibana platform plugins"
node scripts/build_kibana_platform_plugins \
--scan-dir "$XPACK_DIR/test/plugin_functional/plugins" \
--scan-dir "$XPACK_DIR/test/functional_with_es_ssl/fixtures/plugins" \
--scan-dir "$XPACK_DIR/test/alerting_api_integration/plugins" \
--scan-dir "$XPACK_DIR/test/plugin_api_integration/plugins" \
--scan-dir "$XPACK_DIR/test/plugin_api_perf/plugins" \
--verbose;

# doesn't persist, also set in kibanaPipeline.groovy
Expand Down
2 changes: 0 additions & 2 deletions x-pack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { dashboardMode } from './legacy/plugins/dashboard_mode';
import { beats } from './legacy/plugins/beats_management';
import { maps } from './legacy/plugins/maps';
import { spaces } from './legacy/plugins/spaces';
import { taskManager } from './legacy/plugins/task_manager';
import { encryptedSavedObjects } from './legacy/plugins/encrypted_saved_objects';
import { ingestManager } from './legacy/plugins/ingest_manager';

Expand All @@ -26,7 +25,6 @@ module.exports = function(kibana) {
dashboardMode(kibana),
beats(kibana),
maps(kibana),
taskManager(kibana),
encryptedSavedObjects(kibana),
ingestManager(kibana),
];
Expand Down
66 changes: 0 additions & 66 deletions x-pack/legacy/plugins/task_manager/server/index.ts

This file was deleted.

58 changes: 0 additions & 58 deletions x-pack/legacy/plugins/task_manager/server/legacy.ts

This file was deleted.

2 changes: 2 additions & 0 deletions x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@
"@types/uuid": "^3.4.4",
"@types/xml-crypto": "^1.4.0",
"@types/xml2js": "^0.4.5",
"@types/stats-lite": "^2.2.0",
"@types/pretty-ms": "^5.0.0",
"@welldone-software/why-did-you-render": "^4.0.0",
"abab": "^1.0.4",
"axios": "^0.19.0",
Expand Down
14 changes: 7 additions & 7 deletions x-pack/plugins/actions/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ export class ActionsPlugin implements Plugin<Promise<PluginSetupContract>, Plugi

const usageCollection = plugins.usageCollection;
if (usageCollection) {
initializeActionsTelemetry(
this.telemetryLogger,
plugins.taskManager,
core,
await this.kibanaIndex
);

core.getStartServices().then(async ([, startPlugins]) => {
registerActionsUsageCollector(usageCollection, startPlugins.taskManager);

initializeActionsTelemetry(
this.telemetryLogger,
plugins.taskManager,
core,
await this.kibanaIndex
);
});
}

Expand Down
14 changes: 7 additions & 7 deletions x-pack/plugins/alerting/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,15 @@ export class AlertingPlugin {

const usageCollection = plugins.usageCollection;
if (usageCollection) {
initializeAlertingTelemetry(
this.telemetryLogger,
core,
plugins.taskManager,
await this.kibanaIndex
);

core.getStartServices().then(async ([, startPlugins]) => {
registerAlertsUsageCollector(usageCollection, startPlugins.taskManager);

initializeAlertingTelemetry(
this.telemetryLogger,
core,
plugins.taskManager,
await this.kibanaIndex
);
});
}

Expand Down
30 changes: 15 additions & 15 deletions x-pack/plugins/apm/server/lib/apm_telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@ export async function createApmTelemetry({
taskManager: TaskManagerSetupContract;
logger: Logger;
}) {
taskManager.registerTaskDefinitions({
[APM_TELEMETRY_TASK_NAME]: {
title: 'Collect APM telemetry',
type: APM_TELEMETRY_TASK_NAME,
createTaskRunner: () => {
return {
run: async () => {
await collectAndStore();
},
cancel: async () => {}
};
}
}
});

const savedObjectsClient = await getInternalSavedObjectsClient(core);

const collectAndStore = async () => {
Expand Down Expand Up @@ -79,21 +94,6 @@ export async function createApmTelemetry({
);
};

taskManager.registerTaskDefinitions({
[APM_TELEMETRY_TASK_NAME]: {
title: 'Collect APM telemetry',
type: APM_TELEMETRY_TASK_NAME,
createTaskRunner: () => {
return {
run: async () => {
await collectAndStore();
},
cancel: async () => {}
};
}
}
});

const collector = usageCollector.makeUsageCollector({
type: 'apm',
fetch: async () => {
Expand Down
62 changes: 0 additions & 62 deletions x-pack/plugins/task_manager/server/create_task_manager.test.ts

This file was deleted.

43 changes: 0 additions & 43 deletions x-pack/plugins/task_manager/server/create_task_manager.ts

This file was deleted.

1 change: 0 additions & 1 deletion x-pack/plugins/task_manager/server/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { TaskManagerSetupContract, TaskManagerStartContract } from './plugin';

const createSetupMock = () => {
const mock: jest.Mocked<TaskManagerSetupContract> = {
registerLegacyAPI: jest.fn(),
addMiddleware: jest.fn(),
registerTaskDefinitions: jest.fn(),
};
Expand Down
Loading