Skip to content

operator-sdk new app-operator failed #1392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ligc opened this issue May 6, 2019 · 5 comments
Closed

operator-sdk new app-operator failed #1392

ligc opened this issue May 6, 2019 · 5 comments
Labels
triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@ligc
Copy link

ligc commented May 6, 2019

Bug Report

What did you do?
Failed to new an operator with operator-sdk CLI. The same(similiar) error with both v0.7.0 and master branch. I was able to run the "operator-sdk new" command successfully a while ago on the same node, but it does not work any more.

What did you see instead? Under which circumstances?

[root@openshift-single-node example-inc]# operator-sdk new app-operator --verbose
DEBU[0000] Debug logging is set
INFO[0000] Creating new Go operator 'app-operator'.
INFO[0000] Created Gopkg.toml
INFO[0000] Created cmd/manager/main.go
INFO[0000] Created build/Dockerfile
INFO[0000] Created build/bin/entrypoint
INFO[0000] Created build/bin/user_setup
INFO[0000] Created deploy/service_account.yaml
INFO[0000] Created deploy/role.yaml
INFO[0000] Created deploy/role_binding.yaml
INFO[0000] Created deploy/operator.yaml
INFO[0000] Created pkg/apis/apis.go
INFO[0000] Created pkg/controller/controller.go
INFO[0000] Created version/version.go
INFO[0000] Created .gitignore
INFO[0000] Running dep ensure ...
DEBU[0000] Running []string{"dep", "ensure", "-v"}
Root project is "github.com/example-inc/app-operator"
 4 transitively valid internal packages
 21 external packages imported from 9 projects
