Skip to content

Conversation

@GitHK
Copy link
Contributor

@GitHK GitHK commented Oct 24, 2025

What do these changes do?

For a given published project add an entry inside projects_optionals with allow_guests_to_push_states_and_output_ports=True to 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

@GitHK GitHK requested a review from Copilot October 24, 2025 16:09
@GitHK GitHK self-assigned this Oct 24, 2025
@GitHK GitHK added this to the Imparable milestone Oct 24, 2025
Copy link
Contributor

Copilot AI left a 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_optionals database 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.

@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.
βœ… Project coverage is 89.76%. Comparing base (05f8837) to head (c84793a).
⚠️ Report is 1 commits behind head on master.

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     
Flag Coverage Ξ”
integrationtests 63.87% <31.25%> (-9.38%) ⬇️
unittests 88.25% <95.23%> (+2.02%) ⬆️
Components Coverage Ξ”
pkg_aws_library βˆ… <ΓΈ> (βˆ…)
pkg_celery_library βˆ… <ΓΈ> (βˆ…)
pkg_dask_task_models_library βˆ… <ΓΈ> (βˆ…)
pkg_models_library 92.90% <ΓΈ> (ΓΈ)
pkg_notifications_library 85.20% <ΓΈ> (ΓΈ)
pkg_postgres_database 87.99% <100.00%> (+0.02%) ⬆️
pkg_service_integration βˆ… <ΓΈ> (βˆ…)
pkg_service_library βˆ… <ΓΈ> (βˆ…)
pkg_settings_library βˆ… <ΓΈ> (βˆ…)
pkg_simcore_sdk 84.95% <ΓΈ> (ΓΈ)
agent 93.10% <ΓΈ> (ΓΈ)
api_server 91.35% <ΓΈ> (ΓΈ)
autoscaling 95.00% <ΓΈ> (ΓΈ)
catalog 92.06% <ΓΈ> (ΓΈ)
clusters_keeper 99.14% <ΓΈ> (ΓΈ)
dask_sidecar 92.38% <ΓΈ> (ΓΈ)
datcore_adapter 97.95% <ΓΈ> (ΓΈ)
director 75.81% <ΓΈ> (+0.08%) ⬆️
director_v2 90.88% <ΓΈ> (+0.04%) ⬆️
dynamic_scheduler 96.66% <ΓΈ> (ΓΈ)
dynamic_sidecar 90.44% <ΓΈ> (ΓΈ)
efs_guardian 89.83% <ΓΈ> (ΓΈ)
invitations 90.90% <ΓΈ> (ΓΈ)
payments 92.80% <ΓΈ> (ΓΈ)
resource_usage_tracker 92.11% <ΓΈ> (-0.11%) ⬇️
storage 86.92% <ΓΈ> (+0.08%) ⬆️
webclient βˆ… <ΓΈ> (βˆ…)
webserver 87.04% <93.75%> (+0.71%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update 05f8837...c84793a. Read the comment docs.

πŸš€ New features to boost your workflow:
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GitHK GitHK requested a review from Copilot October 24, 2025 16:12
Copy link
Contributor

Copilot AI left a 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.

@GitHK GitHK marked this pull request as ready for review October 24, 2025 16:13
@mergify
Copy link
Contributor

mergify bot commented Oct 24, 2025

πŸ§ͺ CI Insights

Here's what we observed from your CI run for c84793a.

βœ… Passed Jobs With Interesting Signals

Pipeline Job Signal Health on master Retries πŸ” CI Insights πŸ“„ Logs
CI integration-tests Base branch is broken, but the job passed. Looks like this might be a real fix πŸ’ͺ Broken 0 View View

Copy link
Member

@sanderegg sanderegg left a 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!

Copy link
Member

@odeimaiz odeimaiz left a comment

Choose a reason for hiding this comment

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

thanks!

@GitHK GitHK requested a review from sanderegg October 27, 2025 08:23
Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a 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.

@pcrespov pcrespov requested a review from Copilot October 27, 2025 08:59
Copy link
Contributor

Copilot AI left a 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.

Copy link
Member

@pcrespov pcrespov left a 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.

Copy link
Member

@sanderegg sanderegg left a 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.

@sonarqubecloud
Copy link

@GitHK GitHK enabled auto-merge (squash) October 27, 2025 12:15
@GitHK GitHK merged commit cb80f55 into ITISFoundation:master Oct 27, 2025
92 of 95 checks passed
@GitHK GitHK deleted the pr-osparc-overwite-can-save-templates branch October 27, 2025 12:19
@matusdrobuliak66 matusdrobuliak66 changed the title 🎨 Allows guest users to run a project form a template with outputs pushing enabled 🎨 Allows guest users to run a project form a template with outputs pushing enabled πŸ—ƒοΈ Oct 28, 2025
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.

6 participants