Skip to content

Commit 7ec3bfd

Browse files
committed
rm envs and api specs
1 parent 91d2745 commit 7ec3bfd

File tree

14 files changed

+54
-175
lines changed

14 files changed

+54
-175
lines changed

.env-devel

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ WEBSERVER_GUNICORN_CMD_ARGS=--timeout=180
380380
WEBSERVER_HOST=webserver
381381
WEBSERVER_LOGIN={}
382382
WEBSERVER_LOGLEVEL=INFO
383-
WEBSERVER_META_MODELING=1
384383
WEBSERVER_NOTIFICATIONS=1
385384
WEBSERVER_PAYMENTS={}
386385
WEBSERVER_PORT=8080
@@ -398,4 +397,3 @@ WEBSERVER_STUDIES_DISPATCHER={}
398397
WEBSERVER_TAGS=1
399398
WEBSERVER_TRACING=null
400399
WEBSERVER_USERS={}
401-
WEBSERVER_VERSION_CONTROL=1

api/specs/web-server/_version_control.py

Lines changed: 0 additions & 89 deletions
This file was deleted.

api/specs/web-server/openapi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
"_statics",
6060
"_storage",
6161
"_trash",
62-
"_version_control",
6362
"_workspaces",
6463
# maintenance ----
6564
"_admin",

services/docker-compose.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -811,13 +811,11 @@ services:
811811
WEBSERVER_NOTIFICATIONS: ${WEBSERVER_NOTIFICATIONS}
812812
WEBSERVER_CLUSTERS: ${WEBSERVER_CLUSTERS}
813813
WEBSERVER_GROUPS: ${WEBSERVER_GROUPS}
814-
WEBSERVER_META_MODELING: ${WEBSERVER_META_MODELING}
815814
WEBSERVER_PRODUCTS: ${WEBSERVER_PRODUCTS}
816815
WEBSERVER_PUBLICATIONS: ${WEBSERVER_PUBLICATIONS}
817816
WEBSERVER_SOCKETIO: ${WEBSERVER_SOCKETIO}
818817
WEBSERVER_TAGS: ${WEBSERVER_TAGS}
819818
WEBSERVER_USERS: ${WEBSERVER_USERS}
820-
WEBSERVER_VERSION_CONTROL: ${WEBSERVER_VERSION_CONTROL}
821819
WEBSERVER_FOLDERS: ${WEBSERVER_FOLDERS}
822820

823821
deploy:
@@ -908,7 +906,6 @@ services:
908906
WEBSERVER_LICENSES: null
909907
WEBSERVER_LOGIN: ${WB_DB_EL_LOGIN}
910908
WEBSERVER_PAYMENTS: ${WB_DB_EL_PAYMENTS}
911-
WEBSERVER_META_MODELING: ${WB_DB_EL_META_MODELING}
912909
WEBSERVER_NOTIFICATIONS: ${WB_DB_EL_NOTIFICATIONS}
913910
WEBSERVER_PRODUCTS: ${WB_DB_EL_PRODUCTS}
914911
WEBSERVER_PROJECTS: ${WB_DB_EL_PROJECTS}
@@ -921,7 +918,6 @@ services:
921918
WEBSERVER_TAGS: ${WB_DB_EL_TAGS}
922919
WEBSERVER_TRACING: ${WB_DB_EL_TRACING}
923920
WEBSERVER_USERS: ${WB_DB_EL_USERS}
924-
WEBSERVER_VERSION_CONTROL: ${WB_DB_EL_VERSION_CONTROL}
925921
WEBSERVER_WALLETS: ${WB_DB_EL_WALLETS}
926922

927923
# WEBSERVER_RABBITMQ
@@ -1011,7 +1007,6 @@ services:
10111007
WEBSERVER_INVITATIONS: ${WB_GC_INVITATIONS}
10121008
WEBSERVER_LICENSES: null
10131009
WEBSERVER_LOGIN: ${WB_GC_LOGIN}
1014-
WEBSERVER_META_MODELING: ${WB_GC_META_MODELING}
10151010
WEBSERVER_NOTIFICATIONS: ${WB_GC_NOTIFICATIONS}
10161011
WEBSERVER_PAYMENTS: ${WB_GC_PAYMENTS}
10171012
WEBSERVER_PRODUCTS: ${WB_GC_PRODUCTS}
@@ -1024,7 +1019,6 @@ services:
10241019
WEBSERVER_TAGS: ${WB_GC_TAGS}
10251020
WEBSERVER_TRACING: ${WB_GC_TRACING}
10261021
WEBSERVER_USERS: ${WB_GC_USERS}
1027-
WEBSERVER_VERSION_CONTROL: ${WB_GC_VERSION_CONTROL}
10281022
WEBSERVER_WALLETS: ${WB_GC_WALLETS}
10291023

10301024
# WEBSERVER_RABBITMQ

services/web/server/src/simcore_service_webserver/application_settings.py

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44

55
from aiohttp import web
66
from common_library.basic_types import DEFAULT_FACTORY
7-
from common_library.pydantic_fields_extension import is_nullable
87
from models_library.basic_types import LogLevel, PortInt, VersionTag
98
from models_library.utils.change_case import snake_to_camel
109
from pydantic import (
1110
AliasChoices,
1211
AnyHttpUrl,
1312
TypeAdapter,
14-
ValidationInfo,
1513
field_validator,
1614
model_validator,
1715
)
@@ -358,15 +356,13 @@ class ApplicationSettings(BaseApplicationSettings, MixinLoggingSettings):
358356
WEBSERVER_DB_LISTENER: bool = True
359357
WEBSERVER_FOLDERS: bool = True
360358
WEBSERVER_GROUPS: bool = True
361-
WEBSERVER_META_MODELING: bool = False
362359
WEBSERVER_NOTIFICATIONS: bool = True
363360
WEBSERVER_PRODUCTS: bool = True
364361
WEBSERVER_PROFILING: bool = False
365362
WEBSERVER_PUBLICATIONS: bool = True
366363
WEBSERVER_REMOTE_DEBUG: bool = True
367364
WEBSERVER_SOCKETIO: bool = True
368365
WEBSERVER_TAGS: bool = True
369-
WEBSERVER_VERSION_CONTROL: bool = False
370366
WEBSERVER_WALLETS: bool = True
371367
WEBSERVER_WORKSPACES: bool = True
372368

@@ -397,31 +393,31 @@ def _build_vcs_release_url_if_unset(cls, values):
397393

398394
return values
399395

400-
@field_validator(
401-
# List of plugins under-development (keep up-to-date)
402-
# TODO: consider mark as dev-feature in field extras of Config attr.
403-
# Then they can be automtically advertised
404-
"WEBSERVER_META_MODELING",
405-
"WEBSERVER_VERSION_CONTROL",
406-
mode="before",
407-
)
408-
@classmethod
409-
def _enable_only_if_dev_features_allowed(cls, v, info: ValidationInfo):
410-
"""Ensures that plugins 'under development' get programatically
411-
disabled if WEBSERVER_DEV_FEATURES_ENABLED=False
412-
"""
413-
if info.data["WEBSERVER_DEV_FEATURES_ENABLED"]:
414-
return v
415-
if v:
416-
_logger.warning(
417-
"%s still under development and will be disabled.", info.field_name
418-
)
419-
420-
return (
421-
None
422-
if info.field_name and is_nullable(dict(cls.model_fields)[info.field_name])
423-
else False
424-
)
396+
# @field_validator(
397+
# # List of plugins under-development (keep up-to-date)
398+
# # TODO: consider mark as dev-feature in field extras of Config attr.
399+
# # Then they can be automtically advertised
400+
# "WEBSERVER_META_MODELING",
401+
# "WEBSERVER_VERSION_CONTROL",
402+
# mode="before",
403+
# )
404+
# @classmethod
405+
# def _enable_only_if_dev_features_allowed(cls, v, info: ValidationInfo):
406+
# """Ensures that plugins 'under development' get programatically
407+
# disabled if WEBSERVER_DEV_FEATURES_ENABLED=False
408+
# """
409+
# if info.data["WEBSERVER_DEV_FEATURES_ENABLED"]:
410+
# return v
411+
# if v:
412+
# _logger.warning(
413+
# "%s still under development and will be disabled.", info.field_name
414+
# )
415+
416+
# return (
417+
# None
418+
# if info.field_name and is_nullable(dict(cls.model_fields)[info.field_name])
419+
# else False
420+
# )
425421

426422
@field_validator("WEBSERVER_LOGLEVEL")
427423
@classmethod
@@ -461,12 +457,14 @@ def _get_disabled_public_plugins(self) -> list[str]:
461457
"WEBSERVER_EXPORTER",
462458
"WEBSERVER_FOLDERS",
463459
"WEBSERVER_LICENSES",
464-
"WEBSERVER_META_MODELING",
465460
"WEBSERVER_PAYMENTS",
466461
"WEBSERVER_SCICRUNCH",
467-
"WEBSERVER_VERSION_CONTROL",
468462
}
469-
return [_ for _ in public_plugin_candidates if not self.is_enabled(_)]
463+
return [_ for _ in public_plugin_candidates if not self.is_enabled(_)] + [
464+
# Permanently disabled
465+
"WEBSERVER_META_MODELING",
466+
"WEBSERVER_VERSION_CONTROL",
467+
]
470468

471469
def _export_by_alias(self, **kwargs) -> dict[str, Any]:
472470
# This is a small helper to assist export functions since aliases are no longer used by

services/web/server/src/simcore_service_webserver/application_settings_utils.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ def convert_to_app_config(app_settings: ApplicationSettings) -> AppConfigDict:
164164
"director-v2": {"enabled": app_settings.is_enabled("WEBSERVER_DIRECTOR_V2")},
165165
"exporter": {"enabled": app_settings.WEBSERVER_EXPORTER is not None},
166166
"groups": {"enabled": app_settings.WEBSERVER_GROUPS},
167-
"meta_modeling": {"enabled": app_settings.WEBSERVER_META_MODELING},
168167
"products": {"enabled": app_settings.WEBSERVER_PRODUCTS},
169168
"publications": {"enabled": app_settings.WEBSERVER_PUBLICATIONS},
170169
"remote_debug": {"enabled": app_settings.WEBSERVER_REMOTE_DEBUG},
@@ -180,7 +179,6 @@ def convert_to_app_config(app_settings: ApplicationSettings) -> AppConfigDict:
180179
},
181180
"tags": {"enabled": app_settings.WEBSERVER_TAGS},
182181
"users": {"enabled": app_settings.WEBSERVER_USERS is not None},
183-
"version_control": {"enabled": app_settings.WEBSERVER_VERSION_CONTROL},
184182
"wallets": {"enabled": app_settings.WEBSERVER_WALLETS},
185183
"folders": {"enabled": app_settings.WEBSERVER_FOLDERS},
186184
"workspaces": {"enabled": app_settings.WEBSERVER_WORKSPACES},
@@ -313,7 +311,6 @@ def _set_if_disabled(field_name, section):
313311
for settings_name in (
314312
"WEBSERVER_GARBAGE_COLLECTOR",
315313
"WEBSERVER_GROUPS",
316-
"WEBSERVER_META_MODELING",
317314
"WEBSERVER_PRODUCTS",
318315
"WEBSERVER_PROJECTS",
319316
"WEBSERVER_PUBLICATIONS",
@@ -324,7 +321,6 @@ def _set_if_disabled(field_name, section):
324321
"WEBSERVER_STUDIES_DISPATCHER",
325322
"WEBSERVER_TAGS",
326323
"WEBSERVER_USERS",
327-
"WEBSERVER_VERSION_CONTROL",
328324
"WEBSERVER_WALLETS",
329325
"WEBSERVER_FOLDERS",
330326
):

services/web/server/tests/unit/isolated/test_application_settings.py

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ def test_settings_to_client_statics_plugins(
7171
for name in disable_plugins:
7272
monkeypatch.setenv(name, "null")
7373

74-
monkeypatch.setenv("WEBSERVER_VERSION_CONTROL", "0")
75-
disable_plugins.add("WEBSERVER_VERSION_CONTROL")
76-
7774
monkeypatch.setenv("WEBSERVER_FOLDERS", "0")
7875
disable_plugins.add("WEBSERVER_FOLDERS")
7976

@@ -105,30 +102,30 @@ def test_settings_to_client_statics_plugins(
105102
assert set(statics["pluginsDisabled"]) == (disable_plugins)
106103

107104

108-
@pytest.mark.parametrize("is_dev_feature_enabled", [True, False])
109-
@pytest.mark.parametrize(
110-
"plugin_name",
111-
["WEBSERVER_META_MODELING", "WEBSERVER_VERSION_CONTROL"],
112-
# NOTE: this is the list in _enable_only_if_dev_features_allowed
113-
)
114-
def test_disabled_plugins_settings_to_client_statics(
115-
is_dev_feature_enabled: bool,
116-
mock_webserver_service_environment: EnvVarsDict,
117-
monkeypatch: pytest.MonkeyPatch,
118-
plugin_name: str,
119-
):
120-
monkeypatch.setenv(
121-
"WEBSERVER_DEV_FEATURES_ENABLED", f"{is_dev_feature_enabled}".lower()
122-
)
123-
124-
settings = ApplicationSettings.create_from_envs()
125-
statics = settings.to_client_statics()
126-
127-
# checks whether it is shown to the front-end depending on the value of WEBSERVER_DEV_FEATURES_ENABLED
128-
if is_dev_feature_enabled:
129-
assert plugin_name not in set(statics["pluginsDisabled"])
130-
else:
131-
assert plugin_name in set(statics["pluginsDisabled"])
105+
# @pytest.mark.parametrize("is_dev_feature_enabled", [True, False])
106+
# @pytest.mark.parametrize(
107+
# "plugin_name",
108+
# ["WEBSERVER_META_MODELING", "WEBSERVER_VERSION_CONTROL"],
109+
# # NOTE: this is the list in _enable_only_if_dev_features_allowed
110+
# )
111+
# def test_disabled_plugins_settings_to_client_statics(
112+
# is_dev_feature_enabled: bool,
113+
# mock_webserver_service_environment: EnvVarsDict,
114+
# monkeypatch: pytest.MonkeyPatch,
115+
# plugin_name: str,
116+
# ):
117+
# monkeypatch.setenv(
118+
# "WEBSERVER_DEV_FEATURES_ENABLED", f"{is_dev_feature_enabled}".lower()
119+
# )
120+
121+
# settings = ApplicationSettings.create_from_envs()
122+
# statics = settings.to_client_statics()
123+
124+
# # checks whether it is shown to the front-end depending on the value of WEBSERVER_DEV_FEATURES_ENABLED
125+
# if is_dev_feature_enabled:
126+
# assert plugin_name not in set(statics["pluginsDisabled"])
127+
# else:
128+
# assert plugin_name in set(statics["pluginsDisabled"])
132129

133130

134131
@pytest.mark.filterwarnings("error")

services/web/server/tests/unit/isolated/test_studies_dispatcher_projects_permalinks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def app_environment(
4848
"WEBSERVER_GARBAGE_COLLECTOR": "null",
4949
"WEBSERVER_GROUPS": "1",
5050
"WEBSERVER_LOGIN": "null",
51-
"WEBSERVER_META_MODELING": "0",
5251
"WEBSERVER_PAYMENTS": "null",
5352
"WEBSERVER_PRODUCTS": "1",
5453
"WEBSERVER_PUBLICATIONS": "0",
@@ -59,7 +58,6 @@ def app_environment(
5958
"WEBSERVER_SOCKETIO": "0",
6059
"WEBSERVER_TAGS": "1",
6160
"WEBSERVER_TRACING": "null",
62-
"WEBSERVER_VERSION_CONTROL": "0",
6361
"WEBSERVER_WALLETS": "0",
6462
"STUDIES_ACCESS_ANONYMOUS_ALLOWED": "1",
6563
},

services/web/server/tests/unit/with_dbs/03/invitations/conftest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,13 @@ def app_environment(
192192
"WEBSERVER_DIAGNOSTICS": "null",
193193
"WEBSERVER_EXPORTER": "null",
194194
"WEBSERVER_GARBAGE_COLLECTOR": "null",
195-
"WEBSERVER_META_MODELING": "0",
196195
"WEBSERVER_NOTIFICATIONS": "0",
197196
"WEBSERVER_PUBLICATIONS": "0",
198197
"WEBSERVER_REMOTE_DEBUG": "0",
199198
"WEBSERVER_SOCKETIO": "0",
200199
"WEBSERVER_STUDIES_ACCESS_ENABLED": "0",
201200
"WEBSERVER_TAGS": "0",
202201
"WEBSERVER_TRACING": "null",
203-
"WEBSERVER_VERSION_CONTROL": "0",
204202
"WEBSERVER_WALLETS": "0",
205203
# set INVITATIONS_* variables using those in .env-devel
206204
**{

0 commit comments

Comments
 (0)