Skip to content

Commit ff5ffe4

Browse files
⚰️ Remove Web Server publications ⚠️ (#8976)
1 parent fc99eb0 commit ff5ffe4

File tree

22 files changed

+12
-508
lines changed

22 files changed

+12
-508
lines changed

.env-devel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ WEBSERVER_PROFILING=1
416416
WEBSERVER_PROJECTS={}
417417
WEBSERVER_PROMETHEUS_API_VERSION=v1
418418
WEBSERVER_PROMETHEUS_URL=http://prometheus:9090
419-
WEBSERVER_PUBLICATIONS=1
420419
WEBSERVER_REALTIME_COLLABORATION='{"RTC_MAX_NUMBER_OF_USERS":3}'
421420
WEBSERVER_SCICRUNCH={}
422421
WEBSERVER_SESSION_SECRET_KEY='REPLACE_ME_with_result__Fernet_generate_key='

api/specs/web-server/_publications.py

Lines changed: 0 additions & 24 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
@@ -58,7 +58,6 @@
5858
"_projects_tags",
5959
"_projects_wallet",
6060
"_projects_workspaces",
61-
"_publications",
6261
"_resource_usage",
6362
"_statics",
6463
"_storage",

services/docker-compose.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,6 @@ services:
10571057
WEBSERVER_FUNCTIONS: ${WEBSERVER_FUNCTIONS} # needed for front-end
10581058
WEBSERVER_GROUPS: ${WEBSERVER_GROUPS}
10591059
WEBSERVER_PRODUCTS: ${WEBSERVER_PRODUCTS}
1060-
WEBSERVER_PUBLICATIONS: ${WEBSERVER_PUBLICATIONS}
10611060
WEBSERVER_SOCKETIO: ${WEBSERVER_SOCKETIO}
10621061
WEBSERVER_TAGS: ${WEBSERVER_TAGS}
10631062
WEBSERVER_USERS: ${WEBSERVER_USERS}
@@ -1179,7 +1178,6 @@ services:
11791178
WEBSERVER_PORT: ${WEBSERVER_PORT}
11801179
WEBSERVER_PRODUCTS: ${WB_GC_PRODUCTS}
11811180
WEBSERVER_PROJECTS: ${WB_GC_PROJECTS}
1182-
WEBSERVER_PUBLICATIONS: ${WB_GC_PUBLICATIONS}
11831181
WEBSERVER_RPC_NAMESPACE: webserver
11841182
WEBSERVER_SCICRUNCH: ${WB_GC_SCICRUNCH}
11851183
WEBSERVER_SOCKETIO: ${WB_GC_SOCKETIO}
@@ -1274,7 +1272,6 @@ services:
12741272
WEBSERVER_PRODUCTS: 1
12751273
WEBSERVER_PROFILING: ${WB_AUTH_PROFILING}
12761274
WEBSERVER_PROJECTS: "null"
1277-
WEBSERVER_PUBLICATIONS: 0
12781275
WEBSERVER_RABBITMQ: "null"
12791276
WEBSERVER_REALTIME_COLLABORATION: "null"
12801277
WEBSERVER_REDIS: "null"
@@ -1346,7 +1343,6 @@ services:
13461343
WEBSERVER_NOTIFICATIONS: ${WB_DB_EL_NOTIFICATIONS}
13471344
WEBSERVER_PRODUCTS: ${WB_DB_EL_PRODUCTS}
13481345
WEBSERVER_PROJECTS: ${WB_DB_EL_PROJECTS}
1349-
WEBSERVER_PUBLICATIONS: ${WB_DB_EL_PUBLICATIONS}
13501346
WEBSERVER_SCICRUNCH: ${WB_DB_EL_SCICRUNCH}
13511347
WEBSERVER_SOCKETIO: ${WB_DB_EL_SOCKETIO}
13521348
WEBSERVER_STATICWEB: ${WB_DB_EL_STATICWEB}

services/web/server/src/simcore_service_webserver/api/v0/openapi.json

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -10741,31 +10741,6 @@
1074110741
}
1074210742
}
1074310743
},
10744-
"/v0/publications/service-submission": {
10745-
"post": {
10746-
"tags": [
10747-
"publication"
10748-
],
10749-
"summary": "Service Submission",
10750-
"description": "Submits files with new service candidate",
10751-
"operationId": "service_submission",
10752-
"requestBody": {
10753-
"content": {
10754-
"multipart/form-data": {
10755-
"schema": {
10756-
"$ref": "#/components/schemas/Body_service_submission"
10757-
}
10758-
}
10759-
},
10760-
"required": true
10761-
},
10762-
"responses": {
10763-
"204": {
10764-
"description": "Successful Response"
10765-
}
10766-
}
10767-
}
10768-
},
1076910744
"/v0/services/-/resource-usages": {
1077010745
"get": {
1077110746
"tags": [
@@ -14442,21 +14417,6 @@
1444214417
],
1444314418
"title": "Author"
1444414419
},
14445-
"Body_service_submission": {
14446-
"properties": {
14447-
"file": {
14448-
"type": "string",
14449-
"format": "binary",
14450-
"title": "File",
14451-
"description": "metadata.json submission file"
14452-
}
14453-
},
14454-
"type": "object",
14455-
"required": [
14456-
"file"
14457-
],
14458-
"title": "Body_service_submission"
14459-
},
1446014420
"BootChoice": {
1446114421
"properties": {
1446214422
"label": {
@@ -28494,8 +28454,7 @@
2849428454
"change_email_email.jinja2",
2849528455
"new_2fa_code.jinja2",
2849628456
"registration_email.jinja2",
28497-
"reset_password_email.jinja2",
28498-
"service_submission.jinja2"
28457+
"reset_password_email.jinja2"
2849928458
],
2850028459
"title": "Template Name",
2850128460
"default": "registration_email.jinja2"

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
from .payments.plugin import setup_payments
5050
from .products.plugin import setup_products
5151
from .projects.plugin import setup_projects
52-
from .publications.plugin import setup_publications
5352
from .rabbitmq import setup_rabbitmq
5453
from .redis import setup_redis
5554
from .resource_manager.plugin import setup_resource_manager
@@ -101,7 +100,7 @@ async def _finished_banner(app: web.Application):
101100
return _finished_banner
102101

103102

104-
def create_application(tracing_config: TracingConfig) -> web.Application:
103+
def create_application(tracing_config: TracingConfig) -> web.Application: # noqa: PLR0915
105104
"""
106105
Initializes service
107106
"""
@@ -187,7 +186,6 @@ def create_application(tracing_config: TracingConfig) -> web.Application:
187186
setup_tags(app)
188187

189188
setup_announcements(app)
190-
setup_publications(app)
191189
setup_studies_dispatcher(app)
192190
setup_exporter(app)
193191
setup_realtime_collaboration(app)

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ class ApplicationSettings(BaseApplicationSettings, MixinLoggingSettings):
419419
WEBSERVER_NOTIFICATIONS: bool = True
420420
WEBSERVER_PRODUCTS: bool = True
421421
WEBSERVER_PROFILING: bool = False
422-
WEBSERVER_PUBLICATIONS: bool = True
423422
WEBSERVER_REMOTE_DEBUG: bool = True
424423
WEBSERVER_SOCKETIO: bool = True
425424
WEBSERVER_TAGS: bool = True

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import functools
99
import logging
10-
from typing import Any, TypeAlias
10+
from typing import Any
1111

1212
from aiohttp import web
1313
from common_library.pydantic_fields_extension import get_type, is_nullable
@@ -19,7 +19,7 @@
1919

2020
_logger = logging.getLogger(__name__)
2121

22-
AppConfigDict: TypeAlias = dict[str, Any]
22+
type AppConfigDict = dict[str, Any]
2323

2424

2525
def convert_to_app_config(app_settings: ApplicationSettings) -> AppConfigDict:
@@ -31,7 +31,7 @@ def convert_to_app_config(app_settings: ApplicationSettings) -> AppConfigDict:
3131
"host": app_settings.WEBSERVER_SERVER_HOST,
3232
"port": app_settings.WEBSERVER_PORT,
3333
"log_level": f"{app_settings.WEBSERVER_LOGLEVEL}",
34-
"testing": False, # TODO: deprecate!
34+
"testing": False, # deprecate!
3535
"studies_access_enabled": (
3636
int(app_settings.WEBSERVER_STUDIES_DISPATCHER.STUDIES_ACCESS_ANONYMOUS_ALLOWED)
3737
if app_settings.WEBSERVER_STUDIES_DISPATCHER
@@ -45,7 +45,10 @@ def convert_to_app_config(app_settings: ApplicationSettings) -> AppConfigDict:
4545
"db": {
4646
"postgres": {
4747
"database": getattr(app_settings.WEBSERVER_DB, "POSTGRES_DB", None),
48-
"endpoint": f"{getattr(app_settings.WEBSERVER_DB, 'POSTGRES_HOST', None)}:{getattr(app_settings.WEBSERVER_DB, 'POSTGRES_PORT', None)}",
48+
"endpoint": (
49+
f"{getattr(app_settings.WEBSERVER_DB, 'POSTGRES_HOST', None)}:"
50+
f"{getattr(app_settings.WEBSERVER_DB, 'POSTGRES_PORT', None)}"
51+
),
4952
"host": getattr(app_settings.WEBSERVER_DB, "POSTGRES_HOST", None),
5053
"maxsize": getattr(app_settings.WEBSERVER_DB, "POSTGRES_MAXSIZE", None),
5154
"minsize": getattr(app_settings.WEBSERVER_DB, "POSTGRES_MINSIZE", None),
@@ -144,7 +147,6 @@ def convert_to_app_config(app_settings: ApplicationSettings) -> AppConfigDict:
144147
"exporter": {"enabled": app_settings.WEBSERVER_EXPORTER is not None},
145148
"groups": {"enabled": app_settings.WEBSERVER_GROUPS},
146149
"products": {"enabled": app_settings.WEBSERVER_PRODUCTS},
147-
"publications": {"enabled": app_settings.WEBSERVER_PUBLICATIONS},
148150
"remote_debug": {"enabled": app_settings.WEBSERVER_REMOTE_DEBUG},
149151
"security": {"enabled": True},
150152
"scicrunch": {"enabled": app_settings.WEBSERVER_SCICRUNCH is not None},
@@ -179,7 +181,7 @@ def _set_if_disabled(field_name, section):
179181
field = dict(ApplicationSettings.model_fields)[field_name]
180182
if not enabled:
181183
envs[field_name] = "null" if is_nullable(field) else "0"
182-
elif get_type(field) == bool:
184+
elif get_type(field) is bool:
183185
envs[field_name] = "1"
184186

185187
if main := cfg.get("main"):
@@ -281,7 +283,6 @@ def _set_if_disabled(field_name, section):
281283
"WEBSERVER_GROUPS",
282284
"WEBSERVER_PRODUCTS",
283285
"WEBSERVER_PROJECTS",
284-
"WEBSERVER_PUBLICATIONS",
285286
"WEBSERVER_REMOTE_DEBUG",
286287
"WEBSERVER_REST",
287288
"WEBSERVER_SOCKETIO",

services/web/server/src/simcore_service_webserver/email/_handlers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class TestEmail(BaseModel):
2727
"new_2fa_code.jinja2",
2828
"registration_email.jinja2",
2929
"reset_password_email.jinja2",
30-
"service_submission.jinja2",
3130
] = "registration_email.jinja2"
3231
template_context: dict[str, Any] = {}
3332

services/web/server/src/simcore_service_webserver/publications/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)