-
Couldn't load subscription status.
- Fork 32
π¨ Allows guest users to run a project form a template with outputs pushing enabled ποΈ #8555
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
π¨ Allows guest users to run a project form a template with outputs pushing enabled ποΈ #8555
Conversation
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.
Pull Request Overview
This PR introduces functionality to allow guest users to save service states and push data to output ports when running projects from templates that have this option enabled. The implementation adds a new database table to track this optional project setting and propagates it from templates to instances.
Key Changes:
- Added a new
projects_optionalsdatabase table to store per-project optional settings - Implemented logic to check and enable state/output port pushing for guest users when the project allows it
- Ensured template projects propagate their guest permissions to newly created project instances
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/postgres-database/src/simcore_postgres_database/models/projects_optionals.py |
Defines the new projects_optionals table schema with a boolean flag for guest permissions |
packages/postgres-database/src/simcore_postgres_database/migration/versions/a85557c02d71_add_projects_optionals.py |
Database migration to create the projects_optionals table |
packages/postgres-database/src/simcore_postgres_database/utils_projects_optionals.py |
Repository class providing methods to check and set guest permissions for projects |
services/web/server/src/simcore_service_webserver/studies_dispatcher/_studies_access.py |
Copies guest permission settings from template to new project instance |
services/web/server/src/simcore_service_webserver/projects/_projects_service.py |
Enables state saving for guest users when project permissions allow |
services/web/server/src/simcore_service_webserver/garbage_collector/_core_orphans.py |
Enables state saving during service removal for guest users when permitted |
packages/postgres-database/tests/test_utils_projects_optionals.py |
Test coverage for the new repository methods |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
services/web/server/src/simcore_service_webserver/studies_dispatcher/_studies_access.py
Outdated
Show resolved
Hide resolved
Codecov Reportβ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8555 +/- ##
==========================================
+ Coverage 87.29% 89.76% +2.46%
==========================================
Files 2011 1681 -330
Lines 78674 66789 -11885
Branches 1350 568 -782
==========================================
- Hits 68677 59951 -8726
+ Misses 9593 6687 -2906
+ Partials 404 151 -253
Continue to review full report in Codecov by Sentry.
π New features to boost your workflow:
|
β¦e-can-save-templates
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 sure I understand why states have to be uploaded here. outputs ok, but why the states?
Please change the db table name to something more precise. thanks!
packages/postgres-database/src/simcore_postgres_database/models/projects_optionals.py
Outdated
Show resolved
Hide resolved
packages/postgres-database/src/simcore_postgres_database/utils_projects_extensions.py
Outdated
Show resolved
Hide resolved
packages/postgres-database/src/simcore_postgres_database/utils_projects_optionals.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.
thanks!
β¦e-can-save-templates
services/web/server/src/simcore_service_webserver/garbage_collector/_core_orphans.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.
Thanks, please add ποΈ icon in the title and description.
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.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/postgres-database/src/simcore_postgres_database/models/projects_extentions.py
Outdated
Show resolved
Hide resolved
...ase/src/simcore_postgres_database/migration/versions/a85557c02d71_add_projects_extentions.py
Outdated
Show resolved
Hide resolved
packages/postgres-database/src/simcore_postgres_database/utils_projects_extentions.py
Outdated
Show resolved
Hide resolved
packages/postgres-database/src/simcore_postgres_database/utils_projects_extentions.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_projects_service.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.
Thanks for the updates! Iβve left a few suggestions β in particular, I recommend moving the code to the project's repository api module instead of in the postres database (as we used to do) to simplify future refactoring. Iβve also added some other minor comments.
To help speed up the merge, Iβm approving the PR, but please review and consider applying the suggested changes.
packages/postgres-database/src/simcore_postgres_database/utils_projects_extensions.py
Outdated
Show resolved
Hide resolved
packages/postgres-database/src/simcore_postgres_database/utils_projects_extensions.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/studies_dispatcher/_studies_access.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_projects_service.py
Show resolved
Hide resolved
β¦e-can-save-templates
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.
Please fix the naming. and extensions is the same as optionals. it means everything and nothing at the same time.
I will not block this further but I'm not really happy or convinced by this.
packages/postgres-database/src/simcore_postgres_database/models/projects_extentions.py
Outdated
Show resolved
Hide resolved
packages/postgres-database/src/simcore_postgres_database/models/projects_extentions.py
Outdated
Show resolved
Hide resolved
|



What do these changes do?
For a given published project add an entry inside
projects_optionalswithallow_guests_to_push_states_and_output_ports=Trueto allow GUEST users to save the outputs and the states of all new style dynamic services in that project.Related issue/s
How to test
Dev-ops