Merge pull request #70718 from cblecker/godep-round-a-million

Fork godep to fix inconsistent abbreviation size
pull/58/head
k8s-ci-robot 2018-11-07 19:10:45 -08:00 committed by GitHub
commit e998d6c2bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
56 changed files with 328 additions and 382 deletions

563
Godeps/Godeps.json generated

File diff suppressed because it is too large Load Diff

36
Godeps/LICENSES generated
View File

@ -89687,42 +89687,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
================================================================================ ================================================================================
================================================================================
= vendor/github.com/tools/godep licensed under: =
Copyright © 2013 Keith Rarick.
Portions Copyright (c) 2012 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
= vendor/github.com/tools/godep/License 71eb66e9b353dd06ca5a81ce0f469e1a
================================================================================
================================================================================ ================================================================================
= vendor/github.com/ugorji/go/codec licensed under: = = vendor/github.com/ugorji/go/codec licensed under: =

View File

@ -31,5 +31,5 @@ fi
kube::util::ensure_godep_version kube::util::ensure_godep_version
kube::log::status "Downloading dependencies - this might take a while" kube::log::status "Downloading dependencies - this might take a while"
GOPATH="${GOPATH}:${KUBE_ROOT}/staging" godep restore "$@" GOPATH="${GOPATH}:${KUBE_ROOT}/staging" ${KUBE_GODEP:?} restore "$@"
kube::log::status "Done" kube::log::status "Done"

View File

