Skip to content

Commit d65309a

Browse files
authored
Merge branch 'ps-week-07-2026' into dependabot/go_modules/github.com/hashicorp/terraform-plugin-sdk/v2-2.38.2
2 parents 936188e + 2f8bd6e commit d65309a

File tree

5 files changed

+14
-19
lines changed

5 files changed

+14
-19
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/hashicorp/terraform-plugin-docs v0.24.0
1212
github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.2
1313
github.com/robfig/cron v1.2.0
14-
github.com/spectrocloud/palette-sdk-go v0.0.0-20260122075044-882da6a7d7b4
14+
github.com/spectrocloud/palette-sdk-go v0.0.0-20260205062126-c4a2668955ec
1515
github.com/stretchr/testify v1.11.1
1616
gopkg.in/yaml.v3 v3.0.1
1717
gotest.tools v2.2.0+incompatible

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ
322322
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
323323
github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8=
324324
github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY=
325-
github.com/spectrocloud/palette-sdk-go v0.0.0-20260122075044-882da6a7d7b4 h1:zIe5rKzA4+6aID5F0xyiDFrmKFY7rTVbhA3IF4gK+IA=
326-
github.com/spectrocloud/palette-sdk-go v0.0.0-20260122075044-882da6a7d7b4/go.mod h1:izLxNVNnE7JHh7C6piEVo9SLfa4vR8KfX7cEYa1fYXU=
325+
github.com/spectrocloud/palette-sdk-go v0.0.0-20260205062126-c4a2668955ec h1:DrhFYn9/83DzS7VjHl8HqKF+HDH16HStSiDckMeOKZc=
326+
github.com/spectrocloud/palette-sdk-go v0.0.0-20260205062126-c4a2668955ec/go.mod h1:izLxNVNnE7JHh7C6piEVo9SLfa4vR8KfX7cEYa1fYXU=
327327
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
328328
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
329329
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=

spectrocloud/resource_cluster_profile.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ func resourceClusterProfileCreate(ctx context.Context, d *schema.ResourceData, m
108108
return diag.FromErr(err)
109109
}
110110

111-
// Create
112111
uid, err := c.CreateClusterProfile(clusterProfile)
113112
if err != nil {
114113
return diag.FromErr(err)
@@ -416,20 +415,8 @@ func toClusterProfilePackCreateWithResolution(pSrc interface{}, c *client.V1Clie
416415
}
417416

418417
switch pType {
419-
case models.V1PackTypeSpectro:
418+
case models.V1PackTypeOci, models.V1PackTypeSpectro, models.V1PackTypeHelm:
420419
if pUID == "" {
421-
// UID not provided, validation already passed, so we have all resolution fields
422-
// Resolve the pack UID
423-
resolvedUID, err := resolvePackUID(c, pName, pTag, pRegistryUID)
424-
if err != nil {
425-
return nil, fmt.Errorf("failed to resolve pack UID for pack %s: %w", pName, err)
426-
}
427-
pUID = resolvedUID
428-
}
429-
case models.V1PackTypeHelm:
430-
if pUID == "" {
431-
// UID not provided, validation already passed, so we have all resolution fields
432-
// Resolve the pack UID
433420
resolvedUID, err := resolvePackUID(c, pName, pTag, pRegistryUID)
434421
if err != nil {
435422
return nil, fmt.Errorf("failed to resolve pack UID for pack %s: %w", pName, err)

spectrocloud/resource_registry_oci_ecr.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,14 @@ func resourceRegistryEcrRead(ctx context.Context, d *schema.ResourceData, m inte
290290
if err := d.Set("base_content_path", registry.Spec.BaseContentPath); err != nil {
291291
return diag.FromErr(err)
292292
}
293-
if err := d.Set("is_synchronization", registry.Spec.IsSyncSupported); err != nil {
293+
if err := d.Set("is_synchronization", registry.Status.SyncStatus.IsSyncSupported); err != nil {
294294
return diag.FromErr(err)
295295
}
296+
296297
if err := d.Set("provider_type", registry.Spec.ProviderType); err != nil {
297298
return diag.FromErr(err)
298299
}
300+
299301
if err := d.Set("wait_for_sync", false); err != nil {
300302
return diag.FromErr(err)
301303
}
@@ -361,9 +363,10 @@ func resourceRegistryEcrRead(ctx context.Context, d *schema.ResourceData, m inte
361363
return diag.FromErr(err)
362364
}
363365

364-
if err := d.Set("is_synchronization", registry.Spec.IsSyncSupported); err != nil {
366+
if err := d.Set("is_synchronization", registry.Status.SyncStatus.IsSyncSupported); err != nil {
365367
return diag.FromErr(err)
366368
}
369+
367370
if err := d.Set("wait_for_sync", false); err != nil {
368371
return diag.FromErr(err)
369372
}

tests/mockApiServer/routes/mockRegistries.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ func RegistriesRoutes() []Route {
106106
Key: "test-key",
107107
},
108108
},
109+
Status: &models.V1OciRegistryStatus{
110+
SyncStatus: &models.V1RegistrySyncStatus{
111+
IsSyncSupported: false,
112+
},
113+
},
109114
},
110115
},
111116
},

0 commit comments

Comments
 (0)