Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Jan 1, 2024
1 parent 6f5a8df commit ef30863
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
needs: build
strategy:
matrix:
k8s: [v1.20.15, v1.21.14, v1.22.15, v1.23.13, v1.24.7, v1.25.3, v1.26.0]
k8s: [v1.20.15, v1.21.14, v1.22.15, v1.23.13, v1.24.7, v1.25.3, v1.26.3, v1.27.1, v1.28.0, v1.29.0]
steps:
- uses: actions/checkout@v1

Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ BIN_PLATFORMS := $(DOCKER_PLATFORMS) windows/amd64 darwin/amd64
OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS))
ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))

BASEIMAGE_PROD ?= gcr.io/distroless/static-debian11
BASEIMAGE_DBG ?= debian:bullseye
BASEIMAGE_PROD ?= gcr.io/distroless/static-debian12
BASEIMAGE_DBG ?= debian:bookworm

GO_VERSION ?= 1.21
BUILD_IMAGE ?= ghcr.io/appscode/golang-dev:$(GO_VERSION)
Expand Down Expand Up @@ -118,6 +118,7 @@ clientset:
# for EAS types
@rm -rf ./apis/repositories/v1alpha1/zz_generated.conversion.go
@docker run --rm \
-u $$(id -u):$$(id -g) \
-v /tmp:/.cache \
-v $$(pwd):$(DOCKER_REPO_ROOT) \
-w $(DOCKER_REPO_ROOT) \
Expand All @@ -133,6 +134,7 @@ clientset:
--go-header-file "./hack/license/go.txt"
# for both CRD and EAS types
@docker run --rm \
-u $$(id -u):$$(id -g) \
-v /tmp:/.cache \
-v $$(pwd):$(DOCKER_REPO_ROOT) \
-w $(DOCKER_REPO_ROOT) \
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
k8s.io/klog/v2 v2.110.1
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00
kmodules.xyz/client-go v0.29.3
kmodules.xyz/crd-schema-fuzz v0.29.0
kmodules.xyz/crd-schema-fuzz v0.29.1
kmodules.xyz/custom-resources v0.29.0
kmodules.xyz/objectstore-api v0.29.0
kmodules.xyz/offshoot-api v0.29.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSn
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
kmodules.xyz/client-go v0.29.3 h1:vkQz4zaqWZ5wk+YQwl+C2LhzTXuJZcCUMvPpwdAzGTo=
kmodules.xyz/client-go v0.29.3/go.mod h1:xWlS/1zWkx1sIKCAkzULy9570mHZYi2exDECEoP1ek4=
kmodules.xyz/crd-schema-fuzz v0.29.0 h1:s6ATG46aWyP+SoBQU00/kL/7AS2AEWwkSPwVjU512vM=
kmodules.xyz/crd-schema-fuzz v0.29.0/go.mod h1:n708z9YQqLMP2KNLQVgBcRJw1QpSWLvpNCEi+KJDOYE=
kmodules.xyz/crd-schema-fuzz v0.29.1 h1:zJTlWYOrT5dsVVHW8HGcnR/vaWfxQfNh11QwTtkYpcs=
kmodules.xyz/crd-schema-fuzz v0.29.1/go.mod h1:n708z9YQqLMP2KNLQVgBcRJw1QpSWLvpNCEi+KJDOYE=
kmodules.xyz/custom-resources v0.29.0 h1:RaDM2+wSVXiwIvLqmkTVYpwoH83AC8wruXe2p2rOZNY=
kmodules.xyz/custom-resources v0.29.0/go.mod h1:MzZyXtxdg1PDxGk3RTTO1Xv3KiVqZnIonSwmxVbagOY=
kmodules.xyz/objectstore-api v0.29.0 h1:dK53fQXdoboyW/EyBBAMjykT8u7jstKrM1DS4RJvhEU=
Expand Down
10 changes: 9 additions & 1 deletion vendor/kmodules.xyz/crd-schema-fuzz/fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package crdfuzz
import (
"math/rand"
"os"
"strings"
"testing"

"github.com/google/go-cmp/cmp"
Expand Down Expand Up @@ -57,7 +58,14 @@ func SchemaFuzzTestForObject(t *testing.T, scheme *runtime.Scheme, obj runtime.O
t.Fatalf("Failed to convert type to `runtime.Unstructured`: %v", err)
return
}
structuralpruning.Prune(pruned, schema, true)
unknownFieldPaths := structuralpruning.PruneWithOptions(obj, schema, true, structuralschema.UnknownFieldPathOptions{
TrackUnknownFieldPaths: true,
ParentPath: nil,
UnknownFieldPaths: nil,
})
if len(unknownFieldPaths) > 0 {
t.Fatalf("unknownFieldPaths: %s", strings.Join(unknownFieldPaths, ","))
}
if !cmp.Equal(unstructuredFuzzed, pruned, cmp.Transformer("ObjectMeta", func(m map[string]interface{}) map[string]interface{} {
if m["creationTimestamp"] == nil {
delete(m, "creationTimestamp")
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ kmodules.xyz/client-go/core/v1
kmodules.xyz/client-go/meta
kmodules.xyz/client-go/openapi
kmodules.xyz/client-go/tools/exec
# kmodules.xyz/crd-schema-fuzz v0.29.0
# kmodules.xyz/crd-schema-fuzz v0.29.1
## explicit; go 1.21.5
kmodules.xyz/crd-schema-fuzz
# kmodules.xyz/custom-resources v0.29.0
Expand Down

0 comments on commit ef30863

Please sign in to comment.