Skip to content

Commit

Permalink
Merge pull request kubernetes#83526 from eloyekunle/feat/gengo-revers…
Browse files Browse the repository at this point in the history
…e-import

import-boss reverse import
  • Loading branch information
k8s-ci-robot committed Jan 29, 2020
2 parents 53376cd + bae4ff5 commit f5a0087
Show file tree
Hide file tree
Showing 38 changed files with 433 additions and 529 deletions.
95 changes: 0 additions & 95 deletions cmd/kubeadm/.import-restrictions
Original file line number Diff line number Diff line change
Expand Up @@ -36,101 +36,6 @@
"k8s.io/kubernetes/cmd/kubeadm"
]
},
{
"SelectorRegexp": "k8s[.]io/utils",
"AllowedPrefixes": [
"k8s.io/utils/exec",
"k8s.io/utils/integer",
"k8s.io/utils/path",
"k8s.io/utils/pointer",
"k8s.io/utils/net",
"k8s.io/utils/trace"
]
},
{
"SelectorRegexp": "github[.]com",
"AllowedPrefixes": [
"github.com/beorn7/perks/quantile",
"github.com/blang/semver",
"github.com/coredns/corefile-migration/migration",
"github.com/coreos/etcd/auth/authpb",
"github.com/coreos/etcd/clientv3",
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes",
"github.com/coreos/etcd/etcdserver/etcdserverpb",
"github.com/coreos/etcd/mvcc/mvccpb",
"github.com/coreos/etcd/pkg/tlsutil",
"github.com/coreos/etcd/pkg/transport",
"github.com/davecgh/go-spew/spew",
"github.com/docker/distribution/reference",
"github.com/godbus/dbus",
"github.com/gogo/protobuf/proto",
"github.com/gogo/protobuf/sortkeys",
"github.com/golang/groupcache/lru",
"github.com/golang/protobuf/proto",
"github.com/golang/protobuf/ptypes",
"github.com/googleapis/gnostic/compiler",
"github.com/googleapis/gnostic/extensions",
"github.com/googleapis/gnostic/OpenAPIv2",
"github.com/google/btree",
"github.com/google/gofuzz",
"github.com/gregjones/httpcache",
"github.com/hashicorp/golang-lru",
"github.com/imdario/mergo",
"github.com/json-iterator/go",
"github.com/MakeNowJust/heredoc",
"github.com/matttproud/golang_protobuf_extensions/pbutil",
"github.com/caddyserver/caddy/caddyfile",
"github.com/modern-go/concurrent",
"github.com/modern-go/reflect2",
"github.com/opencontainers/go-digest",
"github.com/opencontainers/image-spec/specs-go",
"github.com/peterbourgon/diskv",
"github.com/pkg/errors",
"github.com/pmezard/go-difflib/difflib",
"github.com/prometheus/client_golang/prometheus",
"github.com/prometheus/client_model/go",
"github.com/prometheus/common/expfmt",
"github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg",
"github.com/prometheus/common/model",
"github.com/prometheus/procfs",
"github.com/PuerkitoBio/purell",
"github.com/PuerkitoBio/urlesc",
"github.com/lithammer/dedent",
"github.com/russross/blackfriday",
"github.com/shurcooL/sanitized_anchor_name",
"github.com/spf13/cobra",
"github.com/spf13/pflag",
"github.com/vishvananda/netlink"
]
},
{
"SelectorRegexp": "golang[.]org",
"AllowedPrefixes": [
"golang.org/x/crypto/ed25519",
"golang.org/x/crypto/ssh/terminal",
"golang.org/x/net/context",
"golang.org/x/net/http2",
"golang.org/x/net/idna",
"golang.org/x/net/internal/timeseries",
"golang.org/x/net/lex/httplex",
"golang.org/x/net/proxy",
"golang.org/x/net/trace",
"golang.org/x/oauth2",
"golang.org/x/sys/unix",
"golang.org/x/text/cases",
"golang.org/x/text/internal",
"golang.org/x/text/language",
"golang.org/x/text/runes",
"golang.org/x/text/secure/bidirule",
"golang.org/x/text/secure/precis",
"golang.org/x/text/transform",
"golang.org/x/text/unicode/bidi",
"golang.org/x/text/unicode/norm",
"golang.org/x/text/width",
"golang.org/x/time/rate",
"google.golang.org/grpc"
]
},
{
"SelectorRegexp": "gopkg[.]in",
"AllowedPrefixes": [
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ require (
k8s.io/component-base v0.0.0
k8s.io/cri-api v0.0.0
k8s.io/csi-translation-lib v0.0.0
k8s.io/gengo v0.0.0-20190822140433-26a664648505
k8s.io/gengo v0.0.0-20200114144118-36b2048a9120
k8s.io/heapster v1.2.0-beta.1
k8s.io/klog v1.0.0
k8s.io/kube-aggregator v0.0.0
Expand Down Expand Up @@ -544,7 +544,7 @@ replace (
k8s.io/component-base => ./staging/src/k8s.io/component-base
k8s.io/cri-api => ./staging/src/k8s.io/cri-api
k8s.io/csi-translation-lib => ./staging/src/k8s.io/csi-translation-lib
k8s.io/gengo => k8s.io/gengo v0.0.0-20190822140433-26a664648505
k8s.io/gengo => k8s.io/gengo v0.0.0-20200114144118-36b2048a9120
k8s.io/heapster => k8s.io/heapster v1.2.0-beta.1
k8s.io/klog => k8s.io/klog v1.0.0
k8s.io/kube-aggregator => ./staging/src/k8s.io/kube-aggregator
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ gotest.tools/gotestsum v0.3.5/go.mod h1:Mnf3e5FUzXbkCfynWBGOwLssY7gTQgCHObK9tMpA
grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=
honnef.co/go/tools v0.0.1-2019.2.2 h1:TEgegKbBqByGUb1Coo1pc2qIdf2xw6v0mYyLSYtyopE=
honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
k8s.io/gengo v0.0.0-20190822140433-26a664648505 h1:ZY6yclUKVbZ+SdWnkfY+Je5vrMpKOxmGeKRbsXVmqYM=
k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 h1:RPscN6KhmG54S33L+lr3GS+oD1jmchIU0ll519K6FA4=
k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/heapster v1.2.0-beta.1 h1:lUsE/AHOMHpi3MLlBEkaU8Esxm5QhdyCrv1o7ot0s84=
k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
Expand Down
2 changes: 1 addition & 1 deletion hack/verify-generated-protobuf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ for APIROOT in ${APIROOTS}; do
TMP_APIROOT="${_tmp}/${APIROOT}"
echo "diffing ${APIROOT} against freshly generated protobuf"
ret=0
diff -Naupr -I 'Auto generated by' -x 'zz_generated.*' -x '.github' "${KUBE_ROOT}/${APIROOT}" "${TMP_APIROOT}" || ret=$?
diff -Naupr -I 'Auto generated by' -x 'zz_generated.*' -x '.github' -x '.import-restrictions' "${KUBE_ROOT}/${APIROOT}" "${TMP_APIROOT}" || ret=$?
cp -a "${TMP_APIROOT}"/* "${KUBE_ROOT}/${APIROOT}/"
if [[ $ret -eq 0 ]]; then
echo "${APIROOT} up to date."
Expand Down
9 changes: 8 additions & 1 deletion hack/verify-import-boss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,11 @@ kube::golang::setup_env

make -C "${KUBE_ROOT}" WHAT=vendor/k8s.io/code-generator/cmd/import-boss

$(kube::util::find-binary "import-boss") --verify-only "$@"
packages=("k8s.io/kubernetes/pkg/..." "k8s.io/kubernetes/cmd/..." "k8s.io/kubernetes/plugin/..." "k8s.io/kubernetes/test/e2e/framework/...")
for d in staging/src/k8s.io/*/; do
if [ -d "$d" ]; then
packages+=("./vendor/${d#"staging/src/"}...")
fi
done

$(kube::util::find-binary "import-boss") --verify-only "$@" --input-dirs "$(IFS=, ; echo "${packages[*]}")"
13 changes: 0 additions & 13 deletions pkg/cloudprovider/providers/.import-restrictions
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
{
"Rules": [
{
"SelectorRegexp": "k8s[.]io/utils",
"AllowedPrefixes": [
"k8s.io/utils/exec",
"k8s.io/utils/io",
"k8s.io/utils/keymutex",
"k8s.io/utils/mount",
"k8s.io/utils/net",
"k8s.io/utils/nsenter",
"k8s.io/utils/path",
"k8s.io/utils/strings"
]
},
{
"SelectorRegexp": "k8s[.]io/kubernetes",
"AllowedPrefixes": [
Expand Down

0 comments on commit f5a0087

Please sign in to comment.