-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Entirely remove AbstractComponent #34488
Comments
Pinging @elastic/es-core-infra |
Drops the `deprecationLogger` from `AbstractComponent`, moving it to places where we need it. This saves us from building a bunch of `DeprecationLogger`s that we don't need. Relates to elastic#34488
Drops the `deprecationLogger` from `AbstractComponent`, moving it to places where we need it. This saves us from building a bunch of `DeprecationLogger`s that we don't need. Relates to #34488
Drops the `deprecationLogger` from `AbstractComponent`, moving it to places where we need it. This saves us from building a bunch of `DeprecationLogger`s that we don't need. Relates to #34488
Drops the `deprecationLogger` from `AbstractComponent`, moving it to places where we need it. This saves us from building a bunch of `DeprecationLogger`s that we don't need. Relates to #34488
Stop passing `Settings` to `AbstractComponent`'s ctor. This allows us to stop passing around `Settings` in a *ton* of places. While this change touches many files, it touches them all in fairly small, mechanical ways, doing a few things per file: 1. Drop the `super(settings);` line on everything that extends `AbstractComponent`. 2. Drop the `settings` argument to the ctor if it is no longer used. 3. If the file doesn't use `logger` then drop `extends AbstractComponent` from it. 4. Clean up all compilation failure caused by the `settings` removal and drop any now unused `settings` isntances and method arguments. I've intentionally *not* removed the `settings` argument from a few files: 1. TransportAction 2. AbstractLifecycleComponent 3. BaseRestHandler These files don't *need* `settings` either, but this change is large enough as is. Relates to elastic#34488
Once I merge #35140 I think this will be another one of those "good first issue", "help wanted" things where we folks can grab a couple of packages at the time and remove |
Stop passing `Settings` to `AbstractComponent`'s ctor. This allows us to stop passing around `Settings` in a *ton* of places. While this change touches many files, it touches them all in fairly small, mechanical ways, doing a few things per file: 1. Drop the `super(settings);` line on everything that extends `AbstractComponent`. 2. Drop the `settings` argument to the ctor if it is no longer used. 3. If the file doesn't use `logger` then drop `extends AbstractComponent` from it. 4. Clean up all compilation failure caused by the `settings` removal and drop any now unused `settings` isntances and method arguments. I've intentionally *not* removed the `settings` argument from a few files: 1. TransportAction 2. AbstractLifecycleComponent 3. BaseRestHandler These files don't *need* `settings` either, but this change is large enough as is. Relates to #34488
OK! I've merged #34691 so a good chunk of this is now "good first issue" territory. In particular, replaceing
That way we don't get huge PRs. Which are not great for first PRs because they can have many merge conflicts. |
I'd like to think a little more about TransportAction and BaseRestHandler. Those are very squarely in the plugin API and I wonder if in 6.x they should keep to |
This change removes the use of AbstractComponent in the security module. The classes now declare their own loggers. Relates elastic#34488
This change removes the use of AbstractComponent in the security module. The classes now declare their own loggers. Relates elastic#34488
This change removes the use of AbstractComponent in the security module. The classes now declare their own loggers. Relates #34488
Stop passing `Settings` to `AbstractComponent`'s ctor. This allows us to stop passing around `Settings` in a *ton* of places. While this change touches many files, it touches them all in fairly small, mechanical ways, doing a few things per file: 1. Drop the `super(settings);` line on everything that extends `AbstractComponent`. 2. Drop the `settings` argument to the ctor if it is no longer used. 3. If the file doesn't use `logger` then drop `extends AbstractComponent` from it. 4. Clean up all compilation failure caused by the `settings` removal and drop any now unused `settings` isntances and method arguments. I've intentionally *not* removed the `settings` argument from a few files: 1. TransportAction 2. AbstractLifecycleComponent 3. BaseRestHandler These files don't *need* `settings` either, but this change is large enough as is. Relates to #34488
This change removes the use of AbstractComponent in the security module. The classes now declare their own loggers. Relates #34488
This commit removes the use of AbstractComponent in xpack where it was still being extended. It has been replaced with explicit logger declarations. See elastic#34488
I've added your name to my tracking comment. Enjoy! Thanks! |
I managed to get all remaining references removed @nik9000 . Here is the link to the PR. But I have an issue running the job
I manage to successfully run the test with
I did not change anything inside the distribution modules. I only touched modules: plugins, test, server (there was a missing class). And I have the value set for JAVA_HOME:
Here is also the configuration for
I set the environment variables in Linux in the file
The reason I point out the variables is, because something had a similar issue with Elasticsearch here. |
Removes inhertiting from AbstractComponent for some classes (mostly in the plugins module). Relates to #34488
Removed extending of AbstractComponent and changed logger usage to explicit declaration. Abstract classes still have logger declaration using this.getClass() in order to show implementation class name in its logs. See #34488
Removed extending of AbstractComponent and changed logger usage to explicit declaration. Abstract classes still have logger declaration using this.getClass() in order to show implementation class name in its logs. See #34488
@jkakavas, |
This commit removes the use of AbstractComponent in xpack where it was still being extended. It has been replaced with explicit logger declarations. See #34488
Hey guys, iam new to open source |
Thanks @jkakavas! Sorry for that. I'm too quick on the keyboard sometimes. Every time I see github folks I ask them to implement nicer type-ahead features for @siddu244 I've actually just removed |
cool , let me check with presentation and get back if anything required.
Thanks for the reply @jkakavas
Best Regards... :)
…On Thu, Dec 6, 2018 at 10:34 PM Nik Everett ***@***.***> wrote:
Thanks @jkakavas <https://github.com/jkakavas>! Sorry for that. I'm too
quick on the keyboard sometimes. Every time I see github folks I ask them
to implement nicer type-ahead features for @ in issues and PRs. It isn't
an excuse, but it'd be nice!
@siddu244 <https://github.com/siddu244> I've actually just removed good
first issue and help wanted from this issue as I found a victim on the
Elasticsearch team and the remaining steps, while not hard, do touch a
*ton* of code. As far as a general tour, I gave a presentation
<https://www.elastic.co/elasticon/conf/2016/sf/contributing-to-elasticsearch-how-to-get-started>
a while back that might be nice. But I expect it isn't as useful as finding
something small and working on it. We don't have a current "big map" of the
code base that I can point you to.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#34488 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF50QBvyb34yMqyGOQC9zhKUMEzcFdtGks5u2U46gaJpZM4XdDvy>
.
|
The AbstracLifecycleComponent used to extend AbstractComponent, so it had to pass settings to the constractor of its supper class. It no longer extends the AbstractComponent so there is no need for this constructor There is also no need for AbstracLifecycleComponent subclasses to have Settings in their constructors if they were only passing it over to super constructor. This is part 1. which will be backported to 6.x with a migration guide/deprecation log. part 2 will have this constructor removed in 7 relates #35560 relates #34488
…elastic#37488) The AbstracLifecycleComponent used to extend AbstractComponent, so it had to pass settings to the constractor of its supper class. It no longer extends the AbstractComponent so there is no need for this constructor There is also no need for AbstracLifecycleComponent subclasses to have Settings in their constructors if they were only passing it over to super constructor. This is part 1. which will be backported to 6.x with a migration guide/deprecation log. part 2 will have this constructor removed in 7 relates elastic#35560 relates elastic#34488
…88 (#37522) The AbstractLifecycleComponent used to extend AbstractComponent, so it had to pass settings to the constructor of its supper class. It no longer extends the AbstractComponent so there is no need for this constructor There is also no need for AbstractLifecycleComponent subclasses to have Settings in their constructors if they were only passing it over to super constructor. This is part 1. which will be backported to 6.x with a migration guide/deprecation log. part 2 will have this constructor removed in 7 relates #35560 relates #34488
AbstractComponent
is trouble because its name implies thateverything should extend from it. It is useful, but maybe too
broadly useful. The things it offers access too, the
Settings
instancefor the entire server and a logger are nice to have around, but not
really needed everywhere.
So we should remove it and everything that needs a logger or a deprecation logger or a settings instance should just declare that it needs it. That way tests don't end up making a
Settings
instance "just because". That kind of thing makes test much harder to read.See this comment for the part of this that is a "good first issue".
The text was updated successfully, but these errors were encountered: