Skip to content

Add ContextService to server#42395

Merged
joshdover merged 7 commits intoelastic:masterfrom
joshdover:np/context-service-server
Aug 6, 2019
Merged

Add ContextService to server#42395
joshdover merged 7 commits intoelastic:masterfrom
joshdover:np/context-service-server

Conversation

@joshdover
Copy link
Contributor

@joshdover joshdover commented Jul 31, 2019

Summary

This ports the ContextService (#41251) over to the Server side as well. No significant differences here, though the changes to the server-side PluginsService is slightly different, due to the way the backend does plugin discovery.

I split this into two commits.

  • The first just moves the ContextContainer implementation over to the utils directory. This still doesn't feel like quite the right place, so I'm open to suggestions on this.
  • The second commit adds a ContextService to the server side and adds the PluginOpaqueId to the PluginsService.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@joshdover joshdover force-pushed the np/context-service-server branch 2 times, most recently from dfb5a90 to 0d62cd1 Compare July 31, 2019 22:26
@elasticmachine
Copy link
Contributor

💔 Build Failed

@joshdover joshdover force-pushed the np/context-service-server branch 3 times, most recently from bd171bb to 46226a6 Compare August 1, 2019 17:34
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@joshdover joshdover added Feature:New Platform Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v7.4.0 labels Aug 1, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@joshdover joshdover requested a review from a team August 1, 2019 18:40
@joshdover joshdover marked this pull request as ready for review August 1, 2019 18:40
@joshdover joshdover added the release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. label Aug 1, 2019
Copy link
Contributor

@eliperelman eliperelman left a comment

Choose a reason for hiding this comment

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

Looks great!

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@mshustov mshustov Aug 2, 2019

Choose a reason for hiding this comment

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

what is the main purpose of this file? as I understand it's to share types between client and server. PluginManifest exists on the server-side only, doesn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right I made it for sharing types, but I figured I'd place all types for the plugins service in here for consistency.

Copy link
Contributor

Choose a reason for hiding this comment

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

I figured I'd place all types for the plugins service in here for consistency.

ok. Although I'd rather keep them closer to the usage place. It helps us to track unused types and dependencies between different modules/files.

Copy link
Contributor

@mshustov mshustov Aug 2, 2019

Choose a reason for hiding this comment

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

the problem of sharing server and client code popped up several times in this PR and in #39891
I'm wondering why we encourage domain-focus folder structure for plugins in favor of technology-focus but do not follow the same convention in the core? why not similarly structure core services?

- core
|__ context
  |__ public
  |  |__ index.ts
  |__ server
  |  |__ index.ts
  |__ common/utils/ whatever you want

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's not a bad idea. It could complicate some of the bundling / building logic, but I'd be interested in exploring that (in a separate PR / issue) if it helps alleviate this problem.

Copy link
Contributor

Choose a reason for hiding this comment

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

could your create a separate issue to investigate this approach? we have to address problem of importing context from utils eventually.

@joshdover joshdover force-pushed the np/context-service-server branch from 1f36cab to 951d9bf Compare August 5, 2019 21:59
@elasticmachine
Copy link
Contributor

💔 Build Failed

@joshdover joshdover force-pushed the np/context-service-server branch from d804c75 to bd4cd89 Compare August 6, 2019 14:38
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@joshdover joshdover merged commit 5192dac into elastic:master Aug 6, 2019
@joshdover joshdover deleted the np/context-service-server branch August 6, 2019 17:24
rudolf pushed a commit that referenced this pull request Aug 6, 2019
@joshdover joshdover added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. labels Sep 4, 2019
@joshdover
Copy link
Contributor Author

Removing dev_docs label to avoid duplicating the docs in #41251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v7.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants