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
feat(projectsADM): add possibility to get project and members by UUID (DEV-1408) #2272
feat(projectsADM): add possibility to get project and members by UUID (DEV-1408) #2272
Conversation
✅ Linked to Story DEV-1408 · DSP-API: Make possible to get project by UUID |
Codecov ReportBase: 86.85% // Head: 86.95% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2272 +/- ##
==========================================
+ Coverage 86.85% 86.95% +0.09%
==========================================
Files 241 242 +1
Lines 27967 28102 +135
==========================================
+ Hits 24292 24435 +143
+ Misses 3675 3667 -8
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are missing... as discussed, this is probably not testable in unit tests. but is there a ent-to-end test that you could use?
This is testable in unit tests of the project route which we don't have. We only have e2e tests of the project responder, which would look the same as get by IRI tests, simply because of making UUID the IRI to reuse existing stuff. But if these tests pass we can assume that it's good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Nothing to add from my side, apart from what we already discussed yesterday
webapi/src/main/scala/org/knora/webapi/routing/admin/ProjectsRouteADM.scala
Outdated
Show resolved
Hide resolved
...n/scala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsMessagesADM.scala
Outdated
Show resolved
Hide resolved
...n/scala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsMessagesADM.scala
Outdated
Show resolved
Hide resolved
...n/scala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsMessagesADM.scala
Outdated
Show resolved
Hide resolved
...n/scala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsMessagesADM.scala
Show resolved
Hide resolved
webapi/src/main/scala/org/knora/webapi/routing/admin/ProjectsRouteADM.scala
Outdated
Show resolved
Hide resolved
...n/scala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsMessagesADM.scala
Outdated
Show resolved
Hide resolved
...n/scala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsMessagesADM.scala
Outdated
Show resolved
Hide resolved
...n/scala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsMessagesADM.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand the whole point in having e.g. a Shortcode
and a ShortcodeIdentifier
and not merge these two types into one (reuse the existing (new) value objects and let them extend the ProjectIdentifierADM
). To me this looks overengineered but I probably don't see the whole picture. Apart from that it looks good to me, I added mainly suggestions to improve the readability of the code.
...n/scala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsMessagesADM.scala
Outdated
Show resolved
Hide resolved
...n/scala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsMessagesADM.scala
Outdated
Show resolved
Hide resolved
...n/scala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsMessagesADM.scala
Show resolved
Hide resolved
webapi/src/main/scala/org/knora/webapi/store/cache/impl/CacheServiceInMemImpl.scala
Outdated
Show resolved
Hide resolved
webapi/src/main/scala/org/knora/webapi/store/cache/impl/CacheServiceInMemImpl.scala
Outdated
Show resolved
Hide resolved
webapi/src/main/scala/org/knora/webapi/store/cache/impl/CacheServiceRedisImpl.scala
Outdated
Show resolved
Hide resolved
webapi/src/main/scala/org/knora/webapi/store/cache/impl/CacheServiceRedisImpl.scala
Outdated
Show resolved
Hide resolved
def getProjectByIri(id: String): Task[Option[ProjectADM]] = | ||
def getProjectByIri(id: Iri.ProjectIri): Task[Option[ProjectADM]] = | ||
(for { | ||
bytes <- getBytesValue(id.value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this has to be treated differently than shortcode and shortname and can't be treated as a String? (Same for getProjectByUuid
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I just repeated @subotic implementation, so maybe he can highlight us why this was implemented differently? However as we agreed this is not used anywhere thus going to be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not much to add from my side
Issue Number: DEV-1488
Pull Request Checklist
Basic Requirements
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Does this PR change client-test-data?
Other information