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(cacheservice): use ZIO (DEV-546) #2022

Merged
merged 47 commits into from Apr 12, 2022

Conversation

subotic
Copy link
Collaborator

@subotic subotic commented Mar 13, 2022

Resolves DEV-546

PR Checklist

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?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: DSP-546

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@subotic subotic self-assigned this Mar 13, 2022
…h-swiss/dsp-api into wip/DEV-546-zio-fying-cache-service
@subotic subotic changed the title refactor(cacheservice): use ZIO refactor(cacheservice): use ZIO (DEV-546) Apr 6, 2022
@subotic subotic marked this pull request as draft April 6, 2022 18:33
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.

In general I think you are missing empty end line in many new files. To avoid that problem it's handy to use this vscode setting turned on: "files.insertFinalNewline": true

I think turning the formatting again on the other way doesn't make sense :)

@@ -1,6 +1,6 @@
version = "2.7.5"
maxColumn = 120
align.preset = some
align.preset = most
Copy link
Collaborator

Choose a reason for hiding this comment

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

now we going to have a lot of formatting noise

Comment on lines 411 to 418
// get current user information
currentUserInformation: Option[UserADM] <- getSingleUserADM(
identifier = UserIdentifierADM(maybeIri = Some(userIri)),
userInformationType = UserInformationTypeADM.Full,
featureFactoryConfig = featureFactoryConfig,
requestingUser = KnoraSystemInstances.Users.SystemUser
)
identifier = UserIdentifierADM(maybeIri = Some(userIri)),
userInformationType = UserInformationTypeADM.Full,
featureFactoryConfig = featureFactoryConfig,
requestingUser = KnoraSystemInstances.Users.SystemUser
)

Copy link
Collaborator

Choose a reason for hiding this comment

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

This also looks weird. Whole file is also just formatting...

Copy link

@irinaschubert irinaschubert left a comment

Choose a reason for hiding this comment

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

LGTM although I have no confidence at all with ZIO
What I am not sure about are the ZIO related import statements. To me it seems like duplications sometimes but maybe I just don't understand it.

*
* @tparam T the type parameter of our value.
* @tparam A the type parameter of our value.

Choose a reason for hiding this comment

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

@param bytes should probably also be documented

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, will do that after I find a better implementation regarding serialisation.

subotic and others added 12 commits April 8, 2022 17:49
…eServiceManager.scala

Co-authored-by: irinaschubert <irina.schubert@dasch.swiss>
…eServiceManager.scala

Co-authored-by: irinaschubert <irina.schubert@dasch.swiss>
…eServiceManager.scala

Co-authored-by: irinaschubert <irina.schubert@dasch.swiss>
…from-akka-actor-to-zlayer.md

Co-authored-by: irinaschubert <irina.schubert@dasch.swiss>
…h-swiss/dsp-api into wip/DEV-546-zio-fying-cache-service
@sonarcloud
Copy link

sonarcloud bot commented Apr 10, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

No Coverage information No Coverage information
3.9% 3.9% Duplication

@subotic subotic marked this pull request as ready for review April 12, 2022 11:08
@subotic subotic merged commit 521150f into main Apr 12, 2022
@subotic subotic deleted the wip/DEV-546-zio-fying-cache-service branch April 12, 2022 11:08
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

3 participants