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

[CELEBORN-1070] Add error-prone to pom.xml. #2025

Closed
wants to merge 8 commits into from
Closed

[CELEBORN-1070] Add error-prone to pom.xml. #2025

wants to merge 8 commits into from

Conversation

mridulm
Copy link
Contributor

@mridulm mridulm commented Oct 23, 2023

What changes were proposed in this pull request?

Add error prone to the build.
Error Prone is a static analysis tool that cam catch common bugs and mistakes during compilation.

Why are the changes needed?

Catch potential issues during build

Does this PR introduce any user-facing change?

No

How was this patch tested?

Local build

@mridulm
Copy link
Contributor Author

mridulm commented Oct 23, 2023

This is resubmission of #2016.
I was testing it on JDK 11 and later locally - and so did not observe the failures that build system surfaced.
Have added workarounds to fix this, as per error prone documentation.

+CC @waitinfuture

@SteNicholas
Copy link
Member

@mridulm, could you also test it on JDK17? At present Celeborn supports JDK17.

@mridulm
Copy link
Contributor Author

mridulm commented Oct 23, 2023

So looks like there are more failures to be fixed in flink related profiles.
Will convert this back to draft and address those first.

@waitinfuture
Copy link
Contributor

@mridulm, could you also test it on JDK17? At present Celeborn supports JDK17.

Seems GA with JDK 17 fails.

@mridulm
Copy link
Contributor Author

mridulm commented Oct 23, 2023

Yes, looks like JDK 17 has some specific instructions as well - did not realize Celeborn supports jdk 17 :) will add those as well, after I fix the flink related failures.

@mridulm mridulm marked this pull request as draft October 23, 2023 05:25
@pan3793
Copy link
Member

pan3793 commented Oct 23, 2023

if applicable, would you mind adding such compiling improvement to sbt building system as well?

background: in the previous discussion, we'd like to migrate the building system from maven to sbt because:

the main process is driven by @cfmcgrady, and the first step is to make sbt align with maven(almost reached), and then drop maven ...

@SteNicholas
Copy link
Member

Yes, looks like JDK 17 has some specific instructions as well - did not realize Celeborn supports jdk 17 :) will add those as well, after I fix the flink related failures.

@mridulm, the build section has documented the situation of JDK17 support. You could refer this section.

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #2025 (4c2ea29) into main (6dc30d3) will increase coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2025      +/-   ##
==========================================
+ Coverage   46.90%   46.92%   +0.03%     
==========================================
  Files         165      165              
  Lines       10531    10535       +4     
  Branches      959      958       -1     
==========================================
+ Hits         4938     4943       +5     
- Misses       5271     5272       +1     
+ Partials      322      320       -2     

see 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mridulm
Copy link
Contributor Author

mridulm commented Oct 23, 2023

@pan3793
You mentioned:

maven scalatest plugin does not support always fork mode

I am currently running with fork mode = true for all the tests with maven and it is running successfully - can you give more details on this please ? There are so many combinations, I might have missed some !

the main process is driven by @cfmcgrady, and the first step is to make sbt align with maven(almost reached), and then drop maven ...

I did not find sbt support details, can you point me to it ?
I would prefer to add the support as a follow up if it is not yet merged.

@mridulm
Copy link
Contributor Author

mridulm commented Oct 23, 2023

The flink failures will be addressed by #2029

@mridulm mridulm marked this pull request as ready for review October 24, 2023 02:00
@mridulm
Copy link
Contributor Author

mridulm commented Oct 24, 2023

+CC @waitinfuture , @SteNicholas All the tests pass now

Copy link
Contributor

@waitinfuture waitinfuture left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@waitinfuture
Copy link
Contributor

@pan3793 You mentioned:

maven scalatest plugin does not support always fork mode

I am currently running with fork mode = true for all the tests with maven and it is running successfully - can you give more details on this please ? There are so many combinations, I might have missed some !

the main process is driven by @cfmcgrady, and the first step is to make sbt align with maven(almost reached), and then drop maven ...

I did not find sbt support details, can you point me to it ? I would prefer to add the support as a follow up if it is not yet merged.

Here is sbt doc https://celeborn.apache.org/docs/latest/developers/sbt/

@pan3793
Copy link
Member

pan3793 commented Oct 24, 2023

I am currently running with fork mode = true for all the tests with maven and it is running successfully

Yes, we fixed several cases to make it pass now.

Basically, when setting forkMode=once, all test cases run on the same forked JVM process, which does not much help for projects that compose a lot of singletons(if we initialize one singleton in the previous test case, the following test cases may be affected, so we must add some reset logic for testing purposes)

The ideal solution is forkMode=always, running each test case in its own forked JVM process, unfortunately, Maven JUnit plugin supports it but scalatest does not.

https://github.com/scalatest/scalatest-maven-plugin/blob/383f396162b7654930758b76a0696d3aa2ce5686/src/main/java/org/scalatest/tools/maven/AbstractScalaTestMojo.java#L162-L168

I did not find sbt support details ...

Currently, we only provide developer docs with sbt

https://celeborn.apache.org/docs/latest/developers/sbt/

pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<version>3.11.0</version>
<version>${maven.plugin.compiler.version}</version>

Mridul Muralidharan added 2 commits October 23, 2023 22:16
@pan3793 pan3793 changed the title CELEBORN-1070: Add error-prone to pom.xml. [CELEBORN-1070] Add error-prone to pom.xml. Oct 24, 2023
Copy link
Member

@SteNicholas SteNicholas left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for @mridulm updates.

@pan3793 pan3793 closed this in 52d6861 Oct 24, 2023
@pan3793
Copy link
Member

pan3793 commented Oct 24, 2023

Thanks, merged to main for 0.4

@pan3793
Copy link
Member

pan3793 commented Oct 24, 2023

@mridulm seems you didn't set up the git email address properly, mridulatgmail.com, would you mind replacing the at with @ in your local git email setup? So that the GitHub could correctly link the commit to your GitHub account.

PS: I fixed the email when merging so that the GitHub link works, I saw the unrecognized commits that you merged in the Spark repo.

image image

@mridulm
Copy link
Contributor Author

mridulm commented Oct 24, 2023

That is done on purpose to minimize spam

@pan3793
Copy link
Member

pan3793 commented Oct 24, 2023

alright...

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.

4 participants