Skip to content

Instantly share code, notes, and snippets.

@trstringer
Created October 4, 2018 15:28
Show Gist options
  • Save trstringer/a7a611fb0de8c909d36e8550af0a4c7d to your computer and use it in GitHub Desktop.
Save trstringer/a7a611fb0de8c909d36e8550af0a4c7d to your computer and use it in GitHub Desktop.

Issues starting with custom metrics API server

Initialization

$ cd $GOPATH/src/github.com/trstringer
$ mkdir testing01
$ cd testing01
$ dep init
$ touch main.go

Then in main.go:

package main

import (
	"fmt"
	basecmd "github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/cmd"
)

func main() {
	fmt.Println("Hello world")
}

Then back in the terminal in the working directory of the project:

 $ dep ensure -v
# Gopkg.lock is out of sync with Gopkg.toml and project imports:
github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/cmd: imported or required, but missing from Gopkg.lock's input-imports

Root project is "github.com/trstringer/test01"
 1 transitively valid internal packages
 1 external packages imported from 1 projects
(0)   ✓ select (root)
(1)     ? attempt github.com/kubernetes-incubator/custom-metrics-apiserver with 1 pkgs; 4 versions to try
(1)         try github.com/kubernetes-incubator/custom-metrics-apiserver@master
(1)     ✓ select github.com/kubernetes-incubator/custom-metrics-apiserver@master w/8 pkgs
(2)     ? attempt github.com/golang/glog with 1 pkgs; 1 versions to try
(2)         try github.com/golang/glog@master
(2)     ✓ select github.com/golang/glog@master w/1 pkgs
(3)     ? attempt github.com/emicklei/go-restful-swagger12 with 1 pkgs; 3 versions to try
(3)         try github.com/emicklei/go-restful-swagger12@1.0.1
(3)     ✓ select github.com/emicklei/go-restful-swagger12@1.0.1 w/1 pkgs
(4)     ? attempt github.com/spf13/pflag with 1 pkgs; 6 versions to try
(4)         try github.com/spf13/pflag@v1.0.3
(4)     ✓ select github.com/spf13/pflag@v1.0.3 w/1 pkgs
(5)     ? attempt github.com/googleapis/gnostic with 1 pkgs; 14 versions to try
(5)         try github.com/googleapis/gnostic@v0.2.0
(5)     ✓ select github.com/googleapis/gnostic@v0.2.0 w/3 pkgs
(6)     ? attempt gopkg.in/yaml.v2 with 1 pkgs; 6 versions to try
(6)         try gopkg.in/yaml.v2@v2.2.1
(6)     ✓ select gopkg.in/yaml.v2@v2.2.1 w/1 pkgs
(7)     ? attempt github.com/golang/protobuf with 3 pkgs; 7 versions to try
(7)         try github.com/golang/protobuf@v1.2.0
(7)     ✓ select github.com/golang/protobuf@v1.2.0 w/5 pkgs
(8)     ? attempt github.com/emicklei/go-restful with 1 pkgs; 25 versions to try
(8)         try github.com/emicklei/go-restful@v2.8.0
(8)     ✓ select github.com/emicklei/go-restful@v2.8.0 w/2 pkgs
(9)     ? attempt github.com/json-iterator/go with 1 pkgs; 25 versions to try
(9)         try github.com/json-iterator/go@v1.1.5
(9)     ✓ select github.com/json-iterator/go@v1.1.5 w/1 pkgs
(10)  ? attempt github.com/modern-go/reflect2 with 1 pkgs; 4 versions to try
(10)      try github.com/modern-go/reflect2@1.0.1
(10)  ✓ select github.com/modern-go/reflect2@1.0.1 w/1 pkgs
(11)  ? attempt github.com/modern-go/concurrent with 1 pkgs; 5 versions to try
(11)      try github.com/modern-go/concurrent@1.0.3
(11)  ✓ select github.com/modern-go/concurrent@1.0.3 w/1 pkgs
(12)  ? attempt k8s.io/api with 1 pkgs; 131 versions to try
(12)      try k8s.io/api@master
(12)  ✓ select k8s.io/api@master w/1 pkgs
(13)  ? attempt github.com/gogo/protobuf with 2 pkgs; 26 versions to try
(13)      try github.com/gogo/protobuf@v1.1.1
(13)  ✓ select github.com/gogo/protobuf@v1.1.1 w/2 pkgs
(14)  ? revisit github.com/emicklei/go-restful to add 1 pkgs
(14)    ✓ include 1 more pkgs from github.com/emicklei/go-restful@v2.8.0
(14)  ? attempt k8s.io/apimachinery with 2 pkgs; 155 versions to try
(15)      try k8s.io/apimachinery@master
(15)  ✓ select k8s.io/apimachinery@master w/2 pkgs
(15)  ? revisit k8s.io/apimachinery to add 13 pkgs
(16)    ✓ include 35 more pkgs from k8s.io/apimachinery@master
(15)  ? attempt github.com/google/gofuzz with 1 pkgs; 1 versions to try
(17)      try github.com/google/gofuzz@master
(17)  ✓ select github.com/google/gofuzz@master w/1 pkgs
(16)  ? attempt gopkg.in/inf.v0 with 1 pkgs; 2 versions to try
(18)      try gopkg.in/inf.v0@v0.9.1
(18)  ✓ select gopkg.in/inf.v0@v0.9.1 w/1 pkgs
(17)  ? attempt github.com/ghodss/yaml with 1 pkgs; 3 versions to try
(19)      try github.com/ghodss/yaml@v1.0.0
(19)  ✓ select github.com/ghodss/yaml@v1.0.0 w/1 pkgs
(18)  ? attempt k8s.io/client-go with 9 pkgs; 175 versions to try
(20)      try k8s.io/client-go@v8.0.0
(20)  ✓ select k8s.io/client-go@v8.0.0 w/125 pkgs
(19)  ? revisit k8s.io/api to add 28 pkgs
(21)    ✓ include 29 more pkgs from k8s.io/api@master
(19)  ? revisit k8s.io/apimachinery to add 15 pkgs
(22)    ✓ include 34 more pkgs from k8s.io/apimachinery@master
(19)  ? attempt github.com/gregjones/httpcache with 2 pkgs; 1 versions to try
(23)      try github.com/gregjones/httpcache@master
(23)  ✓ select github.com/gregjones/httpcache@master w/2 pkgs
(20)  ? attempt golang.org/x/time with 1 pkgs; 1 versions to try
(24)      try golang.org/x/time@master
(24)  ✓ select golang.org/x/time@master w/1 pkgs
(21)  ? attempt golang.org/x/crypto with 1 pkgs; 2 versions to try
(25)      try golang.org/x/crypto@master
(25)  ✓ select golang.org/x/crypto@master w/1 pkgs
(22)  ? attempt golang.org/x/sys with 2 pkgs; 2 versions to try
(26)      try golang.org/x/sys@master
(26)  ✓ select golang.org/x/sys@master w/2 pkgs
(23)  ? attempt k8s.io/kube-openapi with 1 pkgs; 5 versions to try
(27)      try k8s.io/kube-openapi@master
(27)  ✓ select k8s.io/kube-openapi@master w/1 pkgs
(24)  ? attempt k8s.io/apiserver with 9 pkgs; 155 versions to try
(28)      try k8s.io/apiserver@master
^CSignal received: waiting for 1 ops to complete...
^C^C^C

It just hangs trying to bring in the dependencies. I virtually did the exact same thing using glide and the same behavior (except glide didn't hang, but it exited with the status "Failed to retrieve a list of dependencies").

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