-
Notifications
You must be signed in to change notification settings - Fork 27
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
✨ web-api: ProjectGet
model adds new permalinks
field
#4008
✨ web-api: ProjectGet
model adds new permalinks
field
#4008
Conversation
Kudos, SonarCloud Quality Gate passed!
|
Codecov Report
@@ Coverage Diff @@
## master #4008 +/- ##
========================================
- Coverage 85.5% 80.0% -5.6%
========================================
Files 961 891 -70
Lines 41605 40235 -1370
Branches 953 822 -131
========================================
- Hits 35599 32188 -3411
- Misses 5789 7857 +2068
+ Partials 217 190 -27
Flags with carried forward coverage won't be shown. Click here to find out more.
|
167a34d
to
3acc8db
Compare
permalinks
field
permalinks
field ProjectGet
model adds new permalinks
field
services/web/server/src/simcore_service_webserver/projects/_permalink.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_permalink.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_permalink.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_permalink.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/projects_handlers_crud.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/studies_dispatcher/_projects_permalinks.py
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.
great! a few minor comments.
packages/service-library/src/servicelib/aiohttp/long_running_tasks/_server.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_create_utils.py
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.
great! a few minor comments.
c6575ba
to
724e153
Compare
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.
👍
Code Climate has analyzed commit c86b6da and detected 0 issues on this pull request. View more on Code Climate. |
Kudos, SonarCloud Quality Gate passed!
|
ProjectGet
model adds new permalinks
field ProjectGet
model adds new permalinks
field 🚨
🚨
|
ProjectGet
model adds new permalinks
field 🚨ProjectGet
model adds new permalinks
field
What do these changes do?
Preamble
A permalink is an url like
https://osparc.io/study/{template_project_uuid}
that when used in a browser it will copy the target template and open it as a standard project.NOTE that for an unfortunate design decision (see #1975)
https://osparc.io/#/study/{project_uuid}
( see#
instead of/
) is also defined in the front-end to open (not copy) a study BUT this is not considered in this definition of permalink .NOTE also that there are some conditions for a study to have a permalink, e.g. it has to be a template.
Feature
In this PR
ProjectGet
schema in the API ( used in or as part of responses asGET /projects
orGET /project/{project_id}
) adds a new optional field withpermalink
information:and example of data is
Implementation details
The implementation follows a design that decouples the part that creates the
permalink
(in thestudies_dispatcher
plugin) and the part that assigns the value in theProjectGet
model (in theprojects
plugin): thepermalink
field is computed using an external callback that is implemented in thestudies_dispatcher
plugin (who define permalinks) and is registered in theprojects
plugin (who exposes and defines theproject
resource) upon startup (seesetup_studies_dispatcher
).Highlights
ProjectGet
is optional: If for some reason it cannot be created, then it will not be returned. Some reasons could be:studies_dispatcher
plugin is disabled: therefore even having a permalink no study will be dispatchedPermalinkNotAllowedError
)Failed to create permalink: Can only create permalink from a template project. Got project_uuid='ee592535-99ff-515f-be2a-07c0f92c7a35' with project_type=<ProjectType.STANDARD: 'STANDARD'>
Related issue/s
How to test
GET /project/uuid
should NOT includepermalink
GET /project/uuid
should includepermalink