Skip to content

Commit

Permalink
♻️ Maintenance: Remove director-v0 client from webserver (#4461)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg authored Jul 6, 2023
1 parent cf1c90c commit bef80bb
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 714 deletions.
1 change: 0 additions & 1 deletion .env-wb-db-event-listener
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ WEBSERVER_NOTIFICATIONS=0
# WEBSERVER_DB_LISTENER=1 explicitly enabled in docker-compose
WEBSERVER_DIAGNOSTICS=null
#WEBSERVER_DIRECTOR_V2 from .env
WEBSERVER_DIRECTOR=null
WEBSERVER_EMAIL=null
WEBSERVER_EXPORTER=null
WEBSERVER_FRONTEND=null
Expand Down
1 change: 0 additions & 1 deletion .env-wb-garbage-collector
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ WEBSERVER_NOTIFICATIONS=0
WEBSERVER_DB_LISTENER=0
WEBSERVER_DIAGNOSTICS=null
#WEBSERVER_DIRECTOR_V2 from .env
WEBSERVER_DIRECTOR=null
WEBSERVER_EMAIL=null
WEBSERVER_EXPORTER=null
WEBSERVER_FRONTEND=null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from .db.plugin import setup_db
from .db_listener.plugin import setup_db_listener
from .diagnostics.plugin import setup_diagnostics
from .director.plugin import setup_director
from .director_v2.plugin import setup_director_v2
from .email.plugin import setup_email
from .exporter.plugin import setup_exporter
Expand Down Expand Up @@ -91,7 +90,6 @@ def create_application() -> web.Application:
setup_login(app)

# interaction with other backend services
setup_director(app)
setup_director_v2(app)
setup_storage(app)
setup_catalog(app)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from ._meta import API_VERSION, API_VTAG, APP_NAME
from .catalog.settings import CatalogSettings
from .diagnostics.settings import DiagnosticsSettings
from .director.settings import DirectorSettings
from .director_v2.settings import DirectorV2Settings
from .exporter.settings import ExporterSettings
from .garbage_collector_settings import GarbageCollectorSettings
Expand Down Expand Up @@ -144,9 +143,6 @@ class ApplicationSettings(BaseCustomSettings, MixinLoggingSettings):
WEBSERVER_DIRECTOR_V2: DirectorV2Settings | None = Field(
auto_default_from_env=True, description="director-v2 service client's plugin"
)
WEBSERVER_DIRECTOR: DirectorSettings | None = Field(
auto_default_from_env=True, description="director service client's plugin"
)
WEBSERVER_EMAIL: SMTPSettings | None = Field(
auto_default_from_env=True, description="email plugin"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ def convert_to_app_config(app_settings: ApplicationSettings) -> dict[str, Any]:
# "zipkin_endpoint": f"{getattr(app_settings.WEBSERVER_TRACING, 'TRACING_ZIPKIN_ENDPOINT', None)}",
},
"socketio": {"enabled": app_settings.WEBSERVER_SOCKETIO},
"director": {
"enabled": app_settings.WEBSERVER_DIRECTOR is not None,
"host": getattr(app_settings.WEBSERVER_DIRECTOR, "DIRECTOR_HOST", None),
"port": getattr(app_settings.WEBSERVER_DIRECTOR, "DIRECTOR_PORT", None),
"version": getattr(app_settings.WEBSERVER_DIRECTOR, "DIRECTOR_VTAG", None),
},
"db": {
"postgres": {
"database": getattr(app_settings.WEBSERVER_DB, "POSTGRES_DB", None),
Expand Down Expand Up @@ -200,12 +194,6 @@ def _set_if_disabled(field_name, section):
_set_if_disabled("WEBSERVER_TRACING", section)
# envs["TRACING_ZIPKIN_ENDPOINT"] = section.get("zipkin_endpoint")

if section := cfg.get("director"):
_set_if_disabled("WEBSERVER_DIRECTOR", section)
envs["DIRECTOR_HOST"] = section.get("host")
envs["DIRECTOR_PORT"] = section.get("port")
envs["DIRECTOR_VTAG"] = section.get("version")

if db := cfg.get("db"):
if section := db.get("postgres"):
envs["POSTGRES_DB"] = section.get("database")
Expand Down
Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit bef80bb

Please sign in to comment.