Skip to content

Core: Drop nodeName from AbstractComponent #34487

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

Merged
merged 3 commits into from
Oct 26, 2018

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Oct 15, 2018

AbstractComponent is trouble because its name implies that
everything should extend from it. It is useful, but maybe too
broadly useful. The things it offers access too, the Settings instance
for the entire server and a logger are nice to have around, but not
really needed everywhere. The Settings instance especially adds a
fair bit of ceremony to testing that is usually confusing to read.

This removes the nodeName method from AbstractComponent so it is
more clear where we actually need the node name.

Relates to #34488.

`AbstractComponent` is trouble because its name implies that
*everything* should extend from it. It *is* useful, but maybe too
broadly useful. The things it offers access too, the `Settings` instance
for the entire server and a logger are nice to have around, but not
really needed *everywhere*. The `Settings` instance especially adds a
fair bit of ceremony to testing without any value.

This removes the `nodeName` method from `AbstractComponent` so it is
more clear where we actually need the node name.
@nik9000 nik9000 added :Core/Infra/Core Core issues without another label v7.0.0 >refactoring v6.5.0 labels Oct 15, 2018
@nik9000 nik9000 requested a review from rjernst October 15, 2018 20:10
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM

@colings86 colings86 added v6.6.0 and removed v6.5.0 labels Oct 25, 2018
@nik9000 nik9000 merged commit 10295b3 into elastic:master Oct 26, 2018
nik9000 added a commit that referenced this pull request Oct 27, 2018
`AbstractComponent` is trouble because its name implies that
*everything* should extend from it. It *is* useful, but maybe too
broadly useful. The things it offers access too, the `Settings` instance
for the entire server and a logger are nice to have around, but not
really needed *everywhere*. The `Settings` instance especially adds a
fair bit of ceremony to testing without any value.

This removes the `nodeName` method from `AbstractComponent` so it is
more clear where we actually need the node name.
@nik9000
Copy link
Member Author

nik9000 commented Oct 27, 2018

Merged and backported! Thanks @rjernst!

kcm pushed a commit that referenced this pull request Oct 30, 2018
`AbstractComponent` is trouble because its name implies that
*everything* should extend from it. It *is* useful, but maybe too
broadly useful. The things it offers access too, the `Settings` instance
for the entire server and a logger are nice to have around, but not
really needed *everywhere*. The `Settings` instance especially adds a
fair bit of ceremony to testing without any value.

This removes the `nodeName` method from `AbstractComponent` so it is
more clear where we actually need the node name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants