Skip to content

Migrate most list APIs to failure-resilient streaming utilities#831

Merged
habfast merged 4 commits intomasterfrom
improve-zone-failure-handling-part2
May 6, 2026
Merged

Migrate most list APIs to failure-resilient streaming utilities#831
habfast merged 4 commits intomasterfrom
improve-zone-failure-handling-part2

Conversation

@habfast
Copy link
Copy Markdown
Contributor

@habfast habfast commented May 5, 2026

Description

Follow-up to #826, finishes sc-177228

Migrated:

  • cmd/aiservices/model/model_list.go
  • cmd/aiservices/deployment/instance_type_list.go
  • cmd/compute/elastic_ip/elastic_ip_list.go
  • cmd/compute/instance_pool/instance_pool_list.go
  • cmd/compute/private_network/private_network_list.go
  • cmd/compute/load_balancer/nlb_list.go
  • cmd/compute/deploy_target/deploy_target_list.go
  • cmd/compute/sks/sks_list.go
  • cmd/compute/sks/sks_nodepool_list.go
  • cmd/dbaas/dbaas_list.go

Skipped:

  • cmd/compute/instance_type/instance_type_list.go (would break sorting)
  • cmd/compute/instance/instance_list.go (custom ToTable+sync.Map, don't want to get into it...)

Note that the Changelog is already updated from the previous PR! It doesn't need to be touched again

Checklist

  • Changelog updated
  • Testing

Testing

Manually ran every single command that has been updated against the exoscale-ops organization. Works smoothly.
Screenshot 2026-05-05 at 16 38 14

Comment thread cmd/aiservices/deployment/instance_type_list.go
Comment thread cmd/aiservices/deployment/instance_type_list.go Outdated
Comment thread cmd/aiservices/deployment/instance_type_list.go
}
if out[3].Zone != "ch-gva-2" || out[3].Family != "gpu-h100" {
t.Errorf("expected ch-gva-2/gpu-h100 fourth, got %s/%s", out[3].Zone, out[3].Family)
for _, r := range rows {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mock returns 2 specific entries (gpu-a5000/unauthorized and gpu-a100/authorized) but the test only checks the zone name now.

Since we're in a single-zone mock the order is deterministic, so we could still check the family names and authorized values like the old test did.

Comment thread cmd/aiservices/deployment/instance_type_list_test.go Outdated
Comment thread cmd/aiservices/model/model_list_test.go Outdated
Copy link
Copy Markdown
Contributor

@natalie-o-perret natalie-o-perret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the grand scheme of things, fine by me, just a few nit's here and there.

@habfast habfast force-pushed the improve-zone-failure-handling-part2 branch from 34d4e4e to ae67be3 Compare May 6, 2026 07:01
@habfast habfast merged commit 733e71a into master May 6, 2026
6 checks passed
@habfast habfast deleted the improve-zone-failure-handling-part2 branch May 6, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants