Skip to content
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

patch additional data #253

Merged
merged 13 commits into from
Sep 3, 2024
Merged

Conversation

salamonpavel
Copy link
Collaborator

@salamonpavel salamonpavel commented Aug 26, 2024

Introduces PATCH endpoint for additional data
Closes #221

Release notes:

  • Introduces PATCH endpoint for additional data

@salamonpavel salamonpavel added Server Issues touching the server part of the project work in progress Work on this item is not yet finished (mainly intended for PRs) labels Aug 26, 2024
@salamonpavel salamonpavel self-assigned this Aug 26, 2024
@salamonpavel salamonpavel changed the title initial code, endpoint, routes, signatures patch additional data Aug 26, 2024
@salamonpavel
Copy link
Collaborator Author

Release notes:

  • Introduces PATCH endpoint for additional data

Copy link

github-actions bot commented Aug 26, 2024

JaCoCo model module code coverage report - scala 2.13.11

Overall Project 63.64% 🍏

There is no coverage information present for the Files changed

Copy link

github-actions bot commented Aug 26, 2024

JaCoCo agent module code coverage report - scala 2.13.11

Overall Project 85.84% 🍏

There is no coverage information present for the Files changed

Copy link

github-actions bot commented Aug 26, 2024

JaCoCo server module code coverage report - scala 2.13.11

Overall Project 76.4% -7.22% 🍏
Files changed 60.17%

File Coverage
PartitioningRepositoryImpl.scala 100% 🍏
AdditionalDataItemFromDB.scala 100% -537.93%
PartitioningServiceImpl.scala 100% 🍏
BaseController.scala 100% 🍏
PartitioningControllerImpl.scala 92.31% 🍏
CreateOrUpdateAdditionalData.scala 71.95% -71.95%

# Conflicts:
#	server/src/main/scala/za/co/absa/atum/server/api/controller/PartitioningControllerImpl.scala
#	server/src/main/scala/za/co/absa/atum/server/api/repository/PartitioningRepositoryImpl.scala
#	server/src/main/scala/za/co/absa/atum/server/api/service/PartitioningService.scala
#	server/src/main/scala/za/co/absa/atum/server/api/service/PartitioningServiceImpl.scala
Copy link

github-actions bot commented Aug 29, 2024

JaCoCo reader module code coverage report - scala 2.13.11

Overall Project 100% 🍏

There is no coverage information present for the Files changed

# Conflicts:
#	server/src/main/scala/za/co/absa/atum/server/api/controller/PartitioningControllerImpl.scala
#	server/src/main/scala/za/co/absa/atum/server/api/repository/PartitioningRepositoryImpl.scala
#	server/src/main/scala/za/co/absa/atum/server/api/service/PartitioningServiceImpl.scala
#	server/src/test/scala/za/co/absa/atum/server/api/service/PartitioningServiceUnitTests.scala
@salamonpavel salamonpavel marked this pull request as ready for review August 30, 2024 07:49
@salamonpavel salamonpavel removed the work in progress Work on this item is not yet finished (mainly intended for PRs) label Aug 30, 2024
fr"${values.additionalData.map { case (k, v) => (k, v.orNull) }}",
fr"${values.author}"
fr"${args.partitioningId}",
fr"${args.additionalData.data}",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'll take a deeper and proper look later, but why it's not allowed to have Option there?

Copy link
Collaborator Author

@salamonpavel salamonpavel Aug 30, 2024

Choose a reason for hiding this comment

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

We don't want to allow 'empty' values for PATCH operation. That's been discussed. Do you think we should reconsider the decision?

Copy link
Contributor

Choose a reason for hiding this comment

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

@lsulak Option is to enable None/Null for cases to signal that some additional data are expected, but hasn't been defined yet.
Undefining data, that has been already set makes no sense.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay, thanks for the explanation

# Conflicts:
#	server/src/test/scala/za/co/absa/atum/server/api/database/runs/functions/WriteCheckpointV2IntegrationTests.scala
$$
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the whitespaces?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do not recall adding this whitespace, probably automatic formatting was applied ... Commit below accepted.

fr"${values.additionalData.map { case (k, v) => (k, v.orNull) }}",
fr"${values.author}"
fr"${args.partitioningId}",
fr"${args.additionalData.data}",
Copy link
Contributor

Choose a reason for hiding this comment

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

@lsulak Option is to enable None/Null for cases to signal that some additional data are expected, but hasn't been defined yet.
Undefining data, that has been already set makes no sense.

Copy link
Contributor

@benedeki benedeki left a comment

Choose a reason for hiding this comment

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

LGTM

@salamonpavel salamonpavel merged commit c27c776 into master Sep 3, 2024
10 checks passed
@salamonpavel salamonpavel deleted the feature/221-patch-additional-data branch September 3, 2024 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Server Issues touching the server part of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PATCH /partitionings/{partId}/additional-data
3 participants