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

[NP] add platform main principles #53866

Merged
merged 8 commits into from
Jan 24, 2020
Merged

Conversation

mshustov
Copy link
Contributor

Summary

This PR formalizes NP principles. It will be used as a guide to verify decisions in the future.

[skip-ci]

@mshustov mshustov added chore Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes v7.6.0 labels Dec 31, 2019
@elasticmachine
Copy link
Contributor

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

@mshustov mshustov marked this pull request as ready for review January 13, 2020 15:12
@mshustov mshustov requested a review from a team as a code owner January 13, 2020 15:12
@mshustov mshustov added v7.7.0 and removed v7.6.0 labels Jan 14, 2020
src/core/PRINCIPLES.md Outdated Show resolved Hide resolved
src/core/PRINCIPLES.md Outdated Show resolved Hide resolved
- search
```
### Explicit dependencies
Each plugin should declare dependencies on the other plugins explicitly. Plugins cannot have circular dependencies. Plugins shouldn't have hidden dependencies.
Copy link
Contributor

Choose a reason for hiding this comment

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

Plugins should also not have hard dependencies on registered values. For example, one plugin should handle the case where a specific visualization type has not been registered, unless it has declared an explicit dependency on that plugin.

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 see the point. This is a particular case of Plugins shouldn't have hidden dependencies. Don't know if we should provide a specific example of it. Otherwise, the file will grow to an unmanageable size quite soon. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a pretty common one that I've had to warn about before. Though TypeScript does help us out here now, I'm not sure all teams are going to be using TS everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what if express it as Plugins shouldn't access runtime objects, HTTP endpoints, DOM nodes, etc. created by a third party plugin without declaring a dependency on this plugin.

@mshustov mshustov requested review from joshdover and a team January 15, 2020 15:08
Copy link
Contributor

@rudolf rudolf left a comment

Choose a reason for hiding this comment

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

Couple of minor comments but overall this looks good.

src/core/PRINCIPLES.md Outdated Show resolved Hide resolved
src/core/PRINCIPLES.md Outdated Show resolved Hide resolved
src/core/PRINCIPLES.md Outdated Show resolved Hide resolved
src/core/PRINCIPLES.md Outdated Show resolved Hide resolved
@mshustov mshustov requested a review from rudolf January 20, 2020 09:16
@mshustov mshustov changed the title add platform main principles [NP] add platform main principles Jan 22, 2020
@mshustov mshustov merged commit 2f16287 into elastic:master Jan 24, 2020
@mshustov mshustov deleted the np-principles branch January 24, 2020 06:54
@mshustov mshustov added the backport:skip This commit does not require backporting label Jan 24, 2020
mshustov added a commit to mshustov/kibana that referenced this pull request Jan 28, 2020
* add platform main principles

* update docs

* unify styles

* remove guidelines. principles should cover this

* Apply suggestions from code review

Co-Authored-By: Josh Dover <[email protected]>

* Apply suggestions from code review

Co-Authored-By: Rudolf Meijering <[email protected]>

* address comments

Co-authored-by: Josh Dover <[email protected]>
Co-authored-by: Rudolf Meijering <[email protected]>
mshustov added a commit that referenced this pull request Jan 28, 2020
* add platform main principles

* update docs

* unify styles

* remove guidelines. principles should cover this

* Apply suggestions from code review

Co-Authored-By: Josh Dover <[email protected]>

* Apply suggestions from code review

Co-Authored-By: Rudolf Meijering <[email protected]>

* address comments

Co-authored-by: Josh Dover <[email protected]>
Co-authored-by: Rudolf Meijering <[email protected]>

Co-authored-by: Josh Dover <[email protected]>
Co-authored-by: Rudolf Meijering <[email protected]>
@mshustov mshustov added backported and removed backport:skip This commit does not require backporting labels Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported chore Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants