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

Expose package info to NP plugins #48101

Merged
merged 10 commits into from
Oct 15, 2019

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Oct 14, 2019

Summary

Closes: #45262

Provides packageInfo to NP plugins via PluginInitializerContext on both client and server

Checklist

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

For maintainers

Dev Docs

Kibana package information provided to the plugins in constructor as a part of PluginInitializerContext

class MyPlugin {
  constructor(context: PluginInitializerContext){
    const isDitribution = context.env.packageInfo.dist;
  }
}

@mshustov mshustov 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. v7.5.0 labels Oct 14, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@mshustov mshustov added this to Code review in kibana-core [DEPRECATED] via automation Oct 14, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

@mshustov mshustov force-pushed the issue-45262-expose-package-info branch from 5bbe4dd to cc83a04 Compare October 14, 2019 15:27
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@mshustov mshustov marked this pull request as ready for review October 15, 2019 08:52
@mshustov mshustov requested review from a team as code owners October 15, 2019 08:52
Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

@ppisljar app-arch team is added as mandatory reviewers every time changes are made to /src/plugins/data/server.

Should our team be responsible only for /src/plugins/data/public and maybe /src/plugins/data/common?

@mshustov mshustov merged commit 27dbcb2 into elastic:master Oct 15, 2019
kibana-core [DEPRECATED] automation moved this from Code review to Needs Backport Oct 15, 2019
@mshustov mshustov deleted the issue-45262-expose-package-info branch October 15, 2019 12:19
mshustov added a commit to mshustov/kibana that referenced this pull request Oct 15, 2019
* provide packageInfo to server plugins

* provide env to kbn server

* provide env to client plugins

* update server mocks and tests

* update client mocks and tests

* add integration test

* regen docs

* remove weird file

* export types for the client from special folder

* env should not affect test ourcome
mshustov added a commit that referenced this pull request Oct 15, 2019
* provide packageInfo to server plugins

* provide env to kbn server

* provide env to client plugins

* update server mocks and tests

* update client mocks and tests

* add integration test

* regen docs

* remove weird file

* export types for the client from special folder

* env should not affect test ourcome
@ppisljar
Copy link
Member

@lizozom we own the whole plugin (the only thing in server is the search service for the moment, but index patterns expose an endpoint as well)

@joshdover joshdover moved this from Needs Backport to Done (7.5) in kibana-core [DEPRECATED] Oct 16, 2019
chrisronline pushed a commit to chrisronline/kibana that referenced this pull request Oct 16, 2019
* provide packageInfo to server plugins

* provide env to kbn server

* provide env to client plugins

* update server mocks and tests

* update client mocks and tests

* add integration test

* regen docs

* remove weird file

* export types for the client from special folder

* env should not affect test ourcome
@elasticmachine
Copy link
Contributor

💔 Build Failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose packageInfo to the new platform plugins
5 participants