From f9f66f3680367011cc555228c8b4e4c958c7abe2 Mon Sep 17 00:00:00 2001 From: Brian Lechthaler Date: Tue, 17 Feb 2026 16:00:44 -0800 Subject: [PATCH 1/3] Add region richmond to stable types, allow instances to be created in any region that's available (#91) * add richmond region to stable types * don't restrict which zones can be used, allow all zones --- v1/providers/sfcompute/instancetype.go | 7 ------- v1/providers/sfcompute/validation_test.go | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/v1/providers/sfcompute/instancetype.go b/v1/providers/sfcompute/instancetype.go index 6858e93f..1b7a154e 100644 --- a/v1/providers/sfcompute/instancetype.go +++ b/v1/providers/sfcompute/instancetype.go @@ -3,7 +3,6 @@ package v1 import ( "context" "fmt" - "slices" "strings" "time" @@ -24,8 +23,6 @@ const ( diskTypeSSD = "ssd" ) -var allowedZones = []string{"hayesvalley", "yerba"} - func makeDefaultInstanceTypePrice(amount string, currencyCode string) currency.Amount { instanceTypePrice, err := currency.NewAmount(amount, currencyCode) if err != nil { @@ -186,10 +183,6 @@ func (c *SFCClient) getZones(ctx context.Context, includeUnavailable bool) ([]sf zones := make([]sfcnodes.ZoneListResponseData, 0, len(resp.Data)) for _, zone := range resp.Data { - // If the zone is not allowed, skip it - if !slices.Contains(allowedZones, strings.ToLower(zone.Name)) { - continue - } // If the there is no available capacity, and skip it if len(zone.AvailableCapacity) == 0 && !includeUnavailable { diff --git a/v1/providers/sfcompute/validation_test.go b/v1/providers/sfcompute/validation_test.go index 196c7397..03d1609e 100644 --- a/v1/providers/sfcompute/validation_test.go +++ b/v1/providers/sfcompute/validation_test.go @@ -18,6 +18,7 @@ func TestValidationFunctions(t *testing.T) { StableIDs: []v1.InstanceTypeID{ "hayesvalley-noSub-h100", "yerba-noSub-h100", + "richmond-noSub-h100", }, } From e64755f0ab54076e503ee45adfd2d2e94fc4f43c Mon Sep 17 00:00:00 2001 From: Drew Malin Date: Tue, 17 Feb 2026 16:03:36 -0800 Subject: [PATCH 2/3] fix(BREV-2823): Remove hardcoded sfc locations --- v1/providers/sfcompute/instancetype.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/v1/providers/sfcompute/instancetype.go b/v1/providers/sfcompute/instancetype.go index 1b7a154e..515f5efa 100644 --- a/v1/providers/sfcompute/instancetype.go +++ b/v1/providers/sfcompute/instancetype.go @@ -183,8 +183,7 @@ func (c *SFCClient) getZones(ctx context.Context, includeUnavailable bool) ([]sf zones := make([]sfcnodes.ZoneListResponseData, 0, len(resp.Data)) for _, zone := range resp.Data { - - // If the there is no available capacity, and skip it + // If the there is no available capacity, skip it if len(zone.AvailableCapacity) == 0 && !includeUnavailable { continue } From 7a85b5488996caa523325a390c2ba0f32005f19e Mon Sep 17 00:00:00 2001 From: Drew Malin Date: Tue, 17 Feb 2026 16:22:15 -0800 Subject: [PATCH 3/3] remove unused locations --- v1/providers/sfcompute/validation_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/v1/providers/sfcompute/validation_test.go b/v1/providers/sfcompute/validation_test.go index 03d1609e..cd0a12da 100644 --- a/v1/providers/sfcompute/validation_test.go +++ b/v1/providers/sfcompute/validation_test.go @@ -16,8 +16,6 @@ func TestValidationFunctions(t *testing.T) { config := validation.ProviderConfig{ Credential: NewSFCCredential("validation-test", apiKey), StableIDs: []v1.InstanceTypeID{ - "hayesvalley-noSub-h100", - "yerba-noSub-h100", "richmond-noSub-h100", }, }