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 all remaining plugins to new platform #64335

Merged
merged 14 commits into from
Apr 29, 2020

Conversation

gmmorris
Copy link
Contributor

@gmmorris gmmorris commented Apr 23, 2020

Summary

This PR completes the migration of all Alerting Services plugins onto the Kibana Platform

It includes:

  1. Actions plugin
  2. Alerting plugin
  3. Task Manager plugin
  4. Triggers UI plugin

And touches the Uptime and Siem plugins as their use of the Task Manager relied on some of the legacy lifecycle to work (registering AlertTypes and Telemetry tasks after the Start stage has already began). The fix was simply to moves these registrations to the Setup stage.

closes #61379

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@gmmorris gmmorris added Feature:Actions Feature:Alerting Feature:Task Manager Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Apr 23, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@gmmorris gmmorris added v7.8 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes labels Apr 23, 2020
@gmmorris gmmorris added v7.8.0 and removed v7.8 labels Apr 27, 2020
* master: (78 commits)
  Remove SO root property index signature (elastic#64434)
  [ML] Functional tests - stabilize job row details validations (elastic#64503)
  [Ingest] Add Global settings flyout (elastic#64276)
  Bump cypress dev-dependency from 4.2.0 to 4.4.1 (elastic#64408)
  Migrate saved object of type url to kibana platform (elastic#64043)
  [NP] Migrate ui capabilities (elastic#64185)
  Bump karma-mocha dev-dependency from 1.3.0 to 2.0.0 (elastic#64407)
  Migrate kql_telemetry saved object registration to Kibana platform (elastic#64149)
  Remove SO autocreateindex error and error page (elastic#64037)
  Fix issue with yarn.lock (elastic#64496)
  Bump @hapi/boom dependency from 7.4.2 to 7.4.11 (elastic#64433)
  Bump gonzales-pe dev-dependency from 4.2.4 to 4.3.0 (elastic#64401)
  Bump karma dev-dependency from 3.1.4 to 5.0.2 (elastic#64403)
  Bump iedriver dev-dependency from 3.14.1 to 3.14.2 (elastic#64406)
  Revert "disable flaky suite (elastic#64382) (elastic#64381) (elastic#64480)"
  Revert "skip flaky suite (elastic#64310)"
  skip flaky suite (elastic#64310)
  disable flaky suite (elastic#64382) (elastic#64381) (elastic#64480)
  [Maps] Include maps styles in embeddables factory so that they're bundled w/ consuming plugins (elastic#64460)
  update charts library to 18.4.2 (elastic#64438)
  ...
@@ -240,7 +240,7 @@ export class TaskManager {
* @param taskDefinitions - The Kibana task definitions dictionary
*/
public registerTaskDefinitions(taskDefinitions: TaskDictionary<TaskDefinition>) {
this.assertUninitialized('register task definitions');
this.assertUninitialized('register task definitions', Object.keys(taskDefinitions).join(', '));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When the migration caused lifecycle problems it was very hard to figure out which task was causing the issues.
Changing this message made it easier to pin point the source of the issue and it seemed worth keeping this change.

@@ -9,7 +9,7 @@ import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import {
getExternalServiceSimulatorPath,
ExternalServiceSimulator,
} from '../../../../common/fixtures/plugins/actions';
} from '../../../../common/fixtures/plugins/actions_simulators';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I spent an hour trying to figure out why the actions plugin was broken... turned out we have two plugins named actions.
This renames the simulator plugin to make this easier to maintain.

taskManager: TaskManagerStartContract;
}

export class SampleTaskManagerFixturePlugin
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just the legacy plugin copy-pasted into a NP plugin.
I couldn't convince Git that this is the same file though it is 95% the same code...

@gmmorris gmmorris marked this pull request as ready for review April 28, 2020 14:21
@gmmorris gmmorris requested review from a team as code owners April 28, 2020 14:21
@gmmorris gmmorris requested a review from a team April 28, 2020 14:21
Copy link
Contributor

@chrisronline chrisronline left a comment

Choose a reason for hiding this comment

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

LGTM from Stack Monitoring

},
"license": "Apache-2.0",
"dependencies": {
"joi": "^13.5.2"
Copy link
Member

Choose a reason for hiding this comment

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

Do we not get joi "for free", as in from /x-pack/node_modules or /node_module? Same with typescript above. My only real worry is that with the version specificity there, could be interesting to debug when the base versions get upgraded, but this plugin is using older versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch actually as we don't need Joi anymore. :)
Sadly the TS has to be specified.. I learned this the hard way a few months ago when a fixture consistently failed on CI for this reason.

Copy link
Member

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

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

LGTM, left a comment about some deps in a sample package.json

Copy link
Contributor

@YulNaumenko YulNaumenko left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@patrykkopycinski patrykkopycinski left a comment

Choose a reason for hiding this comment

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

SIEM changes LGTM

* master: (60 commits)
  [SIEM] Create template timeline (elastic#63136)
  load react component lazily in so management section (elastic#64285)
  Cleanup .eslingignore and add target (elastic#64617)
  [Ingest] Support yaml variables in datasource (elastic#64459)
  typescript-ify portions of src/optimize (elastic#64688)
  [ngSanitize] add explicit dependencies to all uses of `ngSanitize` angular module (elastic#64546)
  Consolidate downloading plugin bundles to bootstrap script (elastic#64685)
  [Maps] disable edit layer button when flyout is open for add layer or map settings (elastic#64230)
  chore(NA): add async import into infra plugin to reduce apm bundle size (elastic#63292)
  [Maps] fix edit filter (elastic#64586)
  [SIEM][Detections] Adds large list support using REST endpoints
  Replace a number of any-ed styled(eui*) with accurate types (elastic#64555)
  [Endpoint] Recursive resolver children (elastic#61914)
  [ML] Fix new job wizard with multiple indices (elastic#64567)
  Use short URLs for legacy plugin deprecation warning (elastic#64540)
  [Uptime] Update uptime ml job id to limit to 64 char (elastic#64394)
  [Ingest] Fix GET /enrollment-api-keys/null error (elastic#64595)
  Consolidate cross-cutting concerns between region & coordinate maps in new maps_legacy plugin (elastic#64123)
  ES UI new platform cleanup (elastic#64332)
  [Event Log] use @timestamp field for queries (elastic#64391)
  ...
Copy link
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

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

Looked at the code and just an SCSS file was removed. According to @gmmorris this file is no longer needed.

So it looks good to me! 🎉

* master:
  [ML] Changes Machine learning overview UI text (elastic#64625)
  [Uptime] Migrate client to New Platform (elastic#55086)
  Slim vis type timeseries (elastic#64631)
  [Telemetry] Fix inconsistent search behaviour in Advanced Settings (elastic#64510)
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@gmmorris gmmorris merged commit 9fe7229 into elastic:master Apr 29, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 29, 2020
)

Completes the migration of all Alerting Services plugins onto the Kibana Platform

It includes:

1. Actions plugin
2. Alerting plugin
3. Task Manager plugin
4. Triggers UI plugin

And touches the Uptime and Siem plugins as their use of the Task Manager relied on some of the legacy lifecycle to work (registering AlertTypes and Telemetry tasks after the Start stage has already began). The fix was simply to moves these registrations to the Setup stage.
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 30, 2020
)

Completes the migration of all Alerting Services plugins onto the Kibana Platform

It includes:

1. Actions plugin
2. Alerting plugin
3. Task Manager plugin
4. Triggers UI plugin

And touches the Uptime and Siem plugins as their use of the Task Manager relied on some of the legacy lifecycle to work (registering AlertTypes and Telemetry tasks after the Start stage has already began). The fix was simply to moves these registrations to the Setup stage.
gmmorris added a commit that referenced this pull request Apr 30, 2020
…64877)

Completes the migration of all Alerting Services plugins onto the Kibana Platform

It includes:

1. Actions plugin
2. Alerting plugin
3. Task Manager plugin
4. Triggers UI plugin

And touches the Uptime and Siem plugins as their use of the Task Manager relied on some of the legacy lifecycle to work (registering AlertTypes and Telemetry tasks after the Start stage has already began). The fix was simply to moves these registrations to the Setup stage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Actions Feature:Alerting Feature:Task Manager release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alerting team remaining Kibana Platform migration items
8 participants