Skip to content

Instantly share code, notes, and snippets.

@bentito
Last active March 31, 2020 21:21
Show Gist options
  • Save bentito/b1e48b76d12fc707eccccbf58e2229db to your computer and use it in GitHub Desktop.
Save bentito/b1e48b76d12fc707eccccbf58e2229db to your computer and use it in GitHub Desktop.
operator-metering go mod init work
Started with this:
[operator-metering] (master)$ pwd
/Users/btofel/workspace/operator-metering
[operator-metering] (master)$ echo $GOPATH
/tmp
[operator-metering] (master)$ go mod init github.com/operator-framework/operator-metering
go: creating new go.mod: module github.com/operator-framework/operator-metering
go: copying requirements from Gopkg.lock
go: parsing /Users/btofel/workspace/operator-metering/Gopkg.lock: /Users/btofel/workspace/operator-metering/Gopkg.lock: empty [[projects]] stanza (github.com/operator-framework/operator-lifecycle-manager)
@bentito
Copy link
Author

bentito commented Mar 31, 2020

retried the olm go get:
go get -u -d github.com/operator-framework/operator-lifecycle-manager@0.12.0 <- least compatible tag

@bentito
Copy link
Author

bentito commented Mar 31, 2020

go mod tidy runs twice without fail. Duh!
go mod vendor run and changes many things in vendor/ as expected

@bentito
Copy link
Author

bentito commented Mar 31, 2020

run hack/update-codegen.sh
run:

[operator-metering] (go_mod)$ go build ./...
# github.com/operator-framework/operator-metering/pkg/generated/clientset/versioned/typed/metering/v1
pkg/generated/clientset/versioned/typed/metering/v1/metering_client.go:87:45: scheme.Codecs.WithoutConversion undefined (type serializer.CodecFactory has no field or method WithoutConversion)```

@bentito
Copy link
Author

bentito commented Mar 31, 2020

[operator-metering] (go_mod)$ git diff go.mod
diff --git a/go.mod b/go.mod
index d4386dc0..11f180cb 100644
--- a/go.mod
+++ b/go.mod
@@ -11,10 +11,16 @@ require (
        github.com/aws/aws-sdk-go v1.25.18
        github.com/beorn7/perks v1.0.1 // indirect
        github.com/davecgh/go-spew v1.1.1
+       github.com/emicklei/go-restful v2.12.0+incompatible // indirect
        github.com/go-chi/chi v3.3.2+incompatible
-       github.com/golang/mock v1.3.1
+       github.com/go-openapi/spec v0.19.7 // indirect
+       github.com/go-openapi/swag v0.19.8 // indirect
+       github.com/golang/mock v1.4.3
        github.com/gophercloud/gophercloud v0.3.0 // indirect
        github.com/huandu/xstrings v1.3.0 // indirect
+       github.com/json-iterator/go v1.1.9 // indirect
+       github.com/mailru/easyjson v0.7.1 // indirect
+       github.com/onsi/gomega v1.9.0 // indirect
        github.com/openshift/client-go v0.0.0-20190923180330-3b6373338c9b
        // olm 0.12.0
        github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190926160646-a61144936680
@@ -27,12 +33,16 @@ require (
        github.com/spf13/pflag v1.0.5
        github.com/stretchr/testify v1.4.0
        github.com/taozle/go-hive-driver v0.0.0-20181206100408-79951111cb07
-       golang.org/x/sync v0.0.0-20190423024810-112230192c58
+       golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e // indirect
+       golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
+       golang.org/x/tools v0.0.0-20200331202046-9d5940d49312 // indirect
        k8s.io/api v0.17.1
        k8s.io/apiextensions-apiserver v0.17.1
        k8s.io/apimachinery v0.17.1
        k8s.io/client-go v8.0.0+incompatible
-       k8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269
+       k8s.io/code-generator v0.18.0
+       k8s.io/gengo v0.0.0-20200205140755-e0e292d8aa12 // indirect
+       k8s.io/kube-openapi v0.0.0-20200204173128-addea2498afe // indirect
 )

 replace (

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment