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

[BEAM-10961] Enable strict dependency analysis on all Java modules #12938

Closed
wants to merge 68 commits into from

Conversation

sonam-vend
Copy link
Contributor

@sonam-vend sonam-vend commented Sep 25, 2020


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

Post-Commit Tests Status (on master branch)

Lang SDK Dataflow Flink Samza Spark Twister2
Go Build Status --- Build Status --- Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status --- Build Status --- Build Status ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status --- --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@codecov
Copy link

codecov bot commented Oct 1, 2020

Codecov Report

Merging #12938 (7cc00b0) into master (2f205f1) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #12938   +/-   ##
=======================================
  Coverage   82.73%   82.74%           
=======================================
  Files         466      466           
  Lines       57518    57518           
=======================================
+ Hits        47587    47591    +4     
+ Misses       9931     9927    -4     
Impacted Files Coverage Δ
sdks/python/apache_beam/runners/direct/executor.py 96.29% <0.00%> (-0.53%) ⬇️
...hon/apache_beam/runners/worker/bundle_processor.py 93.83% <0.00%> (+0.12%) ⬆️
sdks/python/apache_beam/dataframe/frames.py 91.98% <0.00%> (+0.41%) ⬆️
.../python/apache_beam/transforms/periodicsequence.py 98.24% <0.00%> (+1.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f205f1...7cc00b0. Read the comment docs.

@aaltay
Copy link
Member

aaltay commented Oct 8, 2020

What is Nebula plugin? Why does Beam need this?

@sonam-vend
Copy link
Contributor Author

Run SQL PreCommit

@sonam-vend
Copy link
Contributor Author

sonam-vend commented Dec 31, 2020

I didn't have time to go through all of this today. To be honest, I don't think there's any way we can merge a single PR changing the entire project at once. I recommend splitting this PR into separate PRs, one for each module, so that it's easier to review and merge safely.

A couple general comments:

  • If a dependency is defined in project.ext.library, always use that value instead of hard-coding it. For example, use library.java.google_oauth_client instead of "com.google.oauth-client:google-oauth-client:1.31.0".
  • This is purely cosmetic, but try to keep the dependency lists alphabetized. It makes them much easier to read.

@ibzib , I consider it is quite large and critical change to be merged all at once. Responding to your suggestion of splitting this PR into multiple separate PR, I am thinking to split this PR into 8 sub PRs as:

  1. Module A | beam/example/java
  2. Module B | beam/model
  3. Module C | beam/runners/core-construction-java, runners/core-java, runners/direct-java, runners/extensions-java
  4. Module D | runners/flink, runners/google-cloud-dataflow-java,runners/google-cloud-dataflow-java, runners/java-fn-execution, runners/java-job-service, runners/jet
  5. Module E | runners/local-java, runners/portability, runners/samza, runners/spark, runners/twister2
  6. Module F | sdks/java/bom, sdks/java/build-tools, sdks/java/container, sdks/java/core
  7. Module G | sdks/java/expansion-service, sdks/java/extensions, sdks/java/fn-execution, sdks/java/harness
  8. Module H | sdks/java/io, sdks/java/javadoc, sdks/java/maven-archetypes, sdks/java/testing

See if this proposal looks good to you, or else I welcome your other suggestions.

BEAM-10961.xlsx

cc @shehzaadn-vd

@@ -17,6 +17,7 @@
*/

def basePath = '..'

Copy link
Contributor

Choose a reason for hiding this comment

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

@sonam-vend this is a stray change. please revert.

@@ -17,6 +17,7 @@
*/

def basePath = '..'

Copy link
Contributor

Choose a reason for hiding this comment

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

stray change please revert.

@@ -31,3 +32,4 @@ project.ext {

// Load the main build script which contains all build logic.
apply from: "$basePath/flink_runner.gradle"

Copy link
Contributor

Choose a reason for hiding this comment

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

stray change - please revert

compile library.java.slf4j_jdk14

permitUnusedDeclared library.java.slf4j_jdk14
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick - there should be a be a blank line about the comment - like there was before.

runtime library.java.slf4j_jdk14

Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick - there should be blank line above the comment like before

compile project(":runners:java-fn-execution")
compile project(":runners:java-job-service")
compile project(path: ":sdks:java:harness", configuration: "shadow")
compile library.java.vendored_grpc_1_26_0
compile library.java.slf4j_api

compile library.java.joda_time
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick - there should be a blank line between "compile" and "testcompile" lines like before

@@ -20,3 +20,4 @@ plugins { id 'org.apache.beam.module' }
applyJavaNature(exportJavadoc: false, publish: false)

description = "Apache Beam :: SDKs :: Java :: Build Tools"

Copy link
Contributor

Choose a reason for hiding this comment

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

stray blank line - please remove

compile library.java.grpc_google_cloud_pubsub_v1
compile library.java.grpc_google_cloud_pubsublite_v1
//compile library.java.grpc_google_cloud_pubsublite_v1
Copy link
Contributor

Choose a reason for hiding this comment

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

this line should be removed - not commented out.

@@ -68,6 +69,8 @@ dependencies {
testCompile project(path: ":sdks:java:testing:test-utils", configuration: "testRuntime")
testCompile project(":sdks:java:io:jdbc")
testCompile project(path: ":examples:java", configuration: "testRuntime")

Copy link
Contributor

Choose a reason for hiding this comment

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

stray blank line - please remove

runtime library.java.slf4j_jdk14
}

Copy link
Contributor

Choose a reason for hiding this comment

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

stray blank line - please remove

@@ -13,7 +13,7 @@
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

period removed by mistake. please bring it back.

compile project(":sdks:java:io:synthetic")
compile project(":sdks:java:testing:test-utils")
compile project(":sdks:java:io:google-cloud-platform")
compile project(":sdks:java:io:kafka")
compile project(":sdks:java:io:kinesis")

Copy link
Contributor

Choose a reason for hiding this comment

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

there should be an empty line between "compile" and "gradleRun" lines - like there was before

@@ -30,12 +30,14 @@ dependencies {
compile project(path: ":sdks:java:core", configuration: "shadow")
compile library.java.vendored_guava_26_0_jre
compile library.java.google_cloud_bigquery
compile project(":sdks:java:extensions:google-cloud-platform-core")

compile "com.google.code.gson:gson:2.8.6"
Copy link
Contributor

Choose a reason for hiding this comment

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

there should be a blank line between compile and testCompile lines - like there was before

@ibzib
Copy link
Contributor

ibzib commented Jan 3, 2021

@ibzib , I consider it is quite large and critical change to be merged all at once. Responding to your suggestion of splitting this PR into multiple separate PR, I am thinking to split this PR into 8 sub PRs as:

  1. Module A | beam/example/java
  2. Module B | beam/model
  3. Module C | beam/runners/core-construction-java, runners/core-java, runners/direct-java, runners/extensions-java
  4. Module D | runners/flink, runners/google-cloud-dataflow-java,runners/google-cloud-dataflow-java, runners/java-fn-execution, runners/java-job-service, runners/jet
  5. Module E | runners/local-java, runners/portability, runners/samza, runners/spark, runners/twister2
  6. Module F | sdks/java/bom, sdks/java/build-tools, sdks/java/container, sdks/java/core
  7. Module G | sdks/java/expansion-service, sdks/java/extensions, sdks/java/fn-execution, sdks/java/harness
  8. Module H | sdks/java/io, sdks/java/javadoc, sdks/java/maven-archetypes, sdks/java/testing

It's up to your discretion, but in general, I would break it into the smallest PRs possible. In other words, wherever you can change one subproject independently of all the others, do so. Specifically, each runner (runners/flink, runners/spark, etc.) should probably get its own PR to be reviewed by one of the maintainers of that runner.

@sonam-vend sonam-vend marked this pull request as draft January 4, 2021 08:46
@sonam-vend
Copy link
Contributor Author

Run Java PreCommit

@ibzib ibzib changed the title BEAM-10961- Enable strict dependency analysis on all Java modules [BEAM-10961] Enable strict dependency analysis on all Java modules Sep 15, 2021
@ibzib
Copy link
Contributor

ibzib commented Sep 15, 2021

This PR was broken up and merged in parts. See BEAM-10961 for the full list.

@ibzib ibzib closed this Sep 15, 2021
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.

None yet

8 participants