Skip to content

Commit 2b44ea1

Browse files
Workaround for malformed quota objects (#1115)
## Proposed Changes * Change `find_zone.py` helper script to ignore unnamed quota items
1 parent cb7c238 commit 2b44ea1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ci/cloudbuild/scripts/find_zone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def zone_to_region(zone):
4848
def get_free_quota(region):
4949
result = json.loads(execute(f"gcloud compute regions describe {region} --format=json"))
5050
quotas = result["quotas"]
51-
quotas = {q["metric"]: q for q in quotas}
51+
quotas = {q["metric"]: q for q in quotas if "metric" in q}
5252

5353
# needs to have at least 4 available addresses
5454
if quotas["IN_USE_ADDRESSES"]["limit"] - quotas["IN_USE_ADDRESSES"]["usage"] < 4:

0 commit comments

Comments
 (0)