Skip to content

Commit 4bb1ca8

Browse files
KSQL-14849: temporarily swap to internal SDK ksql/v0.5.0 + wire real Update
For non-prod end-to-end validation of the self-serve CSU PATCH endpoint. See the doc comment on Client.UpdateKsqlCluster for the temporary-nature context and the unswap procedure that runs before merging this PR. Three categories of changes: 1. Import path swap (6 files): github.com/confluentinc/ccloud-sdk-go-v2/ksql/v2 → github.com/confluentinc/ccloud-sdk-go-v2-internal/ksql/v2 go.mod bumped to ccloud-sdk-go-v2-internal/ksql v0.5.0 (the tag cut today from ccloud-sdk-go-v2-internal #820, generated from cc-api PR #2507's branch). The public ccloud-sdk-go-v2/ksql line is replaced, not added alongside — keeping a single SDK dep avoids type-collision in shared paths like Client. 2. ObjectReference type renames. The internal SDK's generator emits more granular reference types per field (cc-api spec captures the distinction); the public v0.2.0 SDK used a single ObjectReference for everything. Three mechanical swaps in pkg/ccloudv2/ksql.go and test/test-server/ksql_handlers.go: - Spec.KafkaCluster: ObjectReference → EnvScopedObjectReference - Spec.CredentialIdentity: ObjectReference → TypedGlobalObjectReference - Spec.Environment: ObjectReference → GlobalObjectReference plus NewObjectReference("sa-...", "", "") → NewTypedGlobalObjectReference(...). 3. Real PATCH call. Client.UpdateKsqlCluster now constructs KsqldbcmV2ClusterUpdate{Spec: {Environment, Csu}} and calls ClustersKsqldbcmV2Api.UpdateKsqldbcmV2Cluster(...).Execute() — no SDK Environment(...) query-param builder on PATCH, env lives in spec.environment.id in the body (matches cc-control-plane-ksql codec change in PR #335 / v0.224.0 — the server reads env from spec.environment.id with a query-param fallback for back-compat). Build, vet, and ksql unit tests all clean. Before merging this PR (post cc-api #2507 merge + public SDK release): - Swap import path back: internal/ksql → public ksql - Bump go.mod to the new public ccloud-sdk-go-v2/ksql tag (which will have the same Environment/typed-reference shape because it's generated from the same minispec) - Drop Hidden: true on the cobra command in command_cluster_update.go - Un-draft and final review
1 parent 9b9eee2 commit 4bb1ca8

8 files changed

Lines changed: 44 additions & 56 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ require (
1515
github.com/charmbracelet/lipgloss v0.11.0
1616
github.com/client9/gospell v0.0.0-20160306015952-90dfc71015df
1717
github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52
18+
github.com/confluentinc/ccloud-sdk-go-v2-internal/ksql v0.5.0
1819
github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0
1920
github.com/confluentinc/ccloud-sdk-go-v2/apikeys v0.4.0
2021
github.com/confluentinc/ccloud-sdk-go-v2/billing v0.3.0
@@ -36,7 +37,6 @@ require (
3637
github.com/confluentinc/ccloud-sdk-go-v2/identity-provider v0.3.0
3738
github.com/confluentinc/ccloud-sdk-go-v2/kafka-quotas v0.4.0
3839
github.com/confluentinc/ccloud-sdk-go-v2/kafkarest v0.0.0-20250909043602-f80bee0eb280
39-
github.com/confluentinc/ccloud-sdk-go-v2/ksql v0.2.0
4040
github.com/confluentinc/ccloud-sdk-go-v2/mds v0.4.0
4141
github.com/confluentinc/ccloud-sdk-go-v2/metrics v0.2.0
4242
github.com/confluentinc/ccloud-sdk-go-v2/networking v0.14.0

go.sum

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ github.com/compose-spec/compose-go/v2 v2.1.3 h1:bD67uqLuL/XgkAK6ir3xZvNLFPxPScEi
190190
github.com/compose-spec/compose-go/v2 v2.1.3/go.mod h1:lFN0DrMxIncJGYAXTfWuajfwj5haBJqrBkarHcnjJKc=
191191
github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52 h1:19qEGhkbZa5fopKCe0VPIV+Sasby4Pv10z9ZaktwWso=
192192
github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52/go.mod h1:62EMf+5uFEt1BJ2q8WMrUoI9VUSxAbDnmZCGRt/MbA0=
193+
github.com/confluentinc/ccloud-sdk-go-v2-internal/ksql v0.5.0 h1:/t7vM8UkEGJWfdDxsRkDCaRhDoDhAupphRl2QZ039zI=
194+
github.com/confluentinc/ccloud-sdk-go-v2-internal/ksql v0.5.0/go.mod h1:NHFvzwBb2RJmy7RVvq9Z3gregvm08HgquCUtsjTj1Ko=
193195
github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0 h1:zSF4OQUJXWH2JeAo9rsq13ibk+JFdzITGR8S7cFMpzw=
194196
github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0/go.mod h1:DoxqzzF3JzvJr3fWkvCiOHFlE0GoYpozWxFZ1Ud9ntA=
195197
github.com/confluentinc/ccloud-sdk-go-v2/apikeys v0.4.0 h1:8fWyLwMuy8ec0MVF5Avd54UvbIxhDFhZzanHBVwgxdw=
@@ -232,8 +234,6 @@ github.com/confluentinc/ccloud-sdk-go-v2/kafka-quotas v0.4.0 h1:T9e7lNj/VjxE89+t
232234
github.com/confluentinc/ccloud-sdk-go-v2/kafka-quotas v0.4.0/go.mod h1:7gqwWFIyj2MAGpL/kf6SGXm/pi2Z6qpMJIjKlgEEhhg=
233235
github.com/confluentinc/ccloud-sdk-go-v2/kafkarest v0.0.0-20250909043602-f80bee0eb280 h1:GFVI3pGckhpP66Xb05usB8txzubnnoigZHp292ax5Rg=
234236
github.com/confluentinc/ccloud-sdk-go-v2/kafkarest v0.0.0-20250909043602-f80bee0eb280/go.mod h1:b8v8EIBtpQDx0zAxCpGxhuSWBRAwh/+PRFNtaBR5P7c=
235-
github.com/confluentinc/ccloud-sdk-go-v2/ksql v0.2.0 h1:g6OHa1iW3HO3N/YiTAL9Q6Y7rdjMBAjOPYK37akTt0M=
236-
github.com/confluentinc/ccloud-sdk-go-v2/ksql v0.2.0/go.mod h1:0LAvd4VqlaRwKU4yvDEkVCtV43yNezt56+hBe9Lmg7Q=
237237
github.com/confluentinc/ccloud-sdk-go-v2/mds v0.4.0 h1:jIXXhGi+Xn+XYFCErnMvd035QijbYXla1Bo8W7V7lFM=
238238
github.com/confluentinc/ccloud-sdk-go-v2/mds v0.4.0/go.mod h1:ufn9In8kDsyJ7Nru2ygpAaWdGw7DSDTOTtDhQVSmZjs=
239239
github.com/confluentinc/ccloud-sdk-go-v2/metrics v0.2.0 h1:TWwZHdfo2XNKrnGOuxXx4LF8WgahqqDC47Ap51L4thM=
@@ -938,8 +938,6 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm
938938
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
939939
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
940940
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
941-
golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI=
942-
golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q=
943941
golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988=
944942
golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc=
945943
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -1019,8 +1017,6 @@ golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qx
10191017
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
10201018
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
10211019
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
1022-
golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA=
1023-
golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs=
10241020
golang.org/x/net v0.54.0 h1:2zJIZAxAHV/OHCDTCOHAYehQzLfSXuf/5SoL/Dv6w/w=
10251021
golang.org/x/net v0.54.0/go.mod h1:Sj4oj8jK6XmHpBZU/zWHw3BV3abl4Kvi+Ut7cQcY+cQ=
10261022
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -1108,16 +1104,12 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
11081104
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
11091105
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
11101106
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
1111-
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
1112-
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
11131107
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
11141108
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
11151109
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
11161110
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
11171111
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
11181112
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
1119-
golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY=
1120-
golang.org/x/term v0.42.0/go.mod h1:Dq/D+snpsbazcBG5+F9Q1n2rXV8Ma+71xEjTRufARgY=
11211113
golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4=
11221114
golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk=
11231115
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1130,8 +1122,6 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
11301122
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
11311123
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
11321124
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
1133-
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
1134-
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
11351125
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
11361126
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
11371127
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=

internal/ksql/command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/spf13/cobra"
1010
"golang.org/x/oauth2"
1111

12-
ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2/ksql/v2"
12+
ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2-internal/ksql/v2"
1313

1414
pauth "github.com/confluentinc/cli/v4/pkg/auth"
1515
"github.com/confluentinc/cli/v4/pkg/ccloudv2"

internal/ksql/command_cluster_configureacls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/spf13/cobra"
77

88
kafkarestv3 "github.com/confluentinc/ccloud-sdk-go-v2/kafkarest/v3"
9-
ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2/ksql/v2"
9+
ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2-internal/ksql/v2"
1010

1111
"github.com/confluentinc/cli/v4/pkg/acl"
1212
"github.com/confluentinc/cli/v4/pkg/ccstructs"

internal/ksql/command_cluster_delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/spf13/cobra"
1111
"golang.org/x/oauth2"
1212

13-
ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2/ksql/v2"
13+
ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2-internal/ksql/v2"
1414

1515
pauth "github.com/confluentinc/cli/v4/pkg/auth"
1616
pcmd "github.com/confluentinc/cli/v4/pkg/cmd"

pkg/ccloudv2/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
iamv2 "github.com/confluentinc/ccloud-sdk-go-v2/iam/v2"
2121
identityproviderv2 "github.com/confluentinc/ccloud-sdk-go-v2/identity-provider/v2"
2222
kafkaquotasv1 "github.com/confluentinc/ccloud-sdk-go-v2/kafka-quotas/v1"
23-
ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2/ksql/v2"
23+
ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2-internal/ksql/v2"
2424
mdsv2 "github.com/confluentinc/ccloud-sdk-go-v2/mds/v2"
2525
networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1"
2626
networkingdnsforwarderv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder/v1"

pkg/ccloudv2/ksql.go

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ package ccloudv2
22

33
import (
44
"context"
5-
"fmt"
65
"net/http"
76

8-
ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2/ksql/v2"
7+
ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2-internal/ksql/v2"
98

109
"github.com/confluentinc/cli/v4/pkg/errors"
1110
)
@@ -67,35 +66,34 @@ func (c *Client) CreateKsqlCluster(displayName, environmentId, kafkaClusterId, c
6766
DisplayName: &displayName,
6867
UseDetailedProcessingLog: &useDetailedProcessingLog,
6968
Csu: &csus,
70-
KafkaCluster: &ksqlv2.ObjectReference{Id: kafkaClusterId, Related: "-", ResourceName: "-"},
71-
CredentialIdentity: &ksqlv2.ObjectReference{Id: credentialIdentity, Related: "-", ResourceName: "-"},
72-
Environment: &ksqlv2.ObjectReference{Id: environmentId, Related: "-", ResourceName: "-"},
69+
KafkaCluster: &ksqlv2.EnvScopedObjectReference{Id: kafkaClusterId, Related: "-", ResourceName: "-"},
70+
CredentialIdentity: &ksqlv2.TypedGlobalObjectReference{Id: credentialIdentity, Related: "-", ResourceName: "-"},
71+
Environment: &ksqlv2.GlobalObjectReference{Id: environmentId, Related: "-", ResourceName: "-"},
7372
}}
7473
res, httpResp, err := c.KsqlClient.ClustersKsqldbcmV2Api.CreateKsqldbcmV2Cluster(c.ksqlApiContext()).KsqldbcmV2Cluster(cluster).Execute()
7574
return res, errors.CatchCCloudV2Error(err, httpResp)
7675
}
7776

78-
// UpdateKsqlCluster issues PATCH /ksqldbcm/v2/clusters/{id} with {"spec":{"csu": N}}
79-
// to trigger a self-serve cluster resize.
77+
// UpdateKsqlCluster issues PATCH /ksqldbcm/v2/clusters/{id} with
78+
// {"spec":{"environment":{"id":...},"csu":N}} to trigger a self-serve resize.
8079
//
81-
// The PATCH operation is not yet available in ccloud-sdk-go-v2/ksql/v2 — it is
82-
// being added in cc-api PR #2507 (KSQL-14844), after which the SDK needs to be
83-
// regenerated and the ksql module dependency in go.mod bumped. Until that
84-
// lands, calling this method returns a clear, customer-safe error rather than
85-
// an HTTP failure. See KSQL-14849 for the work item.
86-
//
87-
// Wiring instructions once the SDK is regenerated:
88-
//
89-
// cluster := ksqlv2.KsqldbcmV2Cluster{Spec: &ksqlv2.KsqldbcmV2ClusterSpec{Csu: &csu}}
90-
// res, httpResp, err := c.KsqlClient.ClustersKsqldbcmV2Api.
91-
// UpdateKsqldbcmV2Cluster(c.ksqlApiContext(), id).
92-
// KsqldbcmV2ClusterUpdate(cluster).Environment(environmentId).Execute()
93-
// return res, errors.CatchCCloudV2Error(err, httpResp)
80+
// Currently wired against ccloud-sdk-go-v2-internal/ksql (NOT the public
81+
// SDK) — cc-api PR #2507 (KSQL-14844) is held from merge until release-
82+
// ready per the cc-api owners' direction, and per @sgagniere the internal
83+
// SDK can be regenerated from the cc-api branch. Before merging cli #3368
84+
// to main, switch back to the public ccloud-sdk-go-v2/ksql SDK once
85+
// cc-api #2507 merges and the public SDK has a release with
86+
// UpdateKsqldbcmV2Cluster. See KSQL-14849 for the work item.
9487
func (c *Client) UpdateKsqlCluster(id, environmentId string, csu int32) (ksqlv2.KsqldbcmV2Cluster, error) {
95-
_ = id
96-
_ = environmentId
97-
_ = csu
98-
return ksqlv2.KsqldbcmV2Cluster{}, fmt.Errorf(
99-
"ksqlDB cluster update is not yet available in this CLI build. " +
100-
"Please upgrade to a newer version of the Confluent CLI and retry.")
88+
update := ksqlv2.KsqldbcmV2ClusterUpdate{
89+
Spec: &ksqlv2.KsqldbcmV2ClusterSpecUpdate{
90+
Environment: &ksqlv2.GlobalObjectReference{Id: environmentId, Related: "-", ResourceName: "-"},
91+
Csu: &csu,
92+
},
93+
}
94+
res, httpResp, err := c.KsqlClient.ClustersKsqldbcmV2Api.
95+
UpdateKsqldbcmV2Cluster(c.ksqlApiContext(), id).
96+
KsqldbcmV2ClusterUpdate(update).
97+
Execute()
98+
return res, errors.CatchCCloudV2Error(err, httpResp)
10199
}

test/test-server/ksql_handlers.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ import (
88
"github.com/gorilla/mux"
99
"github.com/stretchr/testify/require"
1010

11-
ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2/ksql/v2"
11+
ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2-internal/ksql/v2"
1212
)
1313

1414
var ksqlCluster1 = ksqlv2.KsqldbcmV2Cluster{
1515
Id: ksqlv2.PtrString("lksqlc-ksql5"),
1616
Spec: &ksqlv2.KsqldbcmV2ClusterSpec{
1717
DisplayName: ksqlv2.PtrString("account ksql"),
18-
KafkaCluster: &ksqlv2.ObjectReference{
18+
KafkaCluster: &ksqlv2.EnvScopedObjectReference{
1919
Id: "lkc-qwert",
2020
Environment: ksqlv2.PtrString("env-12345"),
2121
},
22-
Environment: &ksqlv2.ObjectReference{Id: "env-12345"},
22+
Environment: &ksqlv2.GlobalObjectReference{Id: "env-12345"},
2323
UseDetailedProcessingLog: ksqlv2.PtrBool(true),
2424
},
2525
Status: &ksqlv2.KsqldbcmV2ClusterStatus{
@@ -34,11 +34,11 @@ var ksqlCluster2 = ksqlv2.KsqldbcmV2Cluster{
3434
Id: ksqlv2.PtrString("lksqlc-woooo"),
3535
Spec: &ksqlv2.KsqldbcmV2ClusterSpec{
3636
DisplayName: ksqlv2.PtrString("kay cee queue elle"),
37-
KafkaCluster: &ksqlv2.ObjectReference{
37+
KafkaCluster: &ksqlv2.EnvScopedObjectReference{
3838
Id: "lkc-zxcvb",
3939
Environment: ksqlv2.PtrString("env-12345"),
4040
},
41-
Environment: &ksqlv2.ObjectReference{Id: "env-12345"},
41+
Environment: &ksqlv2.GlobalObjectReference{Id: "env-12345"},
4242
},
4343
Status: &ksqlv2.KsqldbcmV2ClusterStatus{
4444
HttpEndpoint: ksqlv2.PtrString("SASL_SSL://ksql-endpoint"),
@@ -52,11 +52,11 @@ var ksqlClusterForDetailedProcessingLogFalse = ksqlv2.KsqldbcmV2Cluster{
5252
Id: ksqlv2.PtrString("lksqlc-woooo"),
5353
Spec: &ksqlv2.KsqldbcmV2ClusterSpec{
5454
DisplayName: ksqlv2.PtrString("kay cee queue elle"),
55-
KafkaCluster: &ksqlv2.ObjectReference{
55+
KafkaCluster: &ksqlv2.EnvScopedObjectReference{
5656
Id: "lkc-zxcvb",
5757
Environment: ksqlv2.PtrString("env-12345"),
5858
},
59-
Environment: &ksqlv2.ObjectReference{Id: "env-12345"},
59+
Environment: &ksqlv2.GlobalObjectReference{Id: "env-12345"},
6060
UseDetailedProcessingLog: ksqlv2.PtrBool(false),
6161
},
6262
Status: &ksqlv2.KsqldbcmV2ClusterStatus{
@@ -121,12 +121,12 @@ func handleKsqlCluster(t *testing.T) http.HandlerFunc {
121121
Id: ksqlv2.PtrString("lksqlc-ksql1"),
122122
Spec: &ksqlv2.KsqldbcmV2ClusterSpec{
123123
DisplayName: ksqlv2.PtrString("account ksql"),
124-
KafkaCluster: &ksqlv2.ObjectReference{
124+
KafkaCluster: &ksqlv2.EnvScopedObjectReference{
125125
Id: "lkc-12345",
126126
Environment: ksqlv2.PtrString("env-12345"),
127127
},
128-
CredentialIdentity: &ksqlv2.ObjectReference{Id: "u-123456"},
129-
Environment: &ksqlv2.ObjectReference{Id: "env-12345"},
128+
CredentialIdentity: &ksqlv2.TypedGlobalObjectReference{Id: "u-123456"},
129+
Environment: &ksqlv2.GlobalObjectReference{Id: "env-12345"},
130130
},
131131
Status: &ksqlv2.KsqldbcmV2ClusterStatus{
132132
HttpEndpoint: ksqlv2.PtrString("SASL_SSL://ksql-endpoint"),
@@ -140,12 +140,12 @@ func handleKsqlCluster(t *testing.T) http.HandlerFunc {
140140
Id: ksqlv2.PtrString("lksqlc-12345"),
141141
Spec: &ksqlv2.KsqldbcmV2ClusterSpec{
142142
DisplayName: ksqlv2.PtrString("account ksql"),
143-
KafkaCluster: &ksqlv2.ObjectReference{
143+
KafkaCluster: &ksqlv2.EnvScopedObjectReference{
144144
Id: "lkc-abcde",
145145
Environment: ksqlv2.PtrString("env-12345"),
146146
},
147-
Environment: &ksqlv2.ObjectReference{Id: "env-12345"},
148-
CredentialIdentity: ksqlv2.NewObjectReference("sa-12345", "", ""),
147+
Environment: &ksqlv2.GlobalObjectReference{Id: "env-12345"},
148+
CredentialIdentity: ksqlv2.NewTypedGlobalObjectReference("sa-12345", "", ""),
149149
},
150150
Status: &ksqlv2.KsqldbcmV2ClusterStatus{
151151
HttpEndpoint: ksqlv2.PtrString("SASL_SSL://ksql-endpoint"),

0 commit comments

Comments
 (0)