-
Notifications
You must be signed in to change notification settings - Fork 1
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
#77: scala2.13 support #78
Conversation
build.sbt
Outdated
@@ -68,6 +68,15 @@ lazy val server = (projectMatrix in file("server")) | |||
libraryDependencies ++= Dependencies.serverDependencies, | |||
Compile / packageBin / publishArtifact := false, | |||
(Compile / compile) := ((Compile / compile) dependsOn printSparkScalaVersion).value, | |||
Compile / unmanagedSourceDirectories += { |
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.
Server is not a lib to include but a running app. I would simply build it with Scala 2.13 atm
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.
Actually no. Keep it only 2.12. fa-db doesn't support 2.13 yet. :-(
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.
You are right - I've changed a thing or two. Now only the agent (and model) is being compiled against all 3 versions, the server is compiled only for 2.12.
The sbt log looks something like this:
[info] compiling 7 Scala sources to /Users/ab0222l/Documents/git/atum-service/model/target/jvm-2.12/classes ...
[info] compiling 7 Scala sources to /Users/ab0222l/Documents/git/atum-service/model/target/jvm-2.13/classes ...
[info] compiling 7 Scala sources to /Users/ab0222l/Documents/git/atum-service/model/target/jvm-2.11/classes ...
[info] compiling 25 Scala sources to /Users/ab0222l/Documents/git/atum-service/server/target/jvm-2.12/classes ...
[info] compiling 5 Scala sources to /Users/ab0222l/Documents/git/atum-service/agent/target/spark3-jvm-2.12/classes ...
[info] compiling 5 Scala sources to /Users/ab0222l/Documents/git/atum-service/agent/target/jvm-2.12/classes ...
[info] compiling 5 Scala sources to /Users/ab0222l/Documents/git/atum-service/agent/target/jvm-2.13/classes ...
[info] compiling 5 Scala sources to /Users/ab0222l/Documents/git/atum-service/agent/target/spark2-jvm-2.12/classes ...
[info] compiling 5 Scala sources to /Users/ab0222l/Documents/git/atum-service/agent/target/spark3-jvm-2.13/classes ...
[info] compiling 5 Scala sources to /Users/ab0222l/Documents/git/atum-service/agent/target/jvm-2.11/classes ...
[info] compiling 5 Scala sources to /Users/ab0222l/Documents/git/atum-service/agent/target/spark2-jvm-2.11/classes ...
…t (and model) in 2.11, 2.12, and 2.13
Please update this to from |
JaCoCo agent module code coverage report - spark:2 - scala 2.12.18
|
JaCoCo server module code coverage report - scala 2.12.18
|
I have updated it to 2.12.18. That fixed missing JaCoCo comments. |
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.
- code reviewed
- pulled
- built
- run
project/Dependencies.scala
Outdated
val scala212 = "2.12.18" | ||
val scala213 = "2.13.11" | ||
|
||
val serverScalaVersion: String = scala212 |
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.
Nice!
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.
Why is this not a Seq as well as aqentSupportedVersions
?
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.
Because supporting more versions in the server is not needed imho, i.e. there will be probably just 1 instance of server, managed by 'us', deployed into Docker & ECR repo & EKS, and it will be able to communicate with the agent that might be in any version - it's just a REST API communication between them after all
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.
but on the other hand, agent will be used inside of our applications' scala code, which are usually in range of Scala 2.11 - 2.13 so that must be a Seq
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.
Also, is there a reason for sever not being 2.13?
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.
Yes, usually everything in my code has a reason although sometimes not a good one :D anyway, in this case, server has a dependency on fa-db and that is not yet on 2.13 unfortunately
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.
Because supporting more versions in the server is not needed imho, i.e. there will be probably just 1 instance of server, managed by 'us', deployed into Docker & ECR repo & EKS, and it will be able to communicate with the agent that might be in any version - it's just a REST API communication between them after all
@lsulak I get it, but then you have 2 different implementations. I would have it both as Seq to have it the same across. First look you see one as Seq and one not.
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.
Why to have something as a different, and improper, data type, just for the sake of consistency? To the best of my knowledge, server will always be in 1 version, thus any kind of iterable doesn't make sense
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.
I like the way how it is.
But the DB tests will also suffice to exist under one Scala version. On the other hand the Model module is multi-versioned. So maybe a rename of the variable to more neutral ones?
build.sbt
Outdated
@@ -58,6 +57,7 @@ lazy val root = (projectMatrix in file(".")) | |||
name := "atum-service-root", | |||
javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint"), | |||
publish / skip := true, | |||
crossScalaVersions := Nil, | |||
mergeStrategy |
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.
Are we using sbt assembly
for something?
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.
I guess that there will be Jar containing server and its configuration, and the model, nicely packaged together with it
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.
I wanna make a bold comment that you do not need mergeStrategy
at all. Or at least I have not seen it.
…o feature/77-scala212-support
I have tested this "requirement" on another GHA workflow and it does not work. The not shorted scala version string is required in titles (can be changed, here) and in sbt ++{scala.version} call, where it is required. |
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.
- pulled
- code review
- run test
- run JaCoCo
Optional: This is nice PR to do some atomic increment increase of code coverage.
Oopsie. We recently added (outside of this PR) logging via SLF4S, but that's not yet compatible with Scala 2.13 :( mattroberts297/slf4s#20 |
project/Dependencies.scala
Outdated
val scala212 = "2.12.18" | ||
val scala213 = "2.13.11" | ||
|
||
val serverScalaVersion: String = scala212 |
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.
I like the way how it is.
But the DB tests will also suffice to exist under one Scala version. On the other hand the Model module is multi-versioned. So maybe a rename of the variable to more neutral ones?
|
Closes #77