@ -57,7 +57,6 @@ fi
REQUIRED_BINS=( REQUIRED_BINS=(
"github.com/onsi/ginkgo/ginkgo" "github.com/onsi/ginkgo/ginkgo"
"github.com/jteeuwen/go-bindata/go-bindata" "github.com/jteeuwen/go-bindata/go-bindata"
"github.com/tools/godep"
"github.com/client9/misspell/cmd/misspell" "github.com/client9/misspell/cmd/misspell"
"github.com/cloudflare/cfssl/cmd/cfssl" "github.com/cloudflare/cfssl/cmd/cfssl"
"github.com/cloudflare/cfssl/cmd/cfssljson" "github.com/cloudflare/cfssl/cmd/cfssljson"
@ -71,7 +70,7 @@ kube::log::status "Running godep save - this might take a while"
# This uses $(pwd) rather than ${KUBE_ROOT} because KUBE_ROOT will be # This uses $(pwd) rather than ${KUBE_ROOT} because KUBE_ROOT will be
# realpath'ed, and godep barfs ("... is not using a known version control # realpath'ed, and godep barfs ("... is not using a known version control
# system") on our staging dirs. # system") on our staging dirs.
GOPATH="${GOPATH}:$(pwd)/staging" godep save "${REQUIRED_BINS[@]}" GOPATH="${GOPATH}:$(pwd)/staging" ${KUBE_GODEP:?} save "${REQUIRED_BINS[@]}"
# create a symlink in vendor directory pointing to the staging client. This # create a symlink in vendor directory pointing to the staging client. This
# let other packages use the staging client as if it were vendored. # let other packages use the staging client as if it were vendored.

View File

@ -441,28 +441,30 @@ kube::util::ensure_clean_working_dir() {
# Ensure that the given godep version is installed and in the path. Almost # Ensure that the given godep version is installed and in the path. Almost
# nobody should use any version but the default. # nobody should use any version but the default.
#
# Sets:
# KUBE_GODEP: The path to the godep binary
#
kube::util::ensure_godep_version() { kube::util::ensure_godep_version() {
GODEP_VERSION=${1:-"v80"} # this version is known to work local godep_target_version=${1:-"v80-k8s-r1"} # this version is known to work
if [[ "$(godep version 2>/dev/null)" == *"godep ${GODEP_VERSION}"* ]]; then # If KUBE_GODEP is already set, and it's the right version, then use it.
if [[ -n "${KUBE_GODEP:-}" && "$(${KUBE_GODEP:?} version 2>/dev/null)" == *"godep ${godep_target_version}"* ]]; then
kube::log::status "Using ${KUBE_GODEP}"
return return
fi fi
kube::log::status "Installing godep version ${GODEP_VERSION}" # Otherwise, install forked godep
go install k8s.io/kubernetes/vendor/github.com/tools/godep/ kube::log::status "Installing godep version ${godep_target_version}"
if ! which godep >/dev/null 2>&1; then # Run in hermetic GOPATH
kube::log::error "Can't find godep - is your GOPATH 'bin' in your PATH?" kube::golang::setup_env
kube::log::error " GOPATH: ${GOPATH}" go install k8s.io/kubernetes/third_party/forked/godep
kube::log::error " PATH: ${PATH}" export KUBE_GODEP="${KUBE_GOPATH}/bin/godep"
return 1 kube::log::status "Installed ${KUBE_GODEP}"
fi
if [[ "$(godep version 2>/dev/null)" != *"godep ${GODEP_VERSION}"* ]]; then # Verify that the installed godep from fork is what we expect
kube::log::error "Wrong godep version - is your GOPATH 'bin' in your PATH?" if [[ "$(${KUBE_GODEP:?} version 2>/dev/null)" != *"godep ${godep_target_version}"* ]]; then
kube::log::error " expected: godep ${GODEP_VERSION}" kube::log::error "Expected godep ${godep_target_version} from ${KUBE_GODEP}, got $(${KUBE_GODEP:?} version)"
kube::log::error " got: $(godep version)"
kube::log::error " GOPATH: ${GOPATH}"
kube::log::error " PATH: ${PATH}"
return 1 return 1
fi fi
} }

View File

@ -70,7 +70,7 @@ function updateGodepManifest() {
pushd "${TMP_GOPATH}/src/k8s.io/${repo}" >/dev/null pushd "${TMP_GOPATH}/src/k8s.io/${repo}" >/dev/null
kube::log::status "Updating godeps for k8s.io/${repo}" kube::log::status "Updating godeps for k8s.io/${repo}"
rm -rf Godeps # remove the current Godeps.json so we always rebuild it rm -rf Godeps # remove the current Godeps.json so we always rebuild it
GOPATH="${TMP_GOPATH}:${GOPATH}:${GOPATH}/src/k8s.io/kubernetes/staging" godep save ${GODEP_OPTS} ./... 2>&1 | sed 's/^/ /' GOPATH="${TMP_GOPATH}:${GOPATH}:${GOPATH}/src/k8s.io/kubernetes/staging" ${KUBE_GODEP:?} save ${GODEP_OPTS} ./... 2>&1 | sed 's/^/ /'
# Rewriting Godeps.json to cross-out commits that don't really exist because we haven't pushed the prereqs yet # Rewriting Godeps.json to cross-out commits that don't really exist because we haven't pushed the prereqs yet
local repo local repo

View File

@ -51,7 +51,6 @@ function cleanup {
echo "Removing ${_tmpdir}" echo "Removing ${_tmpdir}"
rm -rf "${_tmpdir}" rm -rf "${_tmpdir}"
fi fi
export GODEP=""
} }
trap cleanup EXIT trap cleanup EXIT
@ -85,7 +84,7 @@ ret=0
pushd "${KUBE_ROOT}" > /dev/null 2>&1 pushd "${KUBE_ROOT}" > /dev/null 2>&1
# Test for diffs # Test for diffs
if ! _out="$(diff -Naupr --ignore-matching-lines='^\s*\"GoVersion\":' --ignore-matching-line='^\s*\"GodepVersion\":' --ignore-matching-lines='^\s*\"Comment\":' Godeps/Godeps.json ${_kubetmp}/Godeps/Godeps.json)"; then if ! _out="$(diff -Naupr --ignore-matching-lines='^\s*\"GoVersion\":' Godeps/Godeps.json ${_kubetmp}/Godeps/Godeps.json)"; then
echo "Your Godeps.json is different:" >&2 echo "Your Godeps.json is different:" >&2
echo "${_out}" >&2 echo "${_out}" >&2
echo "Godeps Verify failed." >&2 echo "Godeps Verify failed." >&2

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/api", "ImportPath": "k8s.io/api",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/apiextensions-apiserver", "ImportPath": "k8s.io/apiextensions-apiserver",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/apimachinery", "ImportPath": "k8s.io/apimachinery",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/apiserver", "ImportPath": "k8s.io/apiserver",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/cli-runtime", "ImportPath": "k8s.io/cli-runtime",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/client-go", "ImportPath": "k8s.io/client-go",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/cloud-provider", "ImportPath": "k8s.io/cloud-provider",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/cluster-bootstrap", "ImportPath": "k8s.io/cluster-bootstrap",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/code-generator", "ImportPath": "k8s.io/code-generator",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/csi-api", "ImportPath": "k8s.io/csi-api",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/kube-aggregator", "ImportPath": "k8s.io/kube-aggregator",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/kube-controller-manager", "ImportPath": "k8s.io/kube-controller-manager",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/kube-proxy", "ImportPath": "k8s.io/kube-proxy",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/kube-scheduler", "ImportPath": "k8s.io/kube-scheduler",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/kubelet", "ImportPath": "k8s.io/kubelet",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/metrics", "ImportPath": "k8s.io/metrics",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/sample-apiserver", "ImportPath": "k8s.io/sample-apiserver",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/sample-cli-plugin", "ImportPath": "k8s.io/sample-cli-plugin",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

View File

@ -1,7 +1,7 @@
{ {
"ImportPath": "k8s.io/sample-controller", "ImportPath": "k8s.io/sample-controller",
"GoVersion": "go1.11", "GoVersion": "go1.11",
"GodepVersion": "v80", "GodepVersion": "v80-k8s-r1",
"Packages": [ "Packages": [
"./..." "./..."
], ],

1
third_party/BUILD vendored
View File

@ -22,6 +22,7 @@ filegroup(
"//third_party/forked/etcd221/wal:all-srcs", "//third_party/forked/etcd221/wal:all-srcs",
"//third_party/forked/etcd237/pkg/fileutil:all-srcs", "//third_party/forked/etcd237/pkg/fileutil:all-srcs",
"//third_party/forked/etcd237/wal:all-srcs", "//third_party/forked/etcd237/wal:all-srcs",
"//third_party/forked/godep:all-srcs",
"//third_party/forked/golang/expansion:all-srcs", "//third_party/forked/golang/expansion:all-srcs",
"//third_party/forked/golang/reflect:all-srcs", "//third_party/forked/golang/reflect:all-srcs",
"//third_party/forked/golang/template:all-srcs", "//third_party/forked/golang/template:all-srcs",

View File

@ -1,5 +1,7 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
licenses(["notice"])
go_library( go_library(
name = "go_default_library", name = "go_default_library",
srcs = [ srcs = [
@ -24,8 +26,7 @@ go_library(
"vcs.go", "vcs.go",
"version.go", "version.go",
], ],
importmap = "k8s.io/kubernetes/vendor/github.com/tools/godep", importpath = "k8s.io/kubernetes/third_party/forked/godep",
importpath = "github.com/tools/godep",
visibility = ["//visibility:private"], visibility = ["//visibility:private"],
deps = [ deps = [
"//vendor/github.com/kr/fs:go_default_library", "//vendor/github.com/kr/fs:go_default_library",

View File

@ -173,7 +173,7 @@ func (g *Godeps) save() (int64, error) {
} }
func (g *Godeps) writeTo(w io.Writer) (int64, error) { func (g *Godeps) writeTo(w io.Writer) (int64, error) {
g.GodepVersion = fmt.Sprintf("v%d", version) // godep always writes its current version. g.GodepVersion = fmt.Sprintf("v%s", version) // godep always writes its current version.
b, err := json.MarshalIndent(g, "", "\t") b, err := json.MarshalIndent(g, "", "\t")
if err != nil { if err != nil {
return 0, err return 0, err

View File

@ -40,7 +40,7 @@ var vcsGit = &VCS{
vcs: vcs.ByCmd("git"), vcs: vcs.ByCmd("git"),
IdentifyCmd: "rev-parse HEAD", IdentifyCmd: "rev-parse HEAD",
DescribeCmd: "describe --tags", DescribeCmd: "describe --tags --abbrev=14",
DiffCmd: "diff {rev}", DiffCmd: "diff {rev}",
ListCmd: "ls-files --full-name", ListCmd: "ls-files --full-name",
RootCmd: "rev-parse --show-cdup", RootCmd: "rev-parse --show-cdup",

View File

@ -8,7 +8,7 @@ import (
"strings" "strings"
) )
const version = 80 const version = "80-k8s-r1"
var cmdVersion = &Command{ var cmdVersion = &Command{
Name: "version", Name: "version",
@ -21,7 +21,7 @@ Displays the version of godep as well as the target OS, architecture and go runt
} }
func versionString() string { func versionString() string {
return fmt.Sprintf("godep v%d (%s/%s/%s)", version, runtime.GOOS, runtime.GOARCH, runtime.Version()) return fmt.Sprintf("godep v%s (%s/%s/%s)", version, runtime.GOOS, runtime.GOARCH, runtime.Version())
} }
func runVersion(cmd *Command, args []string) { func runVersion(cmd *Command, args []string) {

2
vendor/BUILD vendored
View File

@ -15,7 +15,6 @@ filegroup(
"//vendor/bitbucket.org/ww/goautoneg:all-srcs", "//vendor/bitbucket.org/ww/goautoneg:all-srcs",
"//vendor/cloud.google.com/go/compute/metadata:all-srcs", "//vendor/cloud.google.com/go/compute/metadata:all-srcs",
"//vendor/cloud.google.com/go/internal:all-srcs", "//vendor/cloud.google.com/go/internal:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:all-srcs",
@ -364,7 +363,6 @@ filegroup(
"//vendor/github.com/stretchr/testify/require:all-srcs", "//vendor/github.com/stretchr/testify/require:all-srcs",
"//vendor/github.com/syndtr/gocapability/capability:all-srcs", "//vendor/github.com/syndtr/gocapability/capability:all-srcs",
"//vendor/github.com/tmc/grpc-websocket-proxy/wsproxy:all-srcs", "//vendor/github.com/tmc/grpc-websocket-proxy/wsproxy:all-srcs",
"//vendor/github.com/tools/godep:all-srcs",
"//vendor/github.com/ugorji/go/codec:all-srcs", "//vendor/github.com/ugorji/go/codec:all-srcs",
"//vendor/github.com/vishvananda/netlink:all-srcs", "//vendor/github.com/vishvananda/netlink:all-srcs",
"//vendor/github.com/vishvananda/netns:all-srcs", "//vendor/github.com/vishvananda/netns:all-srcs",

View File

@ -1,13 +0,0 @@
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)