operator icon indicating copy to clipboard operation
operator copied to clipboard

Define GitOps Spec without interface{}

Open dgoel-px opened this issue 7 months ago • 1 comments

What this PR does / why we need it: Codegen fails if interface{} is used with

Generating deepcopy funcs
F0716 23:46:57.357189   17804 deepcopy.go:759] DeepCopy of "interface{}" is unsupported. Instead, use named interfaces with DeepCopy<named-interface> as one of the methods.
Makefile:175: recipe for target 'codegen' failed

Now fixed

root@dgoel-dev-0:~/git/go/src/github.com/libopenstorage/operator (fix_gitops_rm_interface)$ make codegen
go run sigs.k8s.io/controller-tools/cmd/controller-gen object paths="./pkg/apis/portworx/..."
go run sigs.k8s.io/controller-tools/cmd/controller-gen crd:generateEmbeddedObjectMeta=true paths="./pkg/apis/portworx/..." output:crd:artifacts:config=deploy/crds
Generating CRD
(GOFLAGS="" hack/update-codegen.sh)
Generating deepcopy funcs
Generating clientset for core:v1 portworx:v1 at github.com/libopenstorage/operator/pkg/client/clientset
Generating listers for core:v1 portworx:v1 at github.com/libopenstorage/operator/pkg/client/listers
Generating informers for core:v1 portworx:v1 at github.com/libopenstorage/operator/pkg/client/informers
root@dgoel-dev-0:~/git/go/src/github.com/libopenstorage/operator (fix_gitops_rm_interface)$ go test -v -run ^TestAutopilot github.com/libopenstorage/operator/drivers/storage/portworx > test.out
root@dgoel-dev-0:~/git/go/src/github.com/libopenstorage/operator (fix_gitops_rm_interface)$ grep "\-\-\- PASS: TestAutopilot" test.out
--- PASS: TestAutopilotInstall (0.03s)
--- PASS: TestAutopilotInstallIncorrectSpec (0.00s)
--- PASS: TestAutopilotWithoutImage (0.00s)
--- PASS: TestAutopilotWithEnvironmentVariables (0.00s)
--- PASS: TestAutopilotWithTLSEnabled (0.02s)
--- PASS: TestAutopilotWithDesiredImage (0.01s)
--- PASS: TestAutopilotImageChange (0.01s)
--- PASS: TestAutopilotArgumentsChange (0.01s)
--- PASS: TestAutopilotConfigArgumentsChange (0.00s)
--- PASS: TestAutopilotEnvVarsChange (0.01s)
--- PASS: TestAutopilotResources (0.01s)
--- PASS: TestAutopilotCPUChange (0.00s)
--- PASS: TestAutopilotInvalidCPU (0.00s)
--- PASS: TestAutopilotSecurityContext (0.00s)
--- PASS: TestAutopilotVolumesChange (0.04s)
--- PASS: TestAutopilotInstallAndUninstallOnOpenshift414 (0.01s)
--- PASS: TestAutopilotWithOCPSecretNotFound (0.01s)
--- PASS: TestAutopilotProviderURLOnOCP414 (0.00s)
--- PASS: TestAutopilotInstallAndUninstallOnOpenshift415 (0.01s)

dgoel-px avatar Jul 16 '24 23:07 dgoel-px