-
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
introduce zio into atum server #150
Conversation
…de, remove obsolete stuff
server/src/test/scala/za/co/absa/atum/server/api/TestTransactorProvider.scala
Show resolved
Hide resolved
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.
Please update the main Readme in the repo as well, it still contains a Spring section
JaCoCo agent module code coverage report - spark:2 - scala 2.12.18
|
JaCoCo server module code coverage report - scala 2.13.11
|
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.
Good to go in my view!
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.
Hey, I didn't make in time before the merge 😄
This is very cool and very educating form me!
Just have one question of curiosity.
trait CheckpointController { | ||
def createCheckpoint(checkpointDTO: CheckpointDTO): IO[ErrorResponse, CheckpointDTO] | ||
} | ||
|
||
class CheckpointControllerImpl(checkpointService: CheckpointService) extends CheckpointController { |
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.
Is it a usual ZIO pattern to have both the trait and the class in the same file?
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.
@yruslan
I haven't encountered any specific guidelines related to ZIO for this particular matter. Personally, I lean towards keeping interfaces or traits in separate files. However, I've noticed that this practice isn't consistently followed in the Atum project. Perhaps having these interfaces in the same files might better illustrate how to construct ZIO services. We can definitely reconsider this approach in the future, especially if we bring in other implementations. I'm curious to hear your thoughts on this topic. What's your perspective?
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.
This is actually funny. I saw this approach first and Hector, who did it in Atum Agent.
I am personally not that big of a fan either, but didn't consider it serious enough at that stage of development. Then I saw you @salamonpavel using it and thought, it's one of the conventions out there. So I didn't bring it up anymore.
if we agree we prefer the style of having them in separate files, as it seems, let's do 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'm on the same page. Having them separately is probably just a habit for me over some time. Definitely not a big deal in Scala, and if it better illustrates how ZIO works it is a good reason. For me class name having the same name as train/class inside is more for 2 reasons:
- It also going to match .class files in target
- IntelliJ idea does not place good icon on files for which class and file name do not match 😆 :
So overall no strong opinions, especially for Atum, completely up to you.
ZIO framework was introduced to Atum server module as a replacement of Spring. Endpoints were defined using Tapir since available interpreters can generate Http routes for Http4s server backend and Swagger docs from Tapir endpoints. Simple database integration tests were introduced to verify that Doobie based function objects work as expected as they replaced Slick based ones. Atum server module's target Scala version upgraded to 2.13. Jacoco plugin upgraded to 1.6.1 as the previous version wasn't compatible with upgraded github runners anymore. Missing test coverage partially addressed.
! Classes currently not covered by test cases (mainly endpoints) will be tested as part of #152 when we upgrade target Java version #151 !
Closes #147
Closes #148
Closes #149