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

refactor: Ziofy ProjectsResponderADM DEV-1728 #2459

Merged
merged 15 commits into from Feb 20, 2023

Conversation

seakayone
Copy link
Collaborator

@seakayone seakayone commented Feb 17, 2023

Pull Request Checklist

Task Description/Number

Issue Number: DEV-1728

Migrates the ProjectsResponderADM into ZIO land.

  • Introduces ProjectsResponderADM trait which exposes the methods from the receive/handle to the outside world for possible direct use
  • Adds a live implementation and layer for above trait
  • Adds a ZIO implementation for the IriLocker
  • Adds a ZioHelper object which implements functions for ZIOs akin to Scala's Future#sequence functions
  • Adds overloaded Triplestore#sparqlHttpExtendedConstruct methods which accepts a String
  • Fixes handling of errors in ActorUtil#zio2Message, all causes are sent back to the actor as failure

PR is based on #2453 that is why I have set this as the merge target for now so that you do not have to review the other PR twice.

Basic Requirements

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • fix: represents bug fixes
  • refactor: represents production code refactoring
  • feat: represents a new feature
  • docs: documentation changes (no production code change)
  • chore: maintenance tasks (no production code change)
  • test: all about tests: adding, refactoring tests (no production code change)
  • other... Please describe:

Does this PR introduce a breaking change?

  • Yes
  • No
  • Maybe (not 100% sure => check with FE)

Does this PR change client-test-data?

  • Yes (don't forget to update the JS-LIB team about the change)
  • No

@seakayone seakayone changed the base branch from main to wip/introduce-MessageRelay February 17, 2023 16:18
@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Base: 9.69% // Head: 86.51% // Increases project coverage by +76.82% 🎉

Coverage data is based on head (074e3b2) compared to base (c61368a).
Patch coverage: 93.11% of modified lines in pull request are covered.

❗ Current head 074e3b2 differs from pull request most recent head 7474f07. Consider uploading reports for the commit 7474f07 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##            main    #2459       +/-   ##
==========================================
+ Coverage   9.69%   86.51%   +76.82%     
==========================================
  Files        285      287        +2     
  Lines      29491    29487        -4     
==========================================
+ Hits        2858    25510    +22652     
+ Misses     26633     3977    -22656     
Impacted Files Coverage Δ
...sponder/projectsmessages/ProjectsMessagesADM.scala 79.86% <ø> (+47.65%) ⬆️
...tore/triplestoremessages/TriplestoreMessages.scala 81.06% <ø> (+62.87%) ⬆️
...a/webapi/responders/EntityAndClassIriService.scala 96.15% <ø> (+96.15%) ⬆️
.../scala/org/knora/webapi/responders/Responder.scala 66.66% <0.00%> (+66.66%) ⬆️
...scala/org/knora/webapi/responders/IriService.scala 77.27% <77.27%> (ø)
...c/main/scala/org/knora/webapi/util/ActorUtil.scala 86.66% <83.33%> (+86.66%) ⬆️
...webapi/responders/admin/ProjectsResponderADM.scala 93.02% <96.10%> (+93.02%) ⬆️
...c/main/scala/org/knora/webapi/core/AppRouter.scala 100.00% <100.00%> (+100.00%) ⬆️
.../webapi/core/AppRouterRelayingMessageHandler.scala 100.00% <100.00%> (ø)
...ain/scala/org/knora/webapi/core/MessageRelay.scala 100.00% <100.00%> (ø)
... and 215 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@seakayone seakayone changed the title Wip/ziofy projects responder refactor: Ziofy ProjectsResponderADM DEV-1728 Feb 17, 2023
@linear
Copy link

linear bot commented Feb 17, 2023

Copy link
Collaborator

@BalduinLandolt BalduinLandolt left a comment

Choose a reason for hiding this comment

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

LGTM, just one minor suggestion, feel free to ignore it

Copy link
Collaborator

@mpro7 mpro7 left a comment

Choose a reason for hiding this comment

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

Nice one. Just please answer my questions and check cosmetic suggestions:

* Executes the effect synchronously and returns its result as a
* [[A]] value or throws a [[FiberFailure]].
*
* This method is effectful and should only be used at the edges of your
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 effectful in terms of ZIO, but could you be more specific here maybe?

@seakayone seakayone changed the base branch from wip/introduce-MessageRelay to main February 20, 2023 15:31
@seakayone seakayone added this pull request to the merge queue Feb 20, 2023
Merged via the queue into main with commit 69c0640 Feb 20, 2023
@seakayone seakayone deleted the wip/ziofy-ProjectsResponder branch February 20, 2023 17:16
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.

None yet

4 participants