Skip to content

Commit

Permalink
Improve logic for filtering failed support jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
sgibson91 committed Dec 19, 2024
1 parent ee2a6ae commit e57db4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/deploy-hubs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)}")
Expand Down

0 comments on commit e57db4d

Please sign in to comment.