Skip to content

Commit

Permalink
Merge pull request #22 from kubescape/bump
Browse files Browse the repository at this point in the history
bump utils-k8s-go
  • Loading branch information
matthyx authored Dec 13, 2023
2 parents e09a1cc + ad0df2e commit 9ff3dbc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions adapters/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ func (m *MockAdapter) PutObject(_ context.Context, id domain.KindName, object []
// this reference implementation should be implemented in the ingester on the backend side
func (m *MockAdapter) saveIfNewer(id domain.KindName, newObject []byte) {
if m.checkResourceVersion {
err, _, _, _, _, resourceVersion := armometadata.ExtractMetadataFromJsonBytes(newObject)
err, _, _, _, _, resourceVersion, _, _ := armometadata.ExtractMetadataFromJsonBytes(newObject)
if err == nil {
if oldObject, ok := m.Resources[id.String()]; ok {
err, _, _, _, _, oldResourceVersion := armometadata.ExtractMetadataFromJsonBytes(oldObject)
err, _, _, _, _, oldResourceVersion, _, _ := armometadata.ExtractMetadataFromJsonBytes(oldObject)
if err == nil {
if !utils.StringValueBigger(resourceVersion, oldResourceVersion) {
return
Expand Down
6 changes: 5 additions & 1 deletion core/synchronizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,15 @@ func (s *Synchronizer) listenForSyncEvents(ctx context.Context) error {
logger.L().Ctx(ctx).Error("cannot unmarshal message", helpers.Error(err))
return
}
var kind string
if generic.Kind != nil {
kind = generic.Kind.String()
}
logger.L().Debug("received message",
helpers.String("account", clientId.Account),
helpers.String("cluster", clientId.Cluster),
helpers.Interface("event", generic.Event.Value()),
helpers.String("kind", generic.Kind.String()),
helpers.String("kind", kind),
helpers.String("msgid", generic.MsgId),
helpers.Int("depth", generic.Depth))
// check message depth and ID
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ go 1.20
require (
github.com/SergJa/jsonhash v0.0.0-20210531165746-fc45f346aa74
github.com/apache/pulsar-client-go v0.11.1
github.com/armosec/utils-k8s-go v0.0.21
github.com/armosec/armoapi-go v0.0.254
github.com/armosec/utils-k8s-go v0.0.22
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/evanphx/json-patch v5.7.0+incompatible
github.com/gobwas/ws v1.3.1
Expand All @@ -20,6 +21,7 @@ require (
github.com/stretchr/testify v1.8.4
k8s.io/apimachinery v0.28.4
k8s.io/client-go v0.28.4
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
)

require (
Expand All @@ -28,7 +30,6 @@ require (
github.com/AthenZ/athenz v1.10.39 // indirect
github.com/DataDog/zstd v1.5.0 // indirect
github.com/ardielle/ardielle-go v1.5.2 // indirect
github.com/armosec/armoapi-go v0.0.254 // indirect
github.com/armosec/gojay v1.2.15 // indirect
github.com/avast/retry-go v3.0.0+incompatible // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand Down Expand Up @@ -120,7 +121,6 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.28.4 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ github.com/armosec/armoapi-go v0.0.254 h1:+4fnVHbVTwSQW99t7/XlkQAT2yJ5bPr4HAYIIg
github.com/armosec/armoapi-go v0.0.254/go.mod h1:CJT5iH5VF30zjdQYXaQhsAm8IEHtM1T87HcFVXeLX54=
github.com/armosec/gojay v1.2.15 h1:sSB2vnAvacUNkw9nzUYZKcPzhJOyk6/5LK2JCNdmoZY=
github.com/armosec/gojay v1.2.15/go.mod h1:vzVAaay2TWJAngOpxu8aqLbye9jMgoKleuAOK+xsOts=
github.com/armosec/utils-k8s-go v0.0.21 h1:/3k+TOssKgYMaYKJY4dhvHmPnrzmVAKW9PjNirRSGrY=
github.com/armosec/utils-k8s-go v0.0.21/go.mod h1:CXgkHFgY8xlKN+wiQ8TyjwNj0+VSgj6NolB3itZ2lY8=
github.com/armosec/utils-k8s-go v0.0.22 h1:uK84kVfdV1snbskS7G91hafqSlKyjU1JYjAju6fHUv0=
github.com/armosec/utils-k8s-go v0.0.22/go.mod h1:CXgkHFgY8xlKN+wiQ8TyjwNj0+VSgj6NolB3itZ2lY8=
github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0=
github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY=
github.com/aws/aws-sdk-go v1.32.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
Expand Down

0 comments on commit 9ff3dbc

Please sign in to comment.