-
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
Server endpoints v2 returning the checkpoins data of a partitioning: 190 #194
Server endpoints v2 returning the checkpoins data of a partitioning: 190 #194
Conversation
JaCoCo server module code coverage report - scala 2.13.11
|
…-the-checkpoins-data-of-a-partitioning
…-the-checkpoins-data-of-a-partitioning
…tioningCheckpoints.scala
…ss and its object
…oints class and its object
…related classes.
…related classes.
JaCoCo model module code coverage report - scala 2.13.11
|
JaCoCo agent module code coverage report - scala 2.13.11
|
database/src/main/postgres/flows/V1.9.1__get_flow_checkpoints.sql
Outdated
Show resolved
Hide resolved
database/src/main/postgres/flows/V1.9.1__get_flow_checkpoints.sql
Outdated
Show resolved
Hide resolved
database/src/main/postgres/runs/V1.8.3__get_partitioning_checkpoints.sql
Outdated
Show resolved
Hide resolved
708067c
to
b591397
Compare
…-the-checkpoins-data-of-a-partitioning
...rc/test/scala/za/co/absa/atum/database/runs/GetPartitioningCheckpointsIntegrationTests.scala
Outdated
Show resolved
Hide resolved
Looks good to me, review finished, just 1 minor thing, kind of consistency reasons; no other remarks outside of that, happy to approve soon! |
…ns-data-of-a-partitioning' of https://github.com/AbsaOSS/atum-service into feature/#190-Server-endpoints-v2-returning-the-checkpoins-data-of-a-partitioning
@@ -54,6 +54,15 @@ trait Endpoints extends BaseEndpoints { | |||
.out(jsonBody[AdditionalDataSubmitDTO]) | |||
} | |||
|
|||
protected val getPartitioningCheckpointsEndpoint |
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.
We will have endpoints of different versions alongside one another therefore I would suggest a suffix V2 getPartitioningCheckpointsEndpointV2
.
@@ -27,18 +27,30 @@ import zio.test._ | |||
|
|||
object PartitioningControllerIntegrationTests extends ZIOSpecDefault with TestData { |
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 rename the class. It's not an integration test and therefore should be executed as a unit test.
@@ -64,6 +76,24 @@ object PartitioningControllerIntegrationTests extends ZIOSpecDefault with TestDa | |||
failsWithA[InternalServerErrorResponse] | |||
) | |||
} | |||
), | |||
|
|||
suite("GetPartitioningMeasuresSuite")( |
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.
GetPartitioningCheckpointsSuite
checkpointName = Some("checkpointName") | ||
) | ||
// Read[CheckpointFromDB] implicit validation | ||
Read[CheckpointFromDB] |
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 this needed here? Implicits are resolved on compile time. Your code wouldn't compile if the read instance couldn't be constructed.
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 left it there because of the conversation that you and I had that we should keep it there for future references.
@@ -56,6 +57,11 @@ class PartitioningServiceIntegrationTests extends ZIOSpecDefault with TestData { | |||
when(partitioningRepositoryMock.getPartitioningAdditionalData(partitioningDTO2)) | |||
.thenReturn(ZIO.fail(DatabaseError("boom!"))) | |||
|
|||
when(partitioningRepositoryMock.getPartitioningCheckpoints(checkpointQueryDTO1)) |
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.
Rename the class as these are unit tests and therefore should be executed as such. Also change it to object and remove the runwith annotation.
…-the-checkpoins-data-of-a-partitioning
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.
There are inconsistent namings. I would personally use getPartitioningCheckpoints everywhere (sometimes you use getPartitioningMeasures instead).
Absolutely, I support this idea. However, I think this PR (and few others) has been here for far too long, and we know that we already have some technical debt in endpoint/operation namings, plus we need to update the agent to support some of the missing operations (especially those for v2). I'll approve now as I think that it's complete from my PoV. |
CheckpointQuery
andCheckpointFromDB
as input and output types for the partitioning checkpoint operation.checkpointDTO
.closes #190