-
Notifications
You must be signed in to change notification settings - Fork 0
Bazel migration for Flink module #237
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
Changes from 21 commits
cc9ab7f
c22461a
0d8c084
6d6dd6a
7160500
b8d54e8
fd4163a
6f3def4
d4e34ee
e13ac8a
cb2b3fd
add315d
5fea6d9
76c6f62
cae2d80
0c8a955
da2ff7f
13182dd
9dd1e09
3076062
f449cbf
2e8fa95
6a08127
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
scala_library( | ||
name = "lib", | ||
srcs = glob(["src/main/**/*.scala"]), | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//api:lib", | ||
"//api:thrift", | ||
"//aggregator:lib", | ||
"//online:lib", | ||
"//tools/build_rules/spark:spark-exec", | ||
scala_artifact("org.apache.flink:flink-streaming-scala"), | ||
scala_artifact("org.apache.flink:flink-scala"), | ||
scala_artifact("org.scala-lang.modules:scala-java8-compat"), | ||
scala_artifact("org.scala-lang.modules:scala-collection-compat"), | ||
scala_artifact("org.rogach:scallop"), | ||
maven_artifact("org.apache.flink:flink-streaming-java"), | ||
maven_artifact("org.apache.flink:flink-core"), | ||
maven_artifact("org.apache.flink:flink-metrics-dropwizard"), | ||
maven_artifact("org.apache.flink:flink-metrics-core"), | ||
maven_artifact("org.apache.flink:flink-clients"), | ||
maven_artifact("org.apache.flink:flink-yarn"), | ||
maven_artifact("io.dropwizard.metrics:metrics-core"), | ||
], | ||
) | ||
|
||
scala_library( | ||
name = "test-lib", | ||
srcs = glob(["src/test/**/*.scala"]), | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
":lib", | ||
"//online:lib", | ||
"//api:thrift", | ||
"//api:lib", | ||
"//aggregator:lib", | ||
"//tools/build_rules/spark:spark-exec", | ||
# Libraries | ||
scala_artifact("org.apache.flink:flink-streaming-scala"), | ||
scala_artifact("org.apache.flink:flink-scala"), | ||
scala_artifact("org.scala-lang.modules:scala-java8-compat"), | ||
scala_artifact("org.scala-lang.modules:scala-collection-compat"), | ||
maven_artifact("org.apache.flink:flink-core"), | ||
maven_artifact("org.apache.flink:flink-streaming-java"), | ||
maven_artifact("org.apache.flink:flink-runtime"), | ||
# Testing | ||
scala_artifact("org.scalatest:scalatest-matchers-core"), | ||
scala_artifact("org.scalatest:scalatest-core"), | ||
scala_artifact("org.scalatest:scalatest"), | ||
scala_artifact("org.scalatest:scalatest-flatspec"), | ||
scala_artifact("org.scalatest:scalatest-funsuite"), | ||
scala_artifact("org.scalatest:scalatest-shouldmatchers"), | ||
scala_artifact("org.scalactic:scalactic"), | ||
scala_artifact("org.scalatestplus:mockito-3-4"), | ||
scala_artifact("org.mockito:mockito-scala"), | ||
maven_artifact("org.mockito:mockito-core"), | ||
maven_artifact("org.scalatest:scalatest-compatible"), | ||
maven_artifact("junit:junit"), | ||
maven_artifact("com.novocode:junit-interface"), | ||
maven_artifact("org.apache.flink:flink-test-utils"), | ||
maven_artifact("org.apache.flink:flink-runtime-tests"), | ||
], | ||
) | ||
|
||
scala_test_suite( | ||
name = "test", | ||
srcs = glob(["src/test/**/*.scala"]), | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there seems to be a lot of repetition across targets - i would split these into two python arrays - flink_deps, flink_test_deps and re-use in three places. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
":lib", | ||
":test-lib", | ||
"//online:lib", | ||
"//api:thrift", | ||
"//api:lib", | ||
"//aggregator:lib", | ||
"//tools/build_rules/spark:spark-exec", | ||
# Libraries | ||
scala_artifact("org.apache.flink:flink-streaming-scala"), | ||
scala_artifact("org.apache.flink:flink-scala"), | ||
scala_artifact("org.scala-lang.modules:scala-java8-compat"), | ||
scala_artifact("org.scala-lang.modules:scala-collection-compat"), | ||
maven_artifact("org.apache.flink:flink-core"), | ||
maven_artifact("org.apache.flink:flink-streaming-java"), | ||
maven_artifact("org.apache.flink:flink-runtime"), | ||
# Testing | ||
scala_artifact("org.scalatest:scalatest-matchers-core"), | ||
scala_artifact("org.scalatest:scalatest-core"), | ||
scala_artifact("org.scalatest:scalatest"), | ||
scala_artifact("org.scalatest:scalatest-flatspec"), | ||
scala_artifact("org.scalatest:scalatest-funsuite"), | ||
scala_artifact("org.scalatest:scalatest-shouldmatchers"), | ||
scala_artifact("org.scalactic:scalactic"), | ||
scala_artifact("org.scalatestplus:mockito-3-4"), | ||
scala_artifact("org.mockito:mockito-scala"), | ||
maven_artifact("org.mockito:mockito-core"), | ||
maven_artifact("org.scalatest:scalatest-compatible"), | ||
maven_artifact("junit:junit"), | ||
maven_artifact("com.novocode:junit-interface"), | ||
maven_artifact("org.apache.flink:flink-test-utils"), | ||
maven_artifact("org.apache.flink:flink-runtime-tests"), | ||
], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when we build the flink jar - which of these modules are included and which ones are excluded / treated as provided? We'll want to mimic the sbt assembly behavior here (not blocking this pr but we'll need to address / tackle)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. I think by default bazel includes all dependency jars in the fat jar and we would need additional config setup to replicate excluded/provided behavior in sbt which i'm working as part of separate PR.