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

#245 Add the ability to query REST endpoints from Reader module #297

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

benedeki
Copy link
Contributor

@benedeki benedeki commented Nov 1, 2024

  • Implemented Reader and ReaderWithPartitioningId base classes for all readers - they are to bringAtum server connectivity/querying ability
  • Created 'ServerConfig' case class representing values needed to connect to an Atum Server
  • RequestResult[R] represents an Atum server query response.
  • Offered implicits for MonadError type class needed for Reader and ReaderWithPartitioningId - there are Future, Cats IO and Zio Task ones (the last one available only in Scala 2.13)
  • AtumPartitions and AdditionalData moved from Agent to Module
  • ErrorResponse received a method to decode from Json based on http status code

Closes #245

Depends on #300

Release Notes:

  • Reader module now supports connection to Atum server.

@benedeki benedeki added the work in progress Work on this item is not yet finished (mainly intended for PRs) label Nov 1, 2024
@benedeki benedeki self-assigned this Nov 1, 2024
Copy link

github-actions bot commented Nov 1, 2024

JaCoCo model module code coverage report - scala 2.13.11

Overall Project 58.76% -34.41% 🍏
Files changed 66.75%

File Coverage
JsonSyntaxExtensions.scala 94.34% -5.66% 🍏
ErrorResponse.scala 89.66%
basic.scala 47.17%

Copy link

github-actions bot commented Nov 1, 2024

JaCoCo agent module code coverage report - scala 2.13.11

Overall Project 78.2% 🍏
Files changed 100% 🍏

File Coverage
AtumAgent.scala 97.13% 🍏
AtumContext.scala 91.79% 🍏

Copy link

github-actions bot commented Nov 1, 2024

JaCoCo reader module code coverage report - scala 2.13.11

Overall Project 90.86% 🍏
Files changed 40.31%

File Coverage
FlowReader.scala 100% -35.71%
PartitioningReader.scala 100%
Reader.scala 100% -6.56% 🍏
PartitioningIdProvider.scala 100% 🍏
io.scala 100% 🍏
future.scala 100% 🍏
ServerConfig.scala 88.24%
RequestResult.scala 12.5%

Copy link

github-actions bot commented Nov 1, 2024

JaCoCo server module code coverage report - scala 2.13.11

Overall Project 68.39% 🍏

There is no coverage information present for the Files changed

@benedeki benedeki marked this pull request as ready for review November 6, 2024 12:12
@benedeki benedeki added the dependent The item depends on some other open item (Issue or PR) label Nov 21, 2024
@benedeki benedeki removed the dependent The item depends on some other open item (Issue or PR) label Nov 22, 2024
@benedeki
Copy link
Contributor Author

@benedeki benedeki removed the work in progress Work on this item is not yet finished (mainly intended for PRs) label Nov 24, 2024
echo "Total 'model' module coverage ${{ steps.jacoco-model.outputs.coverage-overall }}"
echo "Changed files of 'model' module coverage ${{ steps.jacoco-model.outputs.coverage-changed-files }}"
echo "Total 'server' module coverage ${{ steps.jacoco-server.outputs.coverage-overall }}"
echo "Changed files of'server' module coverage ${{ steps.jacoco-server.outputs.coverage-changed-files }}"
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
echo "Changed files of'server' module coverage ${{ steps.jacoco-server.outputs.coverage-changed-files }}"
echo "Changed files of 'server' module coverage ${{ steps.jacoco-server.outputs.coverage-changed-files }}"

@@ -247,6 +246,7 @@ Code coverage wil be generated on path:
To make this project runnable via IntelliJ, do the following:
- Make sure that your configuration in `server/src/main/resources/reference.conf`
is configured according to your needs
- When building within the UI be sure to have the option `-language:higherKinds` on in the compiler options
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand - what UI do you mean?

case Right(value) => value
case Left(error) => throw new RuntimeException(s"Failed to decode JSON: $error")
case Left(error) => throw error
Copy link
Collaborator

Choose a reason for hiding this comment

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

why removing the prefix of the exception msg? I think it was quite useful, we would exactly know what this is coming from

Copy link

Choose a reason for hiding this comment

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

Should we not add some failure tests as well?

Copy link

Choose a reason for hiding this comment

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

Should we not add some failure tests as well?

@@ -82,9 +84,10 @@ class PartitioningIdProviderUnitTests extends AnyFunSuiteLike {
}
}

test("Failure to decode response body") {
test("Failure to decode res " +
Copy link
Collaborator

Choose a reason for hiding this comment

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

accidental line break maybe?

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.

Add the ability to query REST endpoints from Reader module
4 participants