From eea3a467c6a7740ff26cbde65f9a87318755dd58 Mon Sep 17 00:00:00 2001 From: Drew Malin Date: Wed, 8 Oct 2025 09:54:56 -0700 Subject: [PATCH 1/2] fix(BREV-1802): Uptake new shadeform API version --- .../shadeform/gen/shadeform/api/openapi.yaml | 13 ++++++++----- v1/providers/shadeform/gen/shadeform/api_default.go | 6 +++--- v1/providers/shadeform/gen/shadeform/docs/Status.md | 6 ++++-- .../shadeform/gen/shadeform/model_status.go | 6 ++++-- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/v1/providers/shadeform/gen/shadeform/api/openapi.yaml b/v1/providers/shadeform/gen/shadeform/api/openapi.yaml index fb4694fd..0664332e 100644 --- a/v1/providers/shadeform/gen/shadeform/api/openapi.yaml +++ b/v1/providers/shadeform/gen/shadeform/api/openapi.yaml @@ -16,7 +16,8 @@ security: paths: /instances: get: - description: Get active and pending instances. + description: "Get all non deleted instances. Note: instances in the \"deleting\"\ + \ status will also show up here." operationId: Instances responses: "200": @@ -127,7 +128,7 @@ paths: summary: /instances/create /instances/{id}/info: get: - description: Get details for the specified instance in the url. + description: "Get details for the specified, non deleted, instance in the url." operationId: InstancesInfo parameters: - description: The instance id @@ -175,8 +176,9 @@ paths: summary: "/instances/{id}/update" /instances/{id}/delete: post: - description: Delete an instance. Some cloud providers may only allow deletion - of an instance after it has moved to the 'active' status. + description: "This will move the instance to the 'deleting' status while the\ + \ instance is being deleted. Once the instance has entered the 'deleting'\ + \ status, the account will no longer be billed for the instance." operationId: InstancesDelete parameters: - description: The instance id @@ -1804,8 +1806,9 @@ components: - pending_provider - pending - active - - deleted - error + - deleting + - deleted example: active type: string StatusDetails: diff --git a/v1/providers/shadeform/gen/shadeform/api_default.go b/v1/providers/shadeform/gen/shadeform/api_default.go index 3b361f64..3d2b6923 100644 --- a/v1/providers/shadeform/gen/shadeform/api_default.go +++ b/v1/providers/shadeform/gen/shadeform/api_default.go @@ -35,7 +35,7 @@ func (r ApiInstancesRequest) Execute() (*InstancesResponse, *http.Response, erro /* Instances /instances -Get active and pending instances. +Get all non deleted instances. Note: instances in the "deleting" status will also show up here. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiInstancesRequest @@ -272,7 +272,7 @@ func (r ApiInstancesDeleteRequest) Execute() (*http.Response, error) { /* InstancesDelete /instances/{id}/delete -Delete an instance. Some cloud providers may only allow deletion of an instance after it has moved to the 'active' status. +This will move the instance to the 'deleting' status while the instance is being deleted. Once the instance has entered the 'deleting' status, the account will no longer be billed for the instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id The instance id @@ -378,7 +378,7 @@ func (r ApiInstancesInfoRequest) Execute() (*InstanceInfoResponse, *http.Respons /* InstancesInfo /instances/{id}/info -Get details for the specified instance in the url. +Get details for the specified, non deleted, instance in the url. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id The instance id diff --git a/v1/providers/shadeform/gen/shadeform/docs/Status.md b/v1/providers/shadeform/gen/shadeform/docs/Status.md index 558fd964..20e35e36 100644 --- a/v1/providers/shadeform/gen/shadeform/docs/Status.md +++ b/v1/providers/shadeform/gen/shadeform/docs/Status.md @@ -11,10 +11,12 @@ * `ACTIVE` (value: `"active"`) -* `DELETED` (value: `"deleted"`) - * `ERROR` (value: `"error"`) +* `DELETING` (value: `"deleting"`) + +* `DELETED` (value: `"deleted"`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v1/providers/shadeform/gen/shadeform/model_status.go b/v1/providers/shadeform/gen/shadeform/model_status.go index 9b395c7b..03a6a9a0 100644 --- a/v1/providers/shadeform/gen/shadeform/model_status.go +++ b/v1/providers/shadeform/gen/shadeform/model_status.go @@ -25,8 +25,9 @@ const ( PENDING_PROVIDER Status = "pending_provider" PENDING Status = "pending" ACTIVE Status = "active" - DELETED Status = "deleted" ERROR Status = "error" + DELETING Status = "deleting" + DELETED Status = "deleted" ) // All allowed values of Status enum @@ -35,8 +36,9 @@ var AllowedStatusEnumValues = []Status{ "pending_provider", "pending", "active", - "deleted", "error", + "deleting", + "deleted", } func (v *Status) UnmarshalJSON(src []byte) error { From d5604b5e02143eea91e9047946c5e641c35303ca Mon Sep 17 00:00:00 2001 From: Drew Malin Date: Wed, 8 Oct 2025 10:00:10 -0700 Subject: [PATCH 2/2] lower poll time --- v1/providers/shadeform/instancetype.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v1/providers/shadeform/instancetype.go b/v1/providers/shadeform/instancetype.go index 37d75221..b01218ec 100644 --- a/v1/providers/shadeform/instancetype.go +++ b/v1/providers/shadeform/instancetype.go @@ -85,7 +85,7 @@ func isSelectedByArgs(instanceType v1.InstanceType, args v1.GetInstanceTypeArgs) } func (c *ShadeformClient) GetInstanceTypePollTime() time.Duration { - return 5 * time.Minute + return 1 * time.Minute } func (c *ShadeformClient) GetLocations(ctx context.Context, _ v1.GetLocationsArgs) ([]v1.Location, error) {