From 844c9bccc0110e60b2d72422ca3f3ccab38350d5 Mon Sep 17 00:00:00 2001 From: Julius Busecke Date: Mon, 7 Aug 2023 22:52:21 +0200 Subject: [PATCH 1/5] Bump pgf-runner to dictobj branch --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5a4dbb1..d732741 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM quay.io/pangeo/forge:5e51a29 -RUN conda run -n notebook pip install git+https://github.com/pangeo-forge/pangeo-forge-runner@main +RUN conda run -n notebook pip install git+https://github.com/pangeo-forge/pangeo-forge-runner@unique-job-names-for-dictobjs COPY action/deploy_recipe.py /deploy_recipe.py COPY entrypoint.sh /entrypoint.sh From 22758bf607f8b43d9d1ed16bcdcea9eaa351088e Mon Sep 17 00:00:00 2001 From: Julius Busecke Date: Mon, 7 Aug 2023 23:17:36 +0200 Subject: [PATCH 2/5] Update deploy_recipe.py --- action/deploy_recipe.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/action/deploy_recipe.py b/action/deploy_recipe.py index 101e491..29b6292 100644 --- a/action/deploy_recipe.py +++ b/action/deploy_recipe.py @@ -124,24 +124,20 @@ def main(): ] print("\nSubmitting job...") print(f"{recipe_ids = }") + job_name_base = ( + f"{repository_id}-{run_id}-{run_attempt}" + ) if select_recipe_by_label: for rid in recipe_ids: if len(rid) > 44: print(f"Recipe id {rid} is > 44 chars, truncating to 44 chars.") - job_name = ( - f"{rid.lower().replace('_', '-')[:44]}-{repository_id}-{run_id}-{run_attempt}" - ) + job_name = f"{rid.lower().replace('_', '-')[:44]}-{job_name_base}" print(f"Submitting {job_name = }") extra_cmd = [f"--Bake.recipe_id={rid}", f"--Bake.job_name={job_name}"] deploy_recipe_cmd(cmd + extra_cmd) else: - # FIXME: pangeo-forge-runner handles job_name generation if we deploy everything - # currently, there is a pangeo-forge-runne bug that prevents creation of unique - # job_names when everything is deployed. apart from fixing that bug, we'd like the - # ability to provide our own job names, even if we deploy everything. this might mean - # passing a `--Bake.job_name_append` option to pangeo-forge-runner, which is a user- - # defined string to append to the job names. - deploy_recipe_cmd(cmd) + extra_cmd = [f"--Bake.job_name={job_name_base}"] + deploy_recipe_cmd(cmd + extra_cmd) if __name__ == "__main__": From cbfa9e5c88be9c53ed84793edc738b1eeafc218e Mon Sep 17 00:00:00 2001 From: Julius Busecke Date: Mon, 7 Aug 2023 23:21:50 +0200 Subject: [PATCH 3/5] Update deploy_recipe.py --- action/deploy_recipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action/deploy_recipe.py b/action/deploy_recipe.py index 29b6292..ef3414a 100644 --- a/action/deploy_recipe.py +++ b/action/deploy_recipe.py @@ -136,7 +136,7 @@ def main(): extra_cmd = [f"--Bake.recipe_id={rid}", f"--Bake.job_name={job_name}"] deploy_recipe_cmd(cmd + extra_cmd) else: - extra_cmd = [f"--Bake.job_name={job_name_base}"] + extra_cmd = [f"--Bake.job_name=a{job_name_base}"] deploy_recipe_cmd(cmd + extra_cmd) From d7be7f68d65e1dc9e1b5695fffccd3cbf9ee5398 Mon Sep 17 00:00:00 2001 From: Julius Busecke Date: Mon, 7 Aug 2023 23:22:35 +0200 Subject: [PATCH 4/5] Update deploy_recipe.py --- action/deploy_recipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action/deploy_recipe.py b/action/deploy_recipe.py index ef3414a..4163b51 100644 --- a/action/deploy_recipe.py +++ b/action/deploy_recipe.py @@ -123,11 +123,11 @@ def main(): f"-f={f.name}", ] print("\nSubmitting job...") - print(f"{recipe_ids = }") job_name_base = ( f"{repository_id}-{run_id}-{run_attempt}" ) if select_recipe_by_label: + print(f"{recipe_ids = }") for rid in recipe_ids: if len(rid) > 44: print(f"Recipe id {rid} is > 44 chars, truncating to 44 chars.") From 79a6d0d153550a410cdc41d38ba50541466060cf Mon Sep 17 00:00:00 2001 From: Julius Busecke Date: Tue, 29 Aug 2023 11:37:45 -0400 Subject: [PATCH 5/5] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d732741..94b861f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM quay.io/pangeo/forge:5e51a29 -RUN conda run -n notebook pip install git+https://github.com/pangeo-forge/pangeo-forge-runner@unique-job-names-for-dictobjs +RUN conda run -n notebook pip install git+https://github.com/jbusecke/pangeo-forge-runner@dev COPY action/deploy_recipe.py /deploy_recipe.py COPY entrypoint.sh /entrypoint.sh