Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Jul 16, 2025

What do these changes do?

Introduced new WEBSERVER_REALTIME_COLLABORATION in application's settings and corresponding setup function. NOTE: This field is marked as dev-feature, i.e. will be implicitly disabled if WEBSERVER_DEV_FEATURES_ENABLED=0.

Some details

{
  "WEBSERVER_REALTIME_COLLABORATION": {
    "anyOf": [
      {
        "properties": {
          "RTC_MAX_NUMBER_OF_USERS": {
            "description": "Maximum number of users allowed in a real-time collaboration session",
            "exclusiveMinimum": 0,
            "title": "Rtc Max Number Of Users",
            "type": "integer"
          }
        },
        "required": [
          "RTC_MAX_NUMBER_OF_USERS"
        ],
        "title": "RealTimeCollaborationSettings",
        "type": "object"
      },
      {
        "type": "null"
      }
    ],
    "auto_default_from_env": true,
    "description": "Enables real-time collaboration features",
    "x-dev-feature": true
  }
}

Related issue/s

How to test

@odeimaiz this is how you can determine .isSimultaneousAccessEnabled() using the response from statics

Here envfile examples

1. enabled and limited to 3 users

WEBSERVER_DEV_FEATURES_ENABLED=1
WEBSERVER_REALTIME_COLLABORATION='{"RTC_MAX_NUMBER_OF_USERS":3}'
image

2. implicitly disabled (dev-feature)

WEBSERVER_DEV_FEATURES_ENABLED=0
WEBSERVER_REALTIME_COLLABORATION='{"RTC_MAX_NUMBER_OF_USERS":3}'
image

3. Explicitly disabled

WEBSERVER_REALTIME_COLLABORATION=null

Dev-ops

@codecov
Copy link

codecov bot commented Jul 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.20%. Comparing base (fc18d82) to head (0a7434e).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8120      +/-   ##
==========================================
- Coverage   88.22%   88.20%   -0.02%     
==========================================
  Files        1881     1883       +2     
  Lines       72386    72411      +25     
  Branches     1272     1272              
==========================================
+ Hits        63859    63873      +14     
- Misses       8153     8163      +10     
- Partials      374      375       +1     
Flag Coverage Δ
integrationtests 64.32% <72.00%> (+0.08%) ⬆️
unittests 86.82% <100.00%> (-0.01%) ⬇️
Components Coverage Δ
pkg_aws_library 93.93% <ø> (ø)
pkg_celery_library 87.34% <ø> (ø)
pkg_dask_task_models_library 79.62% <ø> (ø)
pkg_models_library 93.26% <ø> (ø)
pkg_notifications_library 85.26% <ø> (ø)
pkg_postgres_database 88.22% <ø> (ø)
pkg_service_integration 70.17% <ø> (ø)
pkg_service_library 71.75% <ø> (-0.05%) ⬇️
pkg_settings_library 90.45% <ø> (ø)
pkg_simcore_sdk 85.10% <ø> (ø)
agent 93.81% <ø> (ø)
api_server 92.85% <ø> (ø)
autoscaling 95.88% <ø> (ø)
catalog 92.34% <ø> (ø)
clusters_keeper 99.13% <ø> (ø)
dask_sidecar 92.37% <ø> (ø)
datcore_adapter 97.94% <ø> (ø)
director 76.23% <ø> (+0.09%) ⬆️
director_v2 90.93% <ø> (-0.18%) ⬇️
dynamic_scheduler 96.27% <ø> (ø)
dynamic_sidecar 90.05% <ø> (ø)
efs_guardian 89.76% <ø> (ø)
invitations 91.44% <ø> (ø)
payments 92.60% <ø> (ø)
resource_usage_tracker 92.50% <ø> (ø)
storage 86.48% <ø> (+0.04%) ⬆️
webclient ∅ <ø> (∅)
webserver 88.53% <100.00%> (+0.02%) ⬆️

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 fc18d82...0a7434e. 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.

@pcrespov pcrespov self-assigned this Jul 16, 2025
@pcrespov pcrespov added the a:webserver webserver's codebase. Assigning the area is particularly useful for bugs label Jul 16, 2025
@pcrespov pcrespov added this to the Engage milestone Jul 16, 2025
@pcrespov pcrespov changed the title WIP: 🎨 Is1958/simultaneou access dev feature 🎨 Adds realtime domain in web-server and WEBSERVER_REALTIME_COLLABORATION Dev Feature Toggle to Settings Jul 16, 2025
@pcrespov pcrespov marked this pull request as ready for review July 16, 2025 15:06
@pcrespov pcrespov requested a review from odeimaiz July 16, 2025 15:06
@pcrespov pcrespov enabled auto-merge (squash) July 16, 2025 15:15
@pcrespov pcrespov added the 🤖-automerge marks PR as ready to be merged for Mergify label Jul 16, 2025
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.

So unless there is a follow up PR, RTC can only be enabled if dev_features are also enabled, right? Why not decoupling it?

@pcrespov
Copy link
Member Author

pcrespov commented Jul 16, 2025

So unless there is a follow up PR, RTC can only be enabled if dev_features are also enabled, right? Why not decoupling it?

@odeimaiz Why do you mean decoupling? They are already two different env vars.

The idea is that by having WEBSERVER_DEV_FEATURES_ENABLED=0, we do not accidentally expose that feature.
we can also remove the mark and can explicitly be enabled/disabled

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.

thanks. My only comment would be to call this folder collaboration instead of realtime. as the former is more descriptive than the latter. but that is a minor.

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.

I meant decoupling the WEBSERVER_REALTIME_COLLABORATION from WEBSERVER_DEV_FEATURES_ENABLED...

So there will eventually be another PR 👍

@pcrespov pcrespov force-pushed the is1958/simultaneou-access-dev-feature branch from b07ca03 to 0a7434e Compare July 17, 2025 08:36
@sonarqubecloud
Copy link

Copy link
Member

@mrnicegyu11 mrnicegyu11 left a comment

Choose a reason for hiding this comment

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

super thx that works

@pcrespov pcrespov merged commit 35f2749 into ITISFoundation:master Jul 17, 2025
96 checks passed
@pcrespov pcrespov deleted the is1958/simultaneou-access-dev-feature branch July 17, 2025 12:00
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify a:webserver webserver's codebase. Assigning the area is particularly useful for bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Protect Simultaneous Access feature with ENV_VAR

6 participants