Skip to content

Commit 3bad6fb

Browse files
gursewak1997HuijingHei
authored andcommitted
cmd-cloud-prune: set default project when unspecified
Updated the project assignment to default to fedora-coreos-cloud when gcp.get(project) returns None or an empty value. We have a few builds where the project is not specified.This ensures a fallback project is always available.
1 parent 4e45505 commit 3bad6fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd-cloud-prune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def delete_gcp_image(build, cloud_config, dry_run):
347347
print(f"No GCP image to prune for {build.id} for {build.arch}")
348348
return errors
349349
gcp_image = gcp.get("image")
350-
project = gcp.get("project")
350+
project = gcp.get("project") or "fedora-coreos-cloud"
351351
json_key = cloud_config.get("gcp", {}).get("json-key")
352352
if dry_run:
353353
print(f"Would delete {gcp_image} GCP image for {build.id}")

0 commit comments

Comments
 (0)