From fa5a1d9170367b959c485b14e15c36f7dfabb6d9 Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Thu, 19 Dec 2024 16:35:49 +0000 Subject: [PATCH 1/4] Remove quotation marks --- .github/workflows/deploy-hubs.yaml | 128 ++++++++++++++--------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/.github/workflows/deploy-hubs.yaml b/.github/workflows/deploy-hubs.yaml index c3af3387f..e8658b91d 100644 --- a/.github/workflows/deploy-hubs.yaml +++ b/.github/workflows/deploy-hubs.yaml @@ -206,36 +206,36 @@ jobs: # # If you are adding a new cluster, please remember to list it here! outputs: - failure_2i2c-aws-us: "${{ steps.declare-failure.outputs.failure_2i2c-aws-us }}" - failure_2i2c-uk: "${{ steps.declare-failure.outputs.failure_2i2c-uk }}" - failure_2i2c: "${{ steps.declare-failure.outputs.failure_2i2c }}" - failure_awi-ciroh: "${{ steps.declare-failure.outputs.failure_awi-ciroh }}" - failure_catalystproject-africa: "${{ steps.declare-failure.outputs.failure_catalystproject-africa }}" - failure_catalystproject-latam: "${{ steps.declare-failure.outputs.failure_catalystproject-latam }}" - failure_cloudbank: "${{ steps.declare-failure.outputs.failure_cloudbank }}" - failure_dubois: "${{ steps.declare-failure.outputs.failure_dubois }}" - failure_earthscope: "${{ steps.declare-failure.outputs.failure_earthscope }}" - failure_gridsst: "${{ steps.declare-failure.outputs.failure_gridsst }}" - failure_hhmi: "${{ steps.declare-failure.outputs.failure_hhmi }}" - failure_jupyter-health: "${{ steps.declare-failure.outputs.failure_jupyter-health }}" - failure_jupyter-meets-the-earth: "${{ steps.declare-failure.outputs.failure_jupyter-meets-the-earth }}" - failure_kitware: "${{ steps.declare-failure.outputs.failure_kitware }}" - failure_leap: "${{ steps.declare-failure.outputs.failure_leap }}" - failure_maap: "${{ steps.declare-failure.outputs.failure_maap }}" - failure_nasa-cryo: "${{ steps.declare-failure.outputs.failure_nasa-cryo }}" - failure_nasa-ghg: "${{ steps.declare-failure.outputs.failure_nasa-ghg }}" - failure_nasa-veda: "${{ steps.declare-failure.outputs.failure_nasa-veda }}" - failure_nmfs-openscapes: "${{ steps.declare-failure.outputs.failure_nmfs-openscapes }}" - failure_openscapes: "${{ steps.declare-failure.outputs.failure_openscapes }}" - failure_opensci: "${{ steps.declare-failure.outputs.failure_opensci }}" - failure_pangeo-hubs: "${{ steps.declare-failure.outputs.failure_pangeo-hubs }}" - failure_projectpythia: "${{ steps.declare-failure.outputs.failure_projectpythia }}" - failure_queensu: "${{ steps.declare-failure.outputs.failure_queensu }}" - failure_smithsonian: "${{ steps.declare-failure.outputs.failure_smithsonian }}" - failure_strudel: "${{ steps.declare-failure.outputs.failure_strudel }}" - failure_ubc-eoas: "${{ steps.declare-failure.outputs.failure_ubc-eoas }}" - failure_utoronto: "${{ steps.declare-failure.outputs.failure_utoronto }}" - failure_victor: "${{ steps.declare-failure.outputs.failure_victor }}" + failure_2i2c-aws-us: ${{ steps.declare-failure.outputs.failure_2i2c-aws-us }} + failure_2i2c-uk: ${{ steps.declare-failure.outputs.failure_2i2c-uk }} + failure_2i2c: ${{ steps.declare-failure.outputs.failure_2i2c }} + failure_awi-ciroh: ${{ steps.declare-failure.outputs.failure_awi-ciroh }} + failure_catalystproject-africa: ${{ steps.declare-failure.outputs.failure_catalystproject-africa }} + failure_catalystproject-latam: ${{ steps.declare-failure.outputs.failure_catalystproject-latam }} + failure_cloudbank: ${{ steps.declare-failure.outputs.failure_cloudbank }} + failure_dubois: ${{ steps.declare-failure.outputs.failure_dubois }} + failure_earthscope: ${{ steps.declare-failure.outputs.failure_earthscope }} + failure_gridsst: ${{ steps.declare-failure.outputs.failure_gridsst }} + failure_hhmi: ${{ steps.declare-failure.outputs.failure_hhmi }} + failure_jupyter-health: ${{ steps.declare-failure.outputs.failure_jupyter-health }} + failure_jupyter-meets-the-earth: ${{ steps.declare-failure.outputs.failure_jupyter-meets-the-earth }} + failure_kitware: ${{ steps.declare-failure.outputs.failure_kitware }} + failure_leap: ${{ steps.declare-failure.outputs.failure_leap }} + failure_maap: ${{ steps.declare-failure.outputs.failure_maap }} + failure_nasa-cryo: ${{ steps.declare-failure.outputs.failure_nasa-cryo }} + failure_nasa-ghg: ${{ steps.declare-failure.outputs.failure_nasa-ghg }} + failure_nasa-veda: ${{ steps.declare-failure.outputs.failure_nasa-veda }} + failure_nmfs-openscapes: ${{ steps.declare-failure.outputs.failure_nmfs-openscapes }} + failure_openscapes: ${{ steps.declare-failure.outputs.failure_openscapes }} + failure_opensci: ${{ steps.declare-failure.outputs.failure_opensci }} + failure_pangeo-hubs: ${{ steps.declare-failure.outputs.failure_pangeo-hubs }} + failure_projectpythia: ${{ steps.declare-failure.outputs.failure_projectpythia }} + failure_queensu: ${{ steps.declare-failure.outputs.failure_queensu }} + failure_smithsonian: ${{ steps.declare-failure.outputs.failure_smithsonian }} + failure_strudel: ${{ steps.declare-failure.outputs.failure_strudel }} + failure_ubc-eoas: ${{ steps.declare-failure.outputs.failure_ubc-eoas }} + failure_utoronto: ${{ steps.declare-failure.outputs.failure_utoronto }} + failure_victor: ${{ steps.declare-failure.outputs.failure_victor }} if: | (github.event_name == 'push' && contains(github.ref, 'main')) && @@ -439,40 +439,40 @@ jobs: # # If you are adding a new cluster/staging hub, please remember to list it here! outputs: - failure_2i2c_staging: "${{ steps.declare-failure.outputs.failure_2i2c_staging }}" - failure_2i2c_dask-staging: "${{ steps.declare-failure.outputs.failure_2i2c_dask-staging }}" - failure_2i2c_ucmercedstaging: "${{ steps.declare-failure.outputs.failure_2i2c_ucmercedstaging }}" - failure_2i2c-aws-us_staging: "${{ steps.declare-failure.outputs.failure_2i2c-aws-us_staging }}" - failure_2i2c-aws-us_dask-staging: "${{ steps.declare-failure.outputs.failure_2i2c-aws-us_dask-staging }}" - failure_2i2c-uk_staging: "${{ steps.declare-failure.outputs.failure_2i2c-uk_staging }}" - failure_awi-ciroh_staging: "${{ steps.declare-failure.outputs.failure_awi-ciroh_staging }}" - failure_catalystproject-africa_staging: "${{ steps.declare-failure.outputs.failure_catalystproject-africa_staging }}" - failure_catalystproject-latam_staging: "${{ steps.declare-failure.outputs.failure_catalystproject-latam_staging }}" - failure_cloudbank_staging: "${{ steps.declare-failure.outputs.failure_cloudbank_staging }}" - failure_dubois_staging: "${{ steps.declare-failure.outputs.failure_dubois_staging }}" - failure_earthscope_staging: "${{ steps.declare-failure.outputs.failure_earthscope_staging }}" - failure_gridsst_staging: "${{ steps.declare-failure.outputs.failure_gridsst_staging }}" - failure_hhmi_staging: "${{ steps.declare-failure.outputs.failure_hhmi_staging }}" - failure_jupyter-health_staging: "${{ steps.declare-failure.outputs.failure_jupyter-health_staging }}" - failure_jupyter-meets-the-earth_staging: "${{ steps.declare-failure.outputs.failure_jupyter-meets-the-earth_staging }}" - failure_kitware_staging: "${{ steps.declare-failure.outputs.failure_kitware_staging }}" - failure_leap_staging: "${{ steps.declare-failure.outputs.failure_leap_staging }}" - failure_maap_staging: "${{ steps.declare-failure.outputs.failure_maap_staging }}" - failure_nasa-cryo_staging: "${{ steps.declare-failure.outputs.failure_nasa-cryo_staging }}" - failure_nasa-ghg_staging: "${{ steps.declare-failure.outputs.failure_nasa-ghg_staging }}" - failure_nasa-veda_staging: "${{ steps.declare-failure.outputs.failure_nasa-veda_staging }}" - failure_nmfs-openscapes_staging: "${{ steps.declare-failure.outputs.failure_nmfs-openscapes_staging }}" - failure_openscapes_staging: "${{ steps.declare-failure.outputs.failure_openscapes_staging }}" - failure_opensci_staging: "${{ steps.declare-failure.outputs.failure_opensci_staging }}" - failure_pangeo-hubs_staging: "${{ steps.declare-failure.outputs.failure_pangeo-hubs_staging }}" - failure_projectpythia_staging: "${{ steps.declare-failure.outputs.failure_projectpythia_staging }}" - failure_queensu_staging: "${{ steps.declare-failure.outputs.failure_queensu_staging }}" - failure_smithsonian_staging: "${{ steps.declare-failure.outputs.failure_smithsonian_staging }}" - failure_strudel_staging: "${{ steps.declare-failure.outputs.failure_strudel_staging }}" - failure_ubc-eoas_staging: "${{ steps.declare-failure.outputs.failure_ubc-eoas_staging }}" - failure_utoronto_staging: "${{ steps.declare-failure.outputs.failure_utoronto_staging }}" - failure_utoronto_r-staging: "${{ steps.declare-failure.outputs.failure_utoronto_r-staging }}" - failure_victor_staging: "${{ steps.declare-failure.outputs.failure_victor_staging }}" + failure_2i2c_staging: ${{ steps.declare-failure.outputs.failure_2i2c_staging }} + failure_2i2c_dask-staging: ${{ steps.declare-failure.outputs.failure_2i2c_dask-staging }} + failure_2i2c_ucmercedstaging: ${{ steps.declare-failure.outputs.failure_2i2c_ucmercedstaging }} + failure_2i2c-aws-us_staging: ${{ steps.declare-failure.outputs.failure_2i2c-aws-us_staging }} + failure_2i2c-aws-us_dask-staging: ${{ steps.declare-failure.outputs.failure_2i2c-aws-us_dask-staging }} + failure_2i2c-uk_staging: ${{ steps.declare-failure.outputs.failure_2i2c-uk_staging }} + failure_awi-ciroh_staging: ${{ steps.declare-failure.outputs.failure_awi-ciroh_staging }} + failure_catalystproject-africa_staging: ${{ steps.declare-failure.outputs.failure_catalystproject-africa_staging }} + failure_catalystproject-latam_staging: ${{ steps.declare-failure.outputs.failure_catalystproject-latam_staging }} + failure_cloudbank_staging: ${{ steps.declare-failure.outputs.failure_cloudbank_staging }} + failure_dubois_staging: ${{ steps.declare-failure.outputs.failure_dubois_staging }} + failure_earthscope_staging: ${{ steps.declare-failure.outputs.failure_earthscope_staging }} + failure_gridsst_staging: ${{ steps.declare-failure.outputs.failure_gridsst_staging }} + failure_hhmi_staging: ${{ steps.declare-failure.outputs.failure_hhmi_staging }} + failure_jupyter-health_staging: ${{ steps.declare-failure.outputs.failure_jupyter-health_staging }} + failure_jupyter-meets-the-earth_staging: ${{ steps.declare-failure.outputs.failure_jupyter-meets-the-earth_staging }} + failure_kitware_staging: ${{ steps.declare-failure.outputs.failure_kitware_staging }} + failure_leap_staging: ${{ steps.declare-failure.outputs.failure_leap_staging }} + failure_maap_staging: ${{ steps.declare-failure.outputs.failure_maap_staging }} + failure_nasa-cryo_staging: ${{ steps.declare-failure.outputs.failure_nasa-cryo_staging }} + failure_nasa-ghg_staging: ${{ steps.declare-failure.outputs.failure_nasa-ghg_staging }} + failure_nasa-veda_staging: ${{ steps.declare-failure.outputs.failure_nasa-veda_staging }} + failure_nmfs-openscapes_staging: ${{ steps.declare-failure.outputs.failure_nmfs-openscapes_staging }} + failure_openscapes_staging: ${{ steps.declare-failure.outputs.failure_openscapes_staging }} + failure_opensci_staging: ${{ steps.declare-failure.outputs.failure_opensci_staging }} + failure_pangeo-hubs_staging: ${{ steps.declare-failure.outputs.failure_pangeo-hubs_staging }} + failure_projectpythia_staging: ${{ steps.declare-failure.outputs.failure_projectpythia_staging }} + failure_queensu_staging: ${{ steps.declare-failure.outputs.failure_queensu_staging }} + failure_smithsonian_staging: ${{ steps.declare-failure.outputs.failure_smithsonian_staging }} + failure_strudel_staging: ${{ steps.declare-failure.outputs.failure_strudel_staging }} + failure_ubc-eoas_staging: ${{ steps.declare-failure.outputs.failure_ubc-eoas_staging }} + failure_utoronto_staging: ${{ steps.declare-failure.outputs.failure_utoronto_staging }} + failure_utoronto_r-staging: ${{ steps.declare-failure.outputs.failure_utoronto_r-staging }} + failure_victor_staging: ${{ steps.declare-failure.outputs.failure_victor_staging }} steps: - uses: actions/checkout@v4 From aa38b05f57d97717325e8c3f45582d08263a030c Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Thu, 19 Dec 2024 16:36:06 +0000 Subject: [PATCH 2/4] Temporarily trigger on changes to this file --- .github/workflows/deploy-hubs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy-hubs.yaml b/.github/workflows/deploy-hubs.yaml index e8658b91d..620cae4a9 100644 --- a/.github/workflows/deploy-hubs.yaml +++ b/.github/workflows/deploy-hubs.yaml @@ -15,6 +15,7 @@ on: - "!deployer/commands/generate/resource_allocation/**" - requirements.txt - .github/actions/setup-deploy/** + - .github/workflows/deploy-hubs.yaml - helm-charts/** - config/clusters/** # Exclude the template configuration files @@ -37,6 +38,7 @@ on: - "!deployer/commands/generate/resource_allocation/**" - requirements.txt - .github/actions/setup-deploy/** + - .github/workflows/deploy-hubs.yaml - helm-charts/** - config/clusters/** # Exclude the template configuration files From ee2a6ae98c892acca393f7909260fb0152ccfe38 Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Thu, 19 Dec 2024 16:44:08 +0000 Subject: [PATCH 3/4] Improve error handling of KeyError in filter jobs --- .github/workflows/deploy-hubs.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-hubs.yaml b/.github/workflows/deploy-hubs.yaml index 620cae4a9..c2eaba93c 100644 --- a/.github/workflows/deploy-hubs.yaml +++ b/.github/workflows/deploy-hubs.yaml @@ -336,8 +336,8 @@ jobs: for prod_job in prod_jobs if outputs[f"failure_{prod_job['cluster_name'].replace('.', '-')}"] != "true" ] - except KeyError: - print(f"The {cluster_name} cluster wasn't found in the `upgrade-support.outputs` list. Please add it before continuing!") + except KeyError as ke: + print(f"A cluster wasn't found in the `upgrade-support.outputs` list. Please add it before continuing! {repr(ke)}") output_file = os.getenv("GITHUB_OUTPUT") with open(output_file, "a") as f: @@ -570,8 +570,8 @@ jobs: if len(failed_jobs) == 0: filtered_prod_jobs.append(prod_job) - except KeyError: - print(f"The {cluster_name} cluster wasn't found in the `upgrade-staging.outputs` list. Please add it before continuing!") + except KeyError as ke: + print(f"A cluster and staging hub wasn't found in the `upgrade-staging.outputs` list. Please add it before continuing! {repr(ke)}") output_file = os.getenv("GITHUB_OUTPUT") with open(output_file, "a") as f: From e57db4db3deb4baf08d61b36231d7a5362af948b Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Thu, 19 Dec 2024 16:45:29 +0000 Subject: [PATCH 4/4] Improve logic for filtering failed support jobs --- .github/workflows/deploy-hubs.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-hubs.yaml b/.github/workflows/deploy-hubs.yaml index c2eaba93c..4aaf25d82 100644 --- a/.github/workflows/deploy-hubs.yaml +++ b/.github/workflows/deploy-hubs.yaml @@ -328,13 +328,15 @@ jobs: filtered_staging_jobs = [ staging_job for staging_job in staging_jobs - if outputs[f"failure_{staging_job['cluster_name'].replace('.', '-')}"] != "true" + if f"failure_{staging_job['cluster_name'].replace('.', '-')}" in staging_jobs.keys() + and outputs[f"failure_{staging_job['cluster_name'].replace('.', '-')}"] != "true" ] filtered_prod_jobs = [ prod_job for prod_job in prod_jobs - if outputs[f"failure_{prod_job['cluster_name'].replace('.', '-')}"] != "true" + if f"failure_{staging_job['cluster_name'].replace('.', '-')}" in staging_jobs.keys() + and outputs[f"failure_{prod_job['cluster_name'].replace('.', '-')}"] != "true" ] except KeyError as ke: print(f"A cluster wasn't found in the `upgrade-support.outputs` list. Please add it before continuing! {repr(ke)}")