(0)   ✓ select (root)
(1)	? attempt k8s.io/gengo with 1 pkgs; 1 versions to try
(1)	    try k8s.io/gengo@master
(1)	✓ select k8s.io/gengo@master w/5 pkgs
(2)	? attempt k8s.io/klog with 1 pkgs; 4 versions to try
(2)	    try k8s.io/[email protected]
(2)	✓ select k8s.io/[email protected] w/1 pkgs
(3)	? attempt sigs.k8s.io/controller-tools with 1 pkgs; 18 versions to try
(3)	    try sigs.k8s.io/controller-tools@9d55346c2bde73fb3326ac22eac2e5210a730207
(3)	✓ select sigs.k8s.io/controller-tools@9d55346c2bde73fb3326ac22eac2e5210a730207 w/6 pkgs
(4)	? revisit k8s.io/gengo to add 4 pkgs
(4)	  ✓ include 4 more pkgs from k8s.io/gengo@master
(4)	? attempt golang.org/x/tools with 1 pkgs; 12 versions to try
(5)	    try golang.org/x/tools@master
(5)	✗   unable to update checked out version: fatal: reference is not a tree: 3b6f9c0030f769fa3ded8a7f0d9420c71ac20caf
(5)	  : command failed: [git checkout 3b6f9c0030f769fa3ded8a7f0d9420c71ac20caf]: exit status 128
(5)	    try golang.org/x/[email protected]
(5)	✓ select golang.org/x/[email protected] w/2 pkgs
(5)	? attempt github.com/ghodss/yaml with 1 pkgs; 3 versions to try
(6)	    try github.com/ghodss/[email protected]
(6)	✓ select github.com/ghodss/[email protected] w/1 pkgs
(6)	? attempt github.com/spf13/pflag with 1 pkgs; 6 versions to try
(7)	    try github.com/spf13/[email protected]
(7)	✓ select github.com/spf13/[email protected] w/1 pkgs
(7)	? attempt github.com/spf13/afero with 1 pkgs; 13 versions to try
(8)	    try github.com/spf13/[email protected]
(8)	✓ select github.com/spf13/[email protected] w/2 pkgs
(8)	? attempt gopkg.in/yaml.v2 with 1 pkgs; 7 versions to try
(9)	    try gopkg.in/[email protected]
(9)	✓ select gopkg.in/[email protected] w/1 pkgs
(9)	? attempt sigs.k8s.io/controller-runtime with 4 pkgs; 19 versions to try
(10)      try sigs.k8s.io/[email protected]
(10)  ✓ select sigs.k8s.io/[email protected] w/18 pkgs
(10)  ? attempt github.com/go-logr/logr with 1 pkgs; 2 versions to try
(11)      try github.com/go-logr/[email protected]
(11)  ✓ select github.com/go-logr/[email protected] w/1 pkgs
(11)  ? attempt github.com/pkg/errors with 1 pkgs; 14 versions to try
(12)      try github.com/pkg/[email protected]
(12)  ✓ select github.com/pkg/[email protected] w/1 pkgs
(12)  ? attempt github.com/appscode/jsonpatch with 1 pkgs; 3 versions to try
(13)      try github.com/appscode/[email protected]
(13)  ✓ select github.com/appscode/[email protected] w/1 pkgs
(13)  ? attempt golang.org/x/text with 2 pkgs; 8 versions to try
(14)      try golang.org/x/[email protected]
(14)  ✓ select golang.org/x/[email protected] w/6 pkgs
(14)  ? attempt k8s.io/apiextensions-apiserver with 1 pkgs; 231 versions to try
(15)      try k8s.io/apiextensions-apiserver@0fe22c71c47604641d9aa352c785b7912c200562
(15)  ✓ select k8s.io/apiextensions-apiserver@0fe22c71c47604641d9aa352c785b7912c200562 w/2 pkgs
(15)  ? attempt github.com/markbates/inflect with 1 pkgs; 8 versions to try
(16)      try github.com/markbates/[email protected]
(16)  ✓ select github.com/markbates/[email protected] w/1 pkgs
(16)  ? attempt github.com/go-logr/zapr with 1 pkgs; 3 versions to try
(17)      try github.com/go-logr/[email protected]
(17)  ✓ select github.com/go-logr/[email protected] w/1 pkgs
(17)  ? attempt k8s.io/kube-openapi with 1 pkgs; 6 versions to try
(18)      try k8s.io/kube-openapi@0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803
(18)  ✓ select k8s.io/kube-openapi@0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803 w/6 pkgs
(18)  ? revisit k8s.io/gengo to add 1 pkgs
(19)    ✓ include 1 more pkgs from k8s.io/gengo@master
(18)  ? attempt github.com/golang/glog with 1 pkgs; 1 versions to try
(20)      try github.com/golang/glog@master
(20)  ✓ select github.com/golang/glog@master w/1 pkgs
(19)  ? attempt k8s.io/apimachinery with 1 pkgs; 232 versions to try
(21)      try k8s.io/apimachinery@2b1284ed4c93a43499e781493253e2ac5959c4fd
(21)  ✓ select k8s.io/apimachinery@2b1284ed4c93a43499e781493253e2ac5959c4fd w/10 pkgs
(20)  ? attempt github.com/go-openapi/spec with 1 pkgs; 12 versions to try
(22)      try github.com/go-openapi/[email protected]
(23)  ✗   github.com/go-openapi/[email protected] not allowed by constraint master:
(23)      master from k8s.io/kube-openapi@0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803
(22)      try github.com/go-openapi/[email protected]
(23)  ✗   github.com/go-openapi/[email protected] not allowed by constraint master:
(23)      master from k8s.io/kube-openapi@0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803
(22)      try github.com/go-openapi/[email protected]
(23)  ✗   github.com/go-openapi/[email protected] not allowed by constraint master:
(23)      master from k8s.io/kube-openapi@0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803
(22)      try github.com/go-openapi/[email protected]
(23)  ✗   github.com/go-openapi/[email protected] not allowed by constraint master:
(23)      master from k8s.io/kube-openapi@0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803
(22)      try github.com/go-openapi/[email protected]
(23)  ✗   github.com/go-openapi/[email protected] not allowed by constraint master:
(23)      master from k8s.io/kube-openapi@0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803
(22)      try github.com/go-openapi/[email protected]
(23)  ✗   github.com/go-openapi/[email protected] not allowed by constraint master:
(23)      master from k8s.io/kube-openapi@0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803
(22)      try github.com/go-openapi/[email protected]
(23)  ✗   github.com/go-openapi/[email protected] not allowed by constraint master:
(23)      master from k8s.io/kube-openapi@0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803
(22)      try github.com/go-openapi/spec@master
(22)  ✓ select github.com/go-openapi/spec@master w/1 pkgs
(21)  ? attempt github.com/go-openapi/jsonpointer with 1 pkgs; 8 versions to try
(23)      try github.com/go-openapi/[email protected]
(23)  ✓ select github.com/go-openapi/[email protected] w/1 pkgs
(22)  ? attempt k8s.io/code-generator with 5 pkgs; 208 versions to try
(24)      try k8s.io/code-generator@c2090bec4d9b1fb25de3812f868accc2bc9ecbae
(24)  ✓ select k8s.io/code-generator@c2090bec4d9b1fb25de3812f868accc2bc9ecbae w/20 pkgs
(23)  ? revisit k8s.io/gengo to add 1 pkgs
(25)    ✓ include 7 more pkgs from k8s.io/gengo@master
(23)  ? attempt github.com/operator-framework/operator-sdk with 6 pkgs; 26 versions to try
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/operator-sdk@master
(26)  ✗   unable to update checked out version: fatal: reference is not a tree: 6aac3b6efddd6824ea8578b5187eb360c42b1e63
(26)    : command failed: [git checkout 6aac3b6efddd6824ea8578b5187eb360c42b1e63]: exit status 128
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)      try github.com/operator-framework/[email protected]
(27)  ✗   github.com/operator-framework/[email protected] not allowed by constraint master:
(27)      master from (root)
(26)    ← no more versions of github.com/operator-framework/operator-sdk to try; begin backtrack
(25)  ← backtrack: popped 7 pkgs from k8s.io/gengo
(24)  ← backtrack: no more versions of k8s.io/code-generator to try
(23)  ← backtrack: no more versions of github.com/go-openapi/jsonpointer to try
(22)  ← backtrack: no more versions of github.com/go-openapi/spec to try
(21)  ← backtrack: no more versions of k8s.io/apimachinery to try
(20)  ← backtrack: no more versions of github.com/golang/glog to try
(19)  ← backtrack: popped 1 pkgs from k8s.io/gengo
(18)  ← backtrack: no more versions of k8s.io/kube-openapi to try
(17)    ? continue k8s.io/kube-openapi with 6 pkgs; 5 more versions to try
(18)      try k8s.io/kube-openapi@master
(19)  ✗   k8s.io/kube-openapi@master not allowed by constraint 0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803:
(19)      0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803 from (root)
(18)      try k8s.io/kube-openapi@feature-serverside-apply
(19)  ✗   k8s.io/kube-openapi@feature-serverside-apply not allowed by constraint 0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803:
(19)      0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803 from (root)
(18)      try k8s.io/[email protected]
(19)  ✗   k8s.io/[email protected] not allowed by constraint 0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803:
(19)      0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803 from (root)
(18)      try k8s.io/[email protected]
(19)  ✗   k8s.io/[email protected] not allowed by constraint 0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803:
(19)      0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803 from (root)
(18)      try k8s.io/[email protected]
(19)  ✗   k8s.io/[email protected] not allowed by constraint 0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803:
(19)      0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803 from (root)
(18)  ← backtrack: no more versions of k8s.io/kube-openapi to try
(17)  ← backtrack: no more versions of github.com/go-logr/zapr to try
(16)  ← backtrack: no more versions of github.com/markbates/inflect to try
(15)  ← backtrack: no more versions of k8s.io/apiextensions-apiserver to try
(14)  ← backtrack: no more versions of golang.org/x/text to try
(13)  ← backtrack: no more versions of github.com/appscode/jsonpatch to try
(12)  ← backtrack: no more versions of github.com/pkg/errors to try
(11)  ← backtrack: no more versions of github.com/go-logr/logr to try
(10)  ← backtrack: no more versions of sigs.k8s.io/controller-runtime to try
(9)	← backtrack: no more versions of gopkg.in/yaml.v2 to try
(8)	← backtrack: no more versions of github.com/spf13/afero to try
(7)	← backtrack: no more versions of github.com/spf13/pflag to try
(6)	← backtrack: no more versions of github.com/ghodss/yaml to try
(5)	← backtrack: no more versions of golang.org/x/tools to try
(4)	← backtrack: popped 4 pkgs from k8s.io/gengo
(3)	← backtrack: no more versions of sigs.k8s.io/controller-tools to try
(2)	← backtrack: no more versions of k8s.io/klog to try
(1)	← backtrack: no more versions of k8s.io/gengo to try
  ✗ solving failed

