Skip to content

Commit cae0146

Browse files
authored
final issues in deployment (#1965)
* fix director-v2 startup in deployments * convert FAILURE enum field to FAILED
1 parent ae0ae87 commit cae0146

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

packages/models-library/src/models_library/project_nodes.py

+7
Original file line numberDiff line numberDiff line change
@@ -187,5 +187,12 @@ def convert_empty_str_to_none(v):
187187
return None
188188
return v
189189

190+
@validator("state", pre=True)
191+
@classmethod
192+
def convert_old_enum_name(v):
193+
if v == "FAILURE":
194+
return RunningState.FAILED
195+
return v
196+
190197
class Config:
191198
extra = Extra.forbid

services/director-v2/src/simcore_service_director_v2/core/events.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818

1919
def on_startup() -> None:
20-
print(WELCOME_MSG)
20+
print(WELCOME_MSG, flush=True)
2121

2222

2323
def on_shutdown() -> None:
2424
msg = project_name + f" v{__version__} SHUT DOWN"
25-
print(f"{msg:=^100}")
25+
print(f"{msg:=^100}", flush=True)

services/director-v2/src/simcore_service_director_v2/core/settings.py

+14-6
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,21 @@ def loglevel(self) -> int:
156156
storage_endpoint: str = Field("storage:8080", env="STORAGE_ENDPOINT")
157157

158158
# caching registry and TTL (time-to-live)
159-
registry_caching: bool = True
160-
registry_caching_ttl: int = 15 * MINS
159+
# TODO: fix these variables once the director-v2 is able to start dynamic services
160+
registry_caching: bool = Field(True, env="DIRECTOR_V2_REGISTRY_CACHING")
161+
registry_caching_ttl: int = Field(15 * MINS, env="DIRECTOR_V2_REGISTRY_CACHING_TTL")
161162

162163
# for passing self-signed certificate to spawned services
163-
self_signed_ssl_secret_id: str = ""
164-
self_signed_ssl_secret_name: str = ""
165-
self_signed_ssl_filename: str = ""
164+
# TODO: fix these variables once the director-v2 is able to start dynamic services
165+
self_signed_ssl_secret_id: str = Field(
166+
"", env="DIRECTOR_V2_SELF_SIGNED_SSL_SECRET_ID"
167+
)
168+
self_signed_ssl_secret_name: str = Field(
169+
"", env="DIRECTOR_V2_SELF_SIGNED_SSL_SECRET_NAME"
170+
)
171+
self_signed_ssl_filename: str = Field(
172+
"", env="DIRECTOR_V2_SELF_SIGNED_SSL_FILENAME"
173+
)
166174

167175
# extras
168176
extra_hosts_suffix: str = Field("undefined", env="EXTRA_HOSTS_SUFFIX")
@@ -204,4 +212,4 @@ def loglevel(self) -> int:
204212
remote_debug_port: PortInt = 3000
205213

206214
class Config(CommonConfig):
207-
env_prefix = "DIRECTOR_V2_"
215+
env_prefix = ""

0 commit comments

Comments
 (0)