From abb267880e211da246b577fd1d39a53fb75149cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Fenoy?= Date: Wed, 25 Oct 2023 13:35:38 +0200 Subject: [PATCH 1/3] Fix typo in service.py template Ensure that the namespace get "-" in place of "_" sign to ensure there is no issue with kubernetes at run time. --- {{cookiecutter.service_name}}/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.service_name}}/service.py b/{{cookiecutter.service_name}}/service.py index 2829d63..e05bcff 100644 --- a/{{cookiecutter.service_name}}/service.py +++ b/{{cookiecutter.service_name}}/service.py @@ -95,7 +95,7 @@ def {{cookiecutter.workflow_id |replace("-", "_") }}(conf, inputs, outputs): outputs=outputs, execution_handler=CalrissianRunnerExecutionHandler(conf=conf), ) - runner._namespace_name=f"{conf['lenv']['Identifier']}-{conf['lenv']['usid']}" + runner._namespace_name=f"{conf['lenv']['Identifier'].replace("_","-"}-{conf['lenv']['usid']}" # we are changing the working directory to store the outputs # in a directory dedicated to this execution From bad297f85b354985615860de6f504c8ac73cb3b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Fenoy?= Date: Thu, 26 Oct 2023 15:31:48 +0200 Subject: [PATCH 2/3] Add missing closing parenthesis --- {{cookiecutter.service_name}}/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.service_name}}/service.py b/{{cookiecutter.service_name}}/service.py index e05bcff..8996f11 100644 --- a/{{cookiecutter.service_name}}/service.py +++ b/{{cookiecutter.service_name}}/service.py @@ -95,7 +95,7 @@ def {{cookiecutter.workflow_id |replace("-", "_") }}(conf, inputs, outputs): outputs=outputs, execution_handler=CalrissianRunnerExecutionHandler(conf=conf), ) - runner._namespace_name=f"{conf['lenv']['Identifier'].replace("_","-"}-{conf['lenv']['usid']}" + runner._namespace_name=f"{conf['lenv']['Identifier'].replace("_","-")}-{conf['lenv']['usid']}" # we are changing the working directory to store the outputs # in a directory dedicated to this execution From ebf049cb87522e20a9792b964793f59713244162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Fenoy?= Date: Thu, 26 Oct 2023 15:36:26 +0200 Subject: [PATCH 3/3] Replace "_" by "-" for k8s namespace naming --- {{cookiecutter.service_name}}/service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.service_name}}/service.py b/{{cookiecutter.service_name}}/service.py index 8996f11..39b4602 100644 --- a/{{cookiecutter.service_name}}/service.py +++ b/{{cookiecutter.service_name}}/service.py @@ -95,7 +95,8 @@ def {{cookiecutter.workflow_id |replace("-", "_") }}(conf, inputs, outputs): outputs=outputs, execution_handler=CalrissianRunnerExecutionHandler(conf=conf), ) - runner._namespace_name=f"{conf['lenv']['Identifier'].replace("_","-")}-{conf['lenv']['usid']}" + temporaryNamespace=conf['lenv']['Identifier'].replace("_","-") + runner._namespace_name=f"{temporaryNamespace}-{conf['lenv']['usid']}" # we are changing the working directory to store the outputs # in a directory dedicated to this execution