Skip to content

[Bug]: Regions with status DOWN prevent services with status UP from appearing in output #220

Description

@onurhanak

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

getCloudRegionsWithFeatureAvailable iterates over all project regions and immediately continues whenever a region's top-level status is not "UP". The per-service status check only runs for regions that pass this region-level filter, so a region with status: "DOWN" is excluded from the result even when it contains services whose individual status is "UP".

For example, given a region like CA-EAST-TOR returned by the API:

{
  "name": "CA-EAST-TOR",
  "status": "DOWN",
  "services": [
    { "name": "storage-s3-high-perf",   "status": "UP" },
    { "name": "storage-s3-standard",    "status": "UP" }
  ]
}

and a call such as:

getCloudRegionsWithFeatureAvailable(projectID, "storage-s3-standard")

the function skips the region at:

if region["status"] != "UP" {
    continue
}

So, CA-EAST-TOR is never appended to the returned regionIDs, despite both matching services reporting status: "UP".

Expected Behavior

The function should return a region when at least one requested feature has a corresponding service with status: "UP", regardless of the region's own status field.

Steps To Reproduce

Try to list services in a project which has a region that is DOWN but any service that is UP.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions