Skip to content

Commit

Permalink
upgrade sdk-go
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Liu <liuweixa@redhat.com>
  • Loading branch information
skeeey committed Jun 18, 2024
1 parent 1227b71 commit 9407267
Show file tree
Hide file tree
Showing 18 changed files with 201 additions and 122 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ require (
k8s.io/utils v0.0.0-20240310230437-4693a0247e57
open-cluster-management.io/addon-framework v0.9.1-0.20240419070222-e703fc5a2556
open-cluster-management.io/api v0.13.1-0.20240605083248-f9e7f50520fc
open-cluster-management.io/sdk-go v0.13.1-0.20240614070053-a01091a14da7
open-cluster-management.io/sdk-go v0.13.1-0.20240618022514-b2c1dd175afd
sigs.k8s.io/controller-runtime v0.17.3
sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ open-cluster-management.io/addon-framework v0.9.1-0.20240419070222-e703fc5a2556
open-cluster-management.io/addon-framework v0.9.1-0.20240419070222-e703fc5a2556/go.mod h1:HayKCznnlyW+0dUJQGj5sNR6i3tvylSySD3YnvZkBtY=
open-cluster-management.io/api v0.13.1-0.20240605083248-f9e7f50520fc h1:tcfncubZRFphYtDXBE7ApBNlSnj1RNazhW+8F01XYYg=
open-cluster-management.io/api v0.13.1-0.20240605083248-f9e7f50520fc/go.mod h1:ltijKJhDifrPH0csvCUmFt5lzaERv+BBfh6X3l83rT0=
open-cluster-management.io/sdk-go v0.13.1-0.20240614070053-a01091a14da7 h1:/Tit/ldsK/+gwYpljBPzOGpFwdN44+yIOiHO+kja5XU=
open-cluster-management.io/sdk-go v0.13.1-0.20240614070053-a01091a14da7/go.mod h1:muWzHWsgK8IsopltwTnsBjf4DN9IcC9rF0G2uEq/Pjw=
open-cluster-management.io/sdk-go v0.13.1-0.20240618022514-b2c1dd175afd h1:kTVZOR7bTdh4ID7EoliyGhPR5CItpx8GehN581IxoPA=
open-cluster-management.io/sdk-go v0.13.1-0.20240618022514-b2c1dd175afd/go.mod h1:muWzHWsgK8IsopltwTnsBjf4DN9IcC9rF0G2uEq/Pjw=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 h1:TgtAeesdhpm2SGwkQasmbeqDo8th5wOBA5h/AjTKA4I=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0/go.mod h1:VHVDI/KrK4fjnV61bE2g3sA7tiETLn8sooImelsCx3Y=
sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk=
Expand Down
3 changes: 1 addition & 2 deletions test/integration/cloudevents/source/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ import (
workv1 "open-cluster-management.io/api/work/v1"
"open-cluster-management.io/sdk-go/pkg/cloudevents/generic"
"open-cluster-management.io/sdk-go/pkg/cloudevents/generic/types"
"open-cluster-management.io/sdk-go/pkg/cloudevents/work/watcher"
)

const ManifestWorkFinalizer = "cluster.open-cluster-management.io/manifest-work-cleanup"

func newManifestWorkStatusHandler(lister workv1lister.ManifestWorkLister, watcher *watcher.ManifestWorkWatcher) generic.ResourceHandler[*workv1.ManifestWork] {
func newManifestWorkStatusHandler(lister workv1lister.ManifestWorkLister, watcher *ManifestWorkWatcher) generic.ResourceHandler[*workv1.ManifestWork] {
return func(action types.ResourceAction, work *workv1.ManifestWork) error {
switch action {
case types.StatusModified:
Expand Down
5 changes: 2 additions & 3 deletions test/integration/cloudevents/source/manifestwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"open-cluster-management.io/sdk-go/pkg/cloudevents/generic"
"open-cluster-management.io/sdk-go/pkg/cloudevents/generic/types"
"open-cluster-management.io/sdk-go/pkg/cloudevents/work/payload"
"open-cluster-management.io/sdk-go/pkg/cloudevents/work/watcher"
)

const ManifestsDeleted = "Deleted"
Expand All @@ -32,7 +31,7 @@ const (

type manifestWorkSourceClient struct {
cloudEventsClient *generic.CloudEventSourceClient[*workv1.ManifestWork]
watcher *watcher.ManifestWorkWatcher
watcher *ManifestWorkWatcher
lister workv1lister.ManifestWorkLister
namespace string
}
Expand All @@ -42,7 +41,7 @@ var manifestWorkGR = schema.GroupResource{Group: workv1.GroupName, Resource: "ma
var _ workv1client.ManifestWorkInterface = &manifestWorkSourceClient{}

func newManifestWorkSourceClient(cloudEventsClient *generic.CloudEventSourceClient[*workv1.ManifestWork],
watcher *watcher.ManifestWorkWatcher) *manifestWorkSourceClient {
watcher *ManifestWorkWatcher) *manifestWorkSourceClient {
return &manifestWorkSourceClient{
cloudEventsClient: cloudEventsClient,
watcher: watcher,
Expand Down
3 changes: 1 addition & 2 deletions test/integration/cloudevents/source/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"open-cluster-management.io/sdk-go/pkg/cloudevents/generic/options/mqtt"
"open-cluster-management.io/sdk-go/pkg/cloudevents/generic/types"
"open-cluster-management.io/sdk-go/pkg/cloudevents/work"
"open-cluster-management.io/sdk-go/pkg/cloudevents/work/watcher"
)

const (
Expand Down Expand Up @@ -89,7 +88,7 @@ func (m *MQTTSource) Start(ctx context.Context) error {

// build a source client
workLister := &manifestWorkLister{}
watcher := watcher.NewManifestWorkWatcher()
watcher := NewManifestWorkWatcher()
mqttOptions, err := mqtt.BuildMQTTOptionsFromFlags(m.configFile)
if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package watcher
package source

import (
"sync"
Expand Down
3 changes: 1 addition & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,7 @@ open-cluster-management.io/api/utils/work/v1/workapplier
open-cluster-management.io/api/utils/work/v1/workvalidator
open-cluster-management.io/api/work/v1
open-cluster-management.io/api/work/v1alpha1
# open-cluster-management.io/sdk-go v0.13.1-0.20240614070053-a01091a14da7
# open-cluster-management.io/sdk-go v0.13.1-0.20240618022514-b2c1dd175afd
## explicit; go 1.21
open-cluster-management.io/sdk-go/pkg/apis/cluster/v1alpha1
open-cluster-management.io/sdk-go/pkg/apis/cluster/v1beta1
Expand Down Expand Up @@ -1620,7 +1620,6 @@ open-cluster-management.io/sdk-go/pkg/cloudevents/work/source/codec
open-cluster-management.io/sdk-go/pkg/cloudevents/work/source/lister
open-cluster-management.io/sdk-go/pkg/cloudevents/work/store
open-cluster-management.io/sdk-go/pkg/cloudevents/work/utils
open-cluster-management.io/sdk-go/pkg/cloudevents/work/watcher
open-cluster-management.io/sdk-go/pkg/patcher
# sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0
## explicit; go 1.20
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9407267

Please sign in to comment.