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

Issue 2837: Remove unnecessary log4j bindings from Bookkeeper packages #2838

Merged
merged 12 commits into from
Oct 27, 2021

Conversation

RaulGracia
Copy link
Contributor

@RaulGracia RaulGracia commented Oct 19, 2021

Motivation

Remove log bindings from bookkeeper-common and bookkeeper-server.

Changes

  • Removed log4j bindings from bookkeeper-common and bookkeeper-server main code:
    • In both packages, these bindings are only used in test scope, as there are tests that directly rely on log4j APIs for their test logic.
    • To allow bookkeeper-server to work only with slf4j, we needed to remove direct use of log4j API in FileSystemUpgrade class.

Master Issue: #2837

…ndencies in both grale and pom files.

Signed-off-by: Raúl <raul.gracia@emc.com>
@RaulGracia RaulGracia changed the title Issue 2837: Remove unnecessary log bindings from Bookkeeper packages Issue 2837: Remove unnecessary log4j bindings from Bookkeeper packages Oct 19, 2021
Signed-off-by: Raúl <raul.gracia@emc.com>
Signed-off-by: Raúl <raul.gracia@emc.com>
Signed-off-by: Raúl <raul.gracia@emc.com>
@zymap
Copy link
Member

zymap commented Oct 21, 2021

@RaulGracia Any updates on this?

@RaulGracia
Copy link
Contributor Author

Thanks @zymap, I sent out this PR out for getting feedback related to this comment: https://github.com/apache/bookkeeper/pull/2816/files#r729987757. It is in draft mode to prevent it from getting merged before we agree that it addresses the original comment. Now I see that there is a conflict from a recent merge, I will resolve it.
cc/ @pkumar-singh @eolivelli

@pkumar-singh
Copy link
Member

@RaulGracia Looks good.

Signed-off-by: Raúl <raul.gracia@emc.com>
@RaulGracia RaulGracia force-pushed the issue-cleanup-log-bindings branch from 4a184cf to ea1aba4 Compare October 22, 2021 17:06
@zymap
Copy link
Member

zymap commented Oct 25, 2021

Tests failure:


org.apache.bookkeeper.tests.integration.stream.BkCtlTest

  Test simpleTest FAILED (2.6s)

  java.lang.AssertionError
      at org.apache.bookkeeper.tests.integration.stream.BkCtlTest.simpleTest(BkCtlTest.java:84)

  Test putGetKey PASSED (5.9s)
  Test createTable PASSED (2.2s)
  Test createNamespace PASSED (2.3s)
  Test listBookies FAILED

  java.lang.AssertionError
      at org.apache.bookkeeper.tests.integration.stream.BkCtlTest.listBookies(BkCtlTest.java:51)

  Test incGetKey PASSED (6.2s)
  Test showLastMark FAILED

  java.lang.AssertionError
      at org.apache.bookkeeper.tests.integration.stream.BkCtlTest.showLastMark(BkCtlTest.java:66)

@RaulGracia Could you please take a look at the failure tests? I rerun the tests and it still failed 😕

@RaulGracia
Copy link
Contributor Author

Thanks @zymap, I think that the problem may be as follows:

I will work on finding the best way to make bkctl to have the necessary log4j dependencies, while removing them from bookkeeper-server, as this was the original comment. My only concern is whether or not there could be more modules relying on the log4j bindings in the same way as bkctl tests do.

Signed-off-by: Raúl <raul.gracia@emc.com>
@RaulGracia
Copy link
Contributor Author

@eolivelli @pkumar-singh @zymap I think that this PR now addresses the original comment that suggested that we should not be bringing log implementation bindings in neither bookkeeper-server and bookkeeper-common. Note that for bookkeeper-common this was true, but I think that was not the case for bookkeeper-server (as visible, FileSystemUpgrade class was using log4j APIs within bookkeeper-server main code). I have set this PR ready to review, so it would be great to get your feedback about it.

Also, this PR has been tagged as version 4.14.3, but I think that this is not correct; This PR is related to PR #2816 that targets 4.15 (current master).

@RaulGracia RaulGracia marked this pull request as ready for review October 25, 2021 17:52
@pkumar-singh
Copy link
Member

Looks very good.

@pkumar-singh
Copy link
Member

pkumar-singh commented Oct 25, 2021 via email

Copy link
Contributor

@nicoloboschi nicoloboschi left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Overall lgtm

I left one comment PTAL

bookkeeper-dist/src/main/resources/LICENSE-bkctl.bin.txt Outdated Show resolved Hide resolved
Signed-off-by: Raúl Gracia <raul.gracia@emc.com>
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

LGTM

@eolivelli eolivelli added this to the 4.15.0 milestone Oct 26, 2021
@eolivelli
Copy link
Contributor

I am not sure that this change fits 4.14.x, because we are changing the dependencies, it is kind of breaking change.

WDTY ?

@RaulGracia
Copy link
Contributor Author

@eolivelli you are right and I posted the same here: #2838 (comment)
This is a change related to another PR that is only in master, so it should not go to branch 4.14.

@zymap
Copy link
Member

zymap commented Oct 27, 2021

So should I remove the #2816 from 4.14.x as well? Because this PR looks like an improvement of PR #2816. @eolivelli @RaulGracia

@eolivelli
Copy link
Contributor

@zymap yes, I would remove this work (#2816) from branch-4.14

@RaulGracia
Copy link
Contributor Author

@zymap, @eolivelli is right, PR #2816 focuses on master only, as well as this PR.

@eolivelli
Copy link
Contributor

@zymap have you reviewed this PR ? can we merge to master in your opinion ?

Copy link
Member

@zymap zymap left a comment

Choose a reason for hiding this comment

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

LGTM

@eolivelli eolivelli merged commit 6e3c82c into apache:master Oct 27, 2021
@eolivelli
Copy link
Contributor

committed to master branch, thank you @RaulGracia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants