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

Add x-pack plugin for new platform server licensing information #43623

Merged
merged 17 commits into from
Aug 29, 2019

Conversation

eliperelman
Copy link
Contributor

@eliperelman eliperelman commented Aug 20, 2019

Summary

Add x-pack plugin for new platform server licensing information. This will eventually replace the licensing information consumed via xpack_main.

  • Server implementation
  • Server tests

Fixes #18356.
Supersedes #41026.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

Dev Docs

Add x-pack plugin for new platform server licensing information. This will eventually replace the licensing information consumed via xpack_main. Upon setup, this plugin exposes an observable API for inspecting and making checks against the license information.

license$.subscribe(license => {
   console.log(license.uid);
   console.log(license.isActive);
   console.log(license.type);

   const { check } = license.check('my-plugin', LICENSE_TYPE.gold);

   if (check !== LICENSE_STATUS.Valid) {
     disableSomething();
   }
});

@eliperelman eliperelman added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. v8.0.0 v7.4.0 labels Aug 20, 2019
@eliperelman eliperelman requested a review from a team August 20, 2019 21:21
@eliperelman eliperelman self-assigned this Aug 20, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@elasticmachine
Copy link
Contributor

💔 Build Failed

@eliperelman eliperelman force-pushed the licensing-plugin-x-pack branch from 92d592f to 6c283a4 Compare August 21, 2019 18:14
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@eliperelman eliperelman force-pushed the licensing-plugin-x-pack branch from 53a5f82 to 3047690 Compare August 23, 2019 15:15
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

x-pack/plugins/licensing/server/index.ts Outdated Show resolved Hide resolved
x-pack/plugins/licensing/server/types.ts Outdated Show resolved Hide resolved
x-pack/plugins/licensing/server/licensing.test.ts Outdated Show resolved Hide resolved
x-pack/plugins/licensing/server/licensing_plugin_setup.ts Outdated Show resolved Hide resolved
x-pack/plugins/licensing/server/licensing_plugin_setup.ts Outdated Show resolved Hide resolved
x-pack/plugins/licensing/server/licensing_plugin.ts Outdated Show resolved Hide resolved
x-pack/plugins/licensing/server/licensing_plugin.ts Outdated Show resolved Hide resolved
@eliperelman eliperelman force-pushed the licensing-plugin-x-pack branch from 4140da9 to 63a9d95 Compare August 26, 2019 17:00
@eliperelman eliperelman requested a review from a team August 26, 2019 17:01
@elasticmachine
Copy link
Contributor

💔 Build Failed

@eliperelman eliperelman force-pushed the licensing-plugin-x-pack branch from 5afa576 to d6b878b Compare August 26, 2019 19:30
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@eliperelman eliperelman requested a review from joshdover August 26, 2019 22:29
@joshdover
Copy link
Contributor

Ack: will re-review tomorrow morning

@jinmu03 jinmu03 requested a review from epixa August 27, 2019 17:53
@eliperelman eliperelman force-pushed the licensing-plugin-x-pack branch from 4ae4b26 to 317a854 Compare August 29, 2019 18:42
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@eliperelman eliperelman merged commit 4667c46 into elastic:master Aug 29, 2019
@spalger
Copy link
Contributor

spalger commented Sep 2, 2019

@eliperelman One of the tests from this PR which hasn't been backported yet is flaky, and has been skipped in master, please don't backport the flaky test without the skip, or fix the flaky test before backporting.

#44560

@eliperelman
Copy link
Contributor Author

@restrry forgot to post here, I will be addressing all of your review comments in my next PR as several of your suggestions have already been written in my follow up. Thanks! 👍

mshustov pushed a commit to mshustov/kibana that referenced this pull request Sep 30, 2019
…tic#43623)

* Add x-pack plugin for new platform server licensing information

* Update x-pack translations

* Implement core plugin interface for licensing plugin:

* Rename references to service to plugin

* Use CoreStart in licensing start method

* Fix outstanding reference error

* Fix type check errors

* Address outstanding review comments

* Fix type error in tests

* Address review comments, move polling logic to standalone

* Split up test files

* Fix bad reference in test

* Use relative reference to poller util

* Add more plugin tests to address review comments

* Fix different manners of config generation in licensing plugin

* Update test fixtures

* Fix path to test fixtures
mshustov pushed a commit to mshustov/kibana that referenced this pull request Sep 30, 2019
…tic#43623)

* Add x-pack plugin for new platform server licensing information

* Update x-pack translations

* Implement core plugin interface for licensing plugin:

* Rename references to service to plugin

* Use CoreStart in licensing start method

* Fix outstanding reference error

* Fix type check errors

* Address outstanding review comments

* Fix type error in tests

* Address review comments, move polling logic to standalone

* Split up test files

* Fix bad reference in test

* Use relative reference to poller util

* Add more plugin tests to address review comments

* Fix different manners of config generation in licensing plugin

* Update test fixtures

* Fix path to test fixtures
mshustov added a commit that referenced this pull request Sep 30, 2019
…) (#46920)

* Add x-pack plugin for new platform server licensing information

* Update x-pack translations

* Implement core plugin interface for licensing plugin:

* Rename references to service to plugin

* Use CoreStart in licensing start method

* Fix outstanding reference error

* Fix type check errors

* Address outstanding review comments

* Fix type error in tests

* Address review comments, move polling logic to standalone

* Split up test files

* Fix bad reference in test

* Use relative reference to poller util

* Add more plugin tests to address review comments

* Fix different manners of config generation in licensing plugin

* Update test fixtures

* Fix path to test fixtures
@mshustov mshustov added v7.5.0 and removed v7.4.0 labels Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

License plugin
5 participants