Solver wall times by segment:
     b-list-versions: 55.759306893s
              b-gmal:  5.728776709s
         b-list-pkgs:  4.318719842s
  b-deduce-proj-root:  1.407784794s
    b-rev-present-in:   60.793015ms
         select-atom:   24.174418ms
            unselect:   23.020986ms
             satisfy:    21.27438ms
            new-atom:    2.203059ms
           backtrack:     995.713µs
         select-root:     828.128µs
               other:       86.52µs
     b-source-exists:      85.288µs
            add-atom:      50.828µs

  TOTAL: 1m7.348100573s

Solving failure: No versions of github.com/operator-framework/operator-sdk met constraints:
	v0.7.0: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.6.0: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.5.0: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.4.1: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.4.0: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.3.0: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.2.1: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.2.0: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.1.1: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.1.0: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.0.7: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.0.6: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.0.5: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.0.4: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.0.3: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.0.2: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.0.1: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	master: unable to update checked out version: fatal: reference is not a tree: 6aac3b6efddd6824ea8578b5187eb360c42b1e63
: command failed: [git checkout 6aac3b6efddd6824ea8578b5187eb360c42b1e63]: exit status 128
	v0.0.7: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.1.x: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.2.x: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.3.x: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.4.x: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.5.x: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.6.x: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
	v0.7.x: Could not introduce github.com/operator-framework/[email protected], as it is not allowed by constraint master from project github.com/example-inc/app-operator.
Error: failed to exec []string{"dep", "ensure", "-v"}: exit status 1
Usage:
  operator-sdk new <project-name> [flags]

