Skip to content

Commit 33260b9

Browse files
committed
removed POSTGRES_ENDPOINT
1 parent fc976f1 commit 33260b9

File tree

8 files changed

+8
-13
lines changed

8 files changed

+8
-13
lines changed

.env-devel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ PAYMENTS_USERNAME=admin
193193
PAYMENTS_TRACING={}
194194

195195
POSTGRES_DB=simcoredb
196-
POSTGRES_ENDPOINT=postgres:5432
197196
POSTGRES_HOST=postgres
198197
POSTGRES_PASSWORD=adminadmin
199198
POSTGRES_PORT=5432

packages/pytest-simcore/src/pytest_simcore/postgres_service.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ def postgres_env_vars_dict(postgres_dsn: PostgresTestConfig) -> EnvVarsDict:
250250
"POSTGRES_DB": postgres_dsn["database"],
251251
"POSTGRES_HOST": postgres_dsn["host"],
252252
"POSTGRES_PORT": f"{postgres_dsn['port']}",
253-
"POSTGRES_ENDPOINT": f"{postgres_dsn['host']}:{postgres_dsn['port']}",
254253
}
255254

256255

scripts/maintenance/computational-clusters/autoscaled_monitor/db.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ async def db_engine(
1818
state: AppState,
1919
) -> AsyncGenerator[AsyncEngine, Any]:
2020
async with contextlib.AsyncExitStack() as stack:
21-
assert state.environment["POSTGRES_ENDPOINT"] # nosec
22-
db_endpoint = state.environment["POSTGRES_ENDPOINT"]
21+
assert state.environment["POSTGRES_HOST"] # nosec
22+
assert state.environment["POSTGRES_PORT"] # nosec
23+
db_endpoint = (
24+
f"{state.environment['POSTGRES_HOST']}:{state.environment['POSTGRES_PORT']}"
25+
)
2326
if state.main_bastion_host:
2427
assert state.ssh_key_path # nosec
2528
db_host, db_port = db_endpoint.split(":")

services/director-v2/.env-devel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ DIRECTOR_V2_GENERIC_RESOURCE_PLACEMENT_CONSTRAINTS_SUBSTITUTIONS='{}'
2929

3030
LOG_LEVEL=DEBUG
3131

32-
POSTGRES_ENDPOINT=postgres:5432
3332
POSTGRES_USER=test
3433
POSTGRES_PASSWORD=test
3534
POSTGRES_DB=test

services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/docker_service_specs/sidecar.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ def _get_environment_variables(
152152
"DYNAMIC_SIDECAR_LOG_LEVEL": app_settings.DYNAMIC_SERVICES.DYNAMIC_SIDECAR.DYNAMIC_SIDECAR_LOG_LEVEL,
153153
"DY_SIDECAR_LOG_FORMAT_LOCAL_DEV_ENABLED": f"{app_settings.DIRECTOR_V2_LOG_FORMAT_LOCAL_DEV_ENABLED}",
154154
"POSTGRES_DB": f"{app_settings.POSTGRES.POSTGRES_DB}",
155-
"POSTGRES_ENDPOINT": f"{app_settings.POSTGRES.POSTGRES_HOST}:{app_settings.POSTGRES.POSTGRES_PORT}",
156155
"POSTGRES_HOST": f"{app_settings.POSTGRES.POSTGRES_HOST}",
157156
"POSTGRES_PASSWORD": f"{app_settings.POSTGRES.POSTGRES_PASSWORD.get_secret_value()}",
158157
"POSTGRES_PORT": f"{app_settings.POSTGRES.POSTGRES_PORT}",
@@ -458,9 +457,9 @@ async def get_dynamic_sidecar_spec( # pylint:disable=too-many-arguments# noqa:
458457
dynamic_sidecar_settings=dynamic_sidecar_settings, app_settings=app_settings
459458
)
460459

461-
assert scheduler_data.product_name is not None, (
462-
"ONLY for legacy. This function should not be called with product_name==None"
463-
) # nosec
460+
assert (
461+
scheduler_data.product_name is not None
462+
), "ONLY for legacy. This function should not be called with product_name==None" # nosec
464463

465464
standard_simcore_docker_labels: dict[DockerLabelKey, str] = SimcoreContainerLabels(
466465
user_id=scheduler_data.user_id,

services/director-v2/tests/unit/test_modules_dynamic_sidecar_docker_service_specs_sidecar.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"DYNAMIC_SIDECAR_TRACING",
4242
"NODE_PORTS_400_REQUEST_TIMEOUT_ATTEMPTS",
4343
"POSTGRES_DB",
44-
"POSTGRES_ENDPOINT",
4544
"POSTGRES_HOST",
4645
"POSTGRES_PASSWORD",
4746
"POSTGRES_PORT",

services/director-v2/tests/unit/with_dbs/test_modules_dynamic_sidecar_docker_service_specs.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def mock_env(
7171
"DYNAMIC_SIDECAR_IMAGE": "local/dynamic-sidecar:MOCK",
7272
"LOG_LEVEL": "DEBUG",
7373
"POSTGRES_DB": "test",
74-
"POSTGRES_ENDPOINT": "localhost:5432",
7574
"POSTGRES_HOST": "localhost",
7675
"POSTGRES_PASSWORD": "test",
7776
"POSTGRES_PORT": "5432",
@@ -275,7 +274,6 @@ def expected_dynamic_sidecar_spec(
275274
"POSTGRES_PORT": "5432",
276275
"POSTGRES_USER": "test",
277276
"POSTGRES_PASSWORD": "test",
278-
"POSTGRES_ENDPOINT": "localhost:5432",
279277
"RABBIT_HOST": "rabbit",
280278
"RABBIT_PASSWORD": "adminadmin",
281279
"RABBIT_PORT": "5672",

services/web/server/tests/data/default_app_config-integration.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ db:
2424
enabled: true
2525
postgres:
2626
database: ${POSTGRES_DB}
27-
endpoint: ${POSTGRES_ENDPOINT}
2827
host: ${POSTGRES_HOST}
2928
maxsize: 50
3029
minsize: 2

0 commit comments

Comments
 (0)