Skip to content

Conversation

@ABLL526
Copy link
Contributor

@ABLL526 ABLL526 commented Jan 21, 2025

  • Added the getAncestors Functionality for the Server Portion

Closes #305
Depends on #311

Release notes:

  • Created endpoint /api/v2/partitionings/{partitioning_id}/ancestors to get the partitioning ancestors.

1. Made the necessary changes as mentioned by the team.
3. Made the necessary changes to the getAncestors Database functionality.
1. Made the necessary changes as mentioned by the team.
3. Made the necessary changes to the getAncestors Server functionality.
@github-actions
Copy link

github-actions bot commented Jan 21, 2025

JaCoCo model module code coverage report - scala 2.13.11

Overall Project 56.38% 🍏
File Coverage
ApiPaths.scala 0% 🍏

@github-actions
Copy link

github-actions bot commented Jan 21, 2025

JaCoCo agent module code coverage report - scala 2.13.11

Overall Project 78.98% 🍏

There is no coverage information present for the Files changed

@github-actions
Copy link

github-actions bot commented Jan 21, 2025

JaCoCo reader module code coverage report - scala 2.13.11

Overall Project 95.16% 🍏

There is no coverage information present for the Files changed

@github-actions
Copy link

github-actions bot commented Jan 21, 2025

JaCoCo server module code coverage report - scala 2.13.11

Overall Project 68.54% -10.42% 🍏
Files changed 52.94%

File Coverage
PartitioningRepositoryImpl.scala 100% 🍏
PartitioningServiceImpl.scala 100% 🍏
PartitioningControllerImpl.scala 92.72% 🍏
GetFlowPartitionings.scala 69.54% -63.79%
GetPartitioningAncestors.scala 69.54%
SeqImplicits.scala 61.54%

@ABLL526 ABLL526 self-assigned this Jan 21, 2025
@ABLL526 ABLL526 added enhancement New feature or request good first issue Good for newcomers DB Issues touching the Database part of the project Server Issues touching the server part of the project labels Jan 21, 2025
@ABLL526 ABLL526 changed the title 305-Get-Ancestors-Server $305 Get-Ancestors-Server Functionality Jan 21, 2025
@ABLL526 ABLL526 changed the title $305 Get-Ancestors-Server Functionality #305 Get-Ancestors-Server Functionality Jan 21, 2025
@@ -0,0 +1,121 @@
/*
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess this shouldn't even be part of this PR as there is #311

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed


object GetAncestorsResult {

@tailrec def resultsToPartitioningWithIdDTOs(
Copy link
Collaborator

Choose a reason for hiding this comment

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

The very same code already exists in GetFlowPartitioning, maybe we could introduce some abstraction and reuse it here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea.

final val Measures = "measures"
final val MainFlow = "main-flow"
final val Ancestors = "ancestors"
final val Parents = "parents"
Copy link
Collaborator

Choose a reason for hiding this comment

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

not used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

PartitioningController.getAncestors(partitioningId, limit, offset)
}
),
// createServerEndpoint[
Copy link
Collaborator

@salamonpavel salamonpavel Jan 28, 2025

Choose a reason for hiding this comment

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

Not part of this PR (the commented-out code). This goes for multiple places. You can remove all the code unrelated to this PR I think...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

Copy link
Collaborator

@salamonpavel salamonpavel left a comment

Choose a reason for hiding this comment

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

Please clean up this PR. It cannot contain unrelated code. You should introduce only code related to the server's part of get ancestor operation if that's what this PR is intended for.

@ABLL526 ABLL526 dismissed stale reviews from lsulak and salamonpavel via b80ff9a April 1, 2025 15:33
ABLL526 and others added 16 commits April 1, 2025 18:05
- SeqImplicits
- ApiPaths
- PartitioningController, PartitioningRepository, PartitioningService
- SeqImplicits
- ApiPaths
- PartitioningController, PartitioningRepository, PartitioningService, GetFlowPartitionings, GetPartitioningAncestors
- SeqImplicits
- ApiPaths
- PartitioningController, PartitioningRepository, PartitioningService, GetFlowPartitionings, GetPartitioningAncestors
# Conflicts:
#	server/src/main/scala/za/co/absa/atum/server/api/database/flows/functions/GetFlowPartitionings.scala
#	server/src/main/scala/za/co/absa/atum/server/api/http/Routes.scala
#	server/src/main/scala/za/co/absa/atum/server/api/v2/http/Endpoints.scala
#	server/src/main/scala/za/co/absa/atum/server/api/v2/repository/PartitioningRepositoryImpl.scala
#	server/src/test/scala/za/co/absa/atum/server/api/TestData.scala
#	server/src/test/scala/za/co/absa/atum/server/api/v2/http/GetPartitioningAncestorsEndpointV2UnitTests.scala
Updated Jacoco Ignores
ABLL526 and others added 3 commits July 24, 2025 14:19
      - "za.co.absa.atum.server.api.v2.service.PartitioningService",
      - "za.co.absa.atum.server.api.v2.repository.PartitioningRepository",
      - "za.co.absa.atum.server.api.v2.controller.PartitioningController"
- Amended the `JacocoSetup.scala` excludes to include the following:
      - "za.co.absa.atum.server.api.v2.service.PartitioningService",
      - "za.co.absa.atum.server.api.v2.repository.PartitioningRepository",
      - "za.co.absa.atum.server.api.v2.controller.PartitioningController"
ABLL526 added 2 commits July 31, 2025 14:43
# Conflicts:
#	project/JacocoSetup.scala
#	server/src/main/scala/za/co/absa/atum/server/Main.scala
#	server/src/main/scala/za/co/absa/atum/server/api/v2/controller/PartitioningController.scala
#	server/src/main/scala/za/co/absa/atum/server/api/v2/controller/PartitioningControllerImpl.scala
#	server/src/main/scala/za/co/absa/atum/server/api/v2/http/Endpoints.scala
#	server/src/main/scala/za/co/absa/atum/server/api/v2/repository/PartitioningRepository.scala
#	server/src/main/scala/za/co/absa/atum/server/api/v2/repository/PartitioningRepositoryImpl.scala
#	server/src/main/scala/za/co/absa/atum/server/api/v2/service/PartitioningService.scala
#	server/src/main/scala/za/co/absa/atum/server/api/v2/service/PartitioningServiceImpl.scala
#	server/src/test/scala/za/co/absa/atum/server/api/v2/controller/PartitioningControllerUnitTests.scala
#	server/src/test/scala/za/co/absa/atum/server/api/v2/repository/PartitioningRepositoryUnitTests.scala
#	server/src/test/scala/za/co/absa/atum/server/api/v2/service/PartitioningServiceUnitTests.scala
- Added a Unit test for `resultsToPartitioningWithIdDTOs`

Signed-off-by: ABLL526 <Liam.Leibrandt@absa.africa>
@ABLL526 ABLL526 merged commit fe9ec6b into master Aug 1, 2025
9 checks passed
@ABLL526 ABLL526 deleted the 305-Get-Ancestors-Server branch August 1, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DB Issues touching the Database part of the project enhancement New feature or request good first issue Good for newcomers Server Issues touching the server part of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GET /partitionings/{partId}/parents -> returns all ancestors, not just direct ones

4 participants