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

[New platform] Expose NP core services and plugins contracts to the legacy server #32468

Merged
merged 10 commits into from
Mar 7, 2019

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Mar 5, 2019

Summary

Issue #32395
Expose New Platform core services and plugins contracts to the legacy server
Functionality is covered in test:server

Checklist

For maintainers

Dev Docs

Expose New Platform core services and plugins contracts to the legacy server

Kibana is in process of stabilizing of API. During this release, our primary focus was on formalizing API for main core services. Although this is still an experimental API, you can have access to updated elasticsearch and http services on the server side via kbnServer.newPlatform that exposes:

@mshustov mshustov added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform v7.2.0 labels Mar 5, 2019
@mshustov mshustov requested a review from a team March 5, 2019 10:16
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@mshustov mshustov changed the title Issue 32395 server side [New platform] Expose NP core services and plugins contracts to the legacy server Mar 5, 2019
* @param kbnServer KbnServer singleton instance.
* @param server Hapi server instance to expose `core` on.
*/
export function coreMixin(kbnServer: KbnServer, server: Server) {
server.decorate('server', 'core', kbnServer.core);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to avoid confusion I removed this escape hatch, let me know if we want to keep it and revert the commit

@elasticmachine
Copy link
Contributor

💔 Build Failed

@mshustov mshustov requested a review from epixa March 5, 2019 10:47
@elasticmachine
Copy link
Contributor

💔 Build Failed

@mshustov
Copy link
Contributor Author

mshustov commented Mar 5, 2019

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@mshustov mshustov added the review label Mar 5, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@mshustov
Copy link
Contributor Author

mshustov commented Mar 6, 2019

still have a problem with build. Feel free to review. If I don't have a solution tomorrow, I will revert the last commit with adding typings for kbn_server.d.ts

Copy link
Contributor

@epixa epixa left a comment

Choose a reason for hiding this comment

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

LGTM

These changes look good to me, though obviously it needs to pass CI. If it's just a simple type-related change or even a revert of that last type-related push, I don't have to review it again, but let me know if you want me to.

@mshustov
Copy link
Contributor Author

mshustov commented Mar 7, 2019

wait for #32578 to address the problem with importing types

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@mshustov mshustov merged commit b976694 into elastic:master Mar 7, 2019
@mshustov mshustov deleted the issue-32395-server-side branch March 7, 2019 16:26
mshustov added a commit to mshustov/kibana that referenced this pull request Mar 7, 2019
…egacy server (elastic#32468)

* expose NewPlatform core and plugins to legacy server

* get rid of .core in favor of .newPlatform

* decalre start/stop contract explicitly

* expose newPlatform typings

* Remove dependency on legacy package_json util from core

* Remove dependencies on core/server in core/types
epixa pushed a commit that referenced this pull request Mar 7, 2019
…egacy server (#32468) (#32666)

* expose NewPlatform core and plugins to legacy server

* get rid of .core in favor of .newPlatform

* decalre start/stop contract explicitly

* expose newPlatform typings

* Remove dependency on legacy package_json util from core

* Remove dependencies on core/server in core/types
@mshustov mshustov added backported and removed review labels Mar 8, 2019
@epixa epixa added the release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. label May 7, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

@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.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants