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

Feature/224 post partitioning #258

Merged
merged 11 commits into from
Sep 17, 2024
Merged

Conversation

salamonpavel
Copy link
Collaborator

@salamonpavel salamonpavel commented Sep 3, 2024

Introduces POST endpoint for partitioning creation
Closes #224

Release notes:

  • Introduces POST endpoint for partitioning creation

# Conflicts:
#	server/src/main/scala/za/co/absa/atum/server/api/controller/PartitioningControllerImpl.scala
#	server/src/main/scala/za/co/absa/atum/server/api/http/Routes.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
@salamonpavel
Copy link
Collaborator Author

Release notes

  • Introduces POST endpoint for partitioning creation

Copy link

github-actions bot commented Sep 3, 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 Sep 3, 2024

JaCoCo agent module code coverage report - scala 2.13.11

Overall Project 84.63% 🍏

There is no coverage information present for the Files changed

Copy link

github-actions bot commented Sep 3, 2024

JaCoCo reader module code coverage report - scala 2.13.11

Overall Project 100% 🍏

There is no coverage information present for the Files changed

Copy link

github-actions bot commented Sep 3, 2024

JaCoCo server module code coverage report - scala 2.13.11

Overall Project 76.37% -3.82% 🍏
Files changed 83.27% 🍏

File Coverage
PartitioningRepositoryImpl.scala 100% 🍏
PartitioningServiceImpl.scala 100% 🍏
PartitioningControllerImpl.scala 88.78% 🍏
CreatePartitioning.scala 69.83% -37.29% 🍏
CreatePartitioningIfNotExists.scala 69.04% -38.43% 🍏

@salamonpavel salamonpavel marked this pull request as ready for review September 3, 2024 14:57
@salamonpavel salamonpavel self-assigned this Sep 6, 2024
_status BIGINT;
BEGIN

id_partitioning := runs._get_id_partitioning(i_partitioning, true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

the alignment of the fnc body needs to be shifted by 1 tab or something to the right

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

status := 11;
status_text := 'Partitioning created';
ELSE
status := 31;
Copy link
Collaborator

Choose a reason for hiding this comment

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

what, is this the only difference, the status code for situation when partitioning is already present? In comparison to runs.create_partitioning_if_not_exists function. Otherwise I think this is 1:1 copy almost

Copy link
Collaborator

Choose a reason for hiding this comment

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

so I think we shouldn't have same implementation twice..possibly just call runs.create_partitioning_if_not_exists from this function and change the status code in select / case when statement, if this is really needed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is a difference in that the new function does register parent partitioning only when the child partitioning does not exist. Anyway I think we should have a call maybe about the create partitioning operation in general ...

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's find a spot tomorrow. I think/hope it won't be long.

@salamonpavel salamonpavel added the work in progress Work on this item is not yet finished (mainly intended for PRs) label Sep 17, 2024
@salamonpavel salamonpavel removed the work in progress Work on this item is not yet finished (mainly intended for PRs) label Sep 17, 2024
@salamonpavel
Copy link
Collaborator Author

The code has been updated. Most of previous comments about the SQL part have become obsolete as the function has been refactored and simplified. @benedeki and @lsulak

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.

  • code reviewed
  • pulled
  • built
  • run

@salamonpavel salamonpavel merged commit 3398044 into master Sep 17, 2024
10 of 11 checks passed
@salamonpavel salamonpavel deleted the feature/224-post-partitioning branch September 17, 2024 11:15

INSERT INTO runs.partitionings (partitioning, created_by)
VALUES (i_partitioning, i_by_user)
RETURNING partitionings.id_partitioning INTO create_partitioning.id_partitioning;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I didn't know that these were possible :)

-- Parameters:
-- i_partitioning - partitioning to create or which existence to check
-- i_by_user - user behind the change
-- i_parent_partitioning_id - (optional) parent partitioning id
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
-- i_parent_partitioning_id - (optional) parent partitioning id
-- i_parent_partitioning_id - (optional) parent partitioning id, must already exist if specified

or something like that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

POST /partitionings
3 participants