Flags:
      --api-version string          Kubernetes apiVersion and has a format of $GROUP_NAME/$VERSION (e.g app.example.com/v1alpha1) - used with "ansible" or "helm" types
      --cluster-scoped              Generate cluster-scoped resources instead of namespace-scoped
      --dep-manager string          Dependency manager the new project will use (choices: "dep") (default "dep")
      --generate-playbook           Generate a playbook skeleton. (Only used for --type ansible)
      --helm-chart string           Initialize helm operator with existing helm chart (<URL>, <repo>/<name>, or local path)
      --helm-chart-repo string      Chart repository URL for the requested helm chart
      --helm-chart-version string   Specific version of the helm chart (default is latest version)
  -h, --help                        help for new
      --kind string                 Kubernetes CustomResourceDefintion kind. (e.g AppService) - used with "ansible" or "helm" types
      --skip-git-init               Do not init the directory as a git repository
      --type string                 Type of operator to initialize (choices: "go", "ansible" or "helm") (default "go")

Global Flags:
      --verbose   Enable verbose logging

Environment

  • operator-sdk version:
[root@openshift-single-node ~]# operator-sdk --version
operator-sdk version v0.7.0+git
[root@openshift-single-node ~]#
  • go version:
[root@openshift-single-node example-inc]# go version
go version go1.12.4 linux/amd64
[root@openshift-single-node example-inc]#
  • Kubernetes version information:
[root@openshift-single-node example-inc]# kubectl version
Client Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.0+d4cacc0", GitCommit:"d4cacc0", GitTreeState:"clean", BuildDate:"2018-10-15T09:45:30Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.0+d4cacc0", GitCommit:"d4cacc0", GitTreeState:"clean", BuildDate:"2019-04-16T17:19:57Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}
[root@openshift-single-node example-inc]#
  • Kubernetes cluster kind:

OpenShift Origin 3.11

  • Are you writing your operator in ansible, helm, or go?

I am writing the operator in go

@ligc ligc changed the title operator-sdk new app-operator failed with operator-sdk new app-operator failed May 6, 2019
@lilic
Copy link
Member

lilic commented May 6, 2019

@ligc I tried the current master branch and could not reproduce the problem. What is the version of dep you are using?

@lilic lilic added the triage/needs-information Indicates an issue needs more information in order to work on it. label May 6, 2019
@ligc
Copy link
Author

ligc commented May 6, 2019

@lilic Thanks for looking into this, here is the dep version I am using.

[root@openshift-single-node ~]# dep version
dep:
 version     : v0.5.1
 build date  : 2019-03-11
 git hash    : faa6189
 go version  : go1.12
 go compiler : gc
 platform    : linux/amd64
 features    : ImportDuringSolve=false
[root@openshift-single-node ~]#

it is kind of strange, I was able to create operators a while ago on this same node, but it does not work any more, and I did not remember any change that may affect operator-sdk. Maybe some dep packages on internet was changed?

@lilic
Copy link
Member

lilic commented May 6, 2019

@ligc It's odd as for me it works fine locally. It seems the problem seems to be here:

unable to update checked out version: fatal: reference is not a tree: 6aac3b6efddd6824ea8578b5187eb360c42b1e63
(26)    : command failed: [git checkout 6aac3b6efddd6824ea8578b5187eb360c42b1e63]: exit status 128
(26)      try github.com/operator-framework/[email protected]

This commit exists in operator-sdk, so it must be a dep cache issue. Can you try to do rm -rf $GOPATH/pkg/dep/sources/https---github.1485827954.workers.dev-operator--framework-operator--sdk/ and retry dep ensure -v in the operator root directory? This seems to have solved it for this dep issue golang/dep#484 (comment)

@ligc
Copy link
Author

ligc commented May 6, 2019

I ran the following commands, but it does not seem help, the operator-sdk new app-operator still fails.

rm -rf $GOPATH/pkg/dep/sources/https---github.1485827954.workers.dev-operator--framework-operator--sdk/
cd $GOPATH/src/github.com/operator-framework/operator-sdk/
dep ensure -v 

Inspired by your statement "it must be a dep cache issue", I completely removed the $GOPATH and re-initialized everything, then I could successfully run operator-sdk new app-operator .

I am fine with closing this issue, as I could use rm -rf $GOPATH/* as the workaround, not sure if we want to look further into this issue and try to figure out the root cause. I am currently unable to reproduce this issue any more...

Thanks

@lilic
Copy link
Member

lilic commented May 6, 2019

@ligc I think if you run into this issue next time, updating local master branch, e.g. pulling from master, in $GOPATH/src/github.com/operator-framework/operator-sdk/ should also do the trick as it seems dep was not looking in the cache.

Closing as this is solved.

@lilic lilic closed this as completed May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

2 participants