Skip to content

Commit f5a0087

Browse files
authored
Merge pull request kubernetes#83526 from eloyekunle/feat/gengo-reverse-import
import-boss reverse import
2 parents 53376cd + bae4ff5 commit f5a0087

File tree

38 files changed

+433
-529
lines changed

38 files changed

+433
-529
lines changed

cmd/kubeadm/.import-restrictions

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -36,101 +36,6 @@
3636
"k8s.io/kubernetes/cmd/kubeadm"
3737
]
3838
},
39-
{
40-
"SelectorRegexp": "k8s[.]io/utils",
41-
"AllowedPrefixes": [
42-
"k8s.io/utils/exec",
43-
"k8s.io/utils/integer",
44-
"k8s.io/utils/path",
45-
"k8s.io/utils/pointer",
46-
"k8s.io/utils/net",
47-
"k8s.io/utils/trace"
48-
]
49-
},
50-
{
51-
"SelectorRegexp": "github[.]com",
52-
"AllowedPrefixes": [
53-
"github.com/beorn7/perks/quantile",
54-
"github.com/blang/semver",
55-
"github.com/coredns/corefile-migration/migration",
56-
"github.com/coreos/etcd/auth/authpb",
57-
"github.com/coreos/etcd/clientv3",
58-
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes",
59-
"github.com/coreos/etcd/etcdserver/etcdserverpb",
60-
"github.com/coreos/etcd/mvcc/mvccpb",
61-
"github.com/coreos/etcd/pkg/tlsutil",
62-
"github.com/coreos/etcd/pkg/transport",
63-
"github.com/davecgh/go-spew/spew",
64-
"github.com/docker/distribution/reference",
65-
"github.com/godbus/dbus",
66-
"github.com/gogo/protobuf/proto",
67-
"github.com/gogo/protobuf/sortkeys",
68-
"github.com/golang/groupcache/lru",
69-
"github.com/golang/protobuf/proto",
70-
"github.com/golang/protobuf/ptypes",
71-
"github.com/googleapis/gnostic/compiler",
72-
"github.com/googleapis/gnostic/extensions",
73-
"github.com/googleapis/gnostic/OpenAPIv2",
74-
"github.com/google/btree",
75-
"github.com/google/gofuzz",
76-
"github.com/gregjones/httpcache",
77-
"github.com/hashicorp/golang-lru",
78-
"github.com/imdario/mergo",
79-
"github.com/json-iterator/go",
80-
"github.com/MakeNowJust/heredoc",
81-
"github.com/matttproud/golang_protobuf_extensions/pbutil",
82-
"github.com/caddyserver/caddy/caddyfile",
83-
"github.com/modern-go/concurrent",
84-
"github.com/modern-go/reflect2",
85-
"github.com/opencontainers/go-digest",
86-
"github.com/opencontainers/image-spec/specs-go",
87-
"github.com/peterbourgon/diskv",
88-
"github.com/pkg/errors",
89-
"github.com/pmezard/go-difflib/difflib",
90-
"github.com/prometheus/client_golang/prometheus",
91-
"github.com/prometheus/client_model/go",
92-
"github.com/prometheus/common/expfmt",
93-
"github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg",
94-
"github.com/prometheus/common/model",
95-
"github.com/prometheus/procfs",
96-
"github.com/PuerkitoBio/purell",
97-
"github.com/PuerkitoBio/urlesc",
98-
"github.com/lithammer/dedent",
99-
"github.com/russross/blackfriday",
100-
"github.com/shurcooL/sanitized_anchor_name",
101-
"github.com/spf13/cobra",
102-
"github.com/spf13/pflag",
103-
"github.com/vishvananda/netlink"
104-
]
105-
},
106-
{
107-
"SelectorRegexp": "golang[.]org",
108-
"AllowedPrefixes": [
109-
"golang.org/x/crypto/ed25519",
110-
"golang.org/x/crypto/ssh/terminal",
111-
"golang.org/x/net/context",
112-
"golang.org/x/net/http2",
113-
"golang.org/x/net/idna",
114-
"golang.org/x/net/internal/timeseries",
115-
"golang.org/x/net/lex/httplex",
116-
"golang.org/x/net/proxy",
117-
"golang.org/x/net/trace",
118-
"golang.org/x/oauth2",
119-
"golang.org/x/sys/unix",
120-
"golang.org/x/text/cases",
121-
"golang.org/x/text/internal",
122-
"golang.org/x/text/language",
123-
"golang.org/x/text/runes",
124-
"golang.org/x/text/secure/bidirule",
125-
"golang.org/x/text/secure/precis",
126-
"golang.org/x/text/transform",
127-
"golang.org/x/text/unicode/bidi",
128-
"golang.org/x/text/unicode/norm",
129-
"golang.org/x/text/width",
130-
"golang.org/x/time/rate",
131-
"google.golang.org/grpc"
132-
]
133-
},
13439
{
13540
"SelectorRegexp": "gopkg[.]in",
13641
"AllowedPrefixes": [

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ require (
148148
k8s.io/component-base v0.0.0
149149
k8s.io/cri-api v0.0.0
150150
k8s.io/csi-translation-lib v0.0.0
151-
k8s.io/gengo v0.0.0-20190822140433-26a664648505
151+
k8s.io/gengo v0.0.0-20200114144118-36b2048a9120
152152
k8s.io/heapster v1.2.0-beta.1
153153
k8s.io/klog v1.0.0
154154
k8s.io/kube-aggregator v0.0.0
@@ -544,7 +544,7 @@ replace (
544544
k8s.io/component-base => ./staging/src/k8s.io/component-base
545545
k8s.io/cri-api => ./staging/src/k8s.io/cri-api
546546
k8s.io/csi-translation-lib => ./staging/src/k8s.io/csi-translation-lib
547-
k8s.io/gengo => k8s.io/gengo v0.0.0-20190822140433-26a664648505
547+
k8s.io/gengo => k8s.io/gengo v0.0.0-20200114144118-36b2048a9120
548548
k8s.io/heapster => k8s.io/heapster v1.2.0-beta.1
549549
k8s.io/klog => k8s.io/klog v1.0.0
550550
k8s.io/kube-aggregator => ./staging/src/k8s.io/kube-aggregator

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,8 @@ gotest.tools/gotestsum v0.3.5/go.mod h1:Mnf3e5FUzXbkCfynWBGOwLssY7gTQgCHObK9tMpA
590590
grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=
591591
honnef.co/go/tools v0.0.1-2019.2.2 h1:TEgegKbBqByGUb1Coo1pc2qIdf2xw6v0mYyLSYtyopE=
592592
honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
593-
k8s.io/gengo v0.0.0-20190822140433-26a664648505 h1:ZY6yclUKVbZ+SdWnkfY+Je5vrMpKOxmGeKRbsXVmqYM=
594-
k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
593+
k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 h1:RPscN6KhmG54S33L+lr3GS+oD1jmchIU0ll519K6FA4=
594+
k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
595595
k8s.io/heapster v1.2.0-beta.1 h1:lUsE/AHOMHpi3MLlBEkaU8Esxm5QhdyCrv1o7ot0s84=
596596
k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM=
597597
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=

hack/verify-generated-protobuf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ for APIROOT in ${APIROOTS}; do
5454
TMP_APIROOT="${_tmp}/${APIROOT}"
5555
echo "diffing ${APIROOT} against freshly generated protobuf"
5656
ret=0
57-
diff -Naupr -I 'Auto generated by' -x 'zz_generated.*' -x '.github' "${KUBE_ROOT}/${APIROOT}" "${TMP_APIROOT}" || ret=$?
57+
diff -Naupr -I 'Auto generated by' -x 'zz_generated.*' -x '.github' -x '.import-restrictions' "${KUBE_ROOT}/${APIROOT}" "${TMP_APIROOT}" || ret=$?
5858
cp -a "${TMP_APIROOT}"/* "${KUBE_ROOT}/${APIROOT}/"
5959
if [[ $ret -eq 0 ]]; then
6060
echo "${APIROOT} up to date."

hack/verify-import-boss.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,11 @@ kube::golang::setup_env
3030

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

33-
$(kube::util::find-binary "import-boss") --verify-only "$@"
33+
packages=("k8s.io/kubernetes/pkg/..." "k8s.io/kubernetes/cmd/..." "k8s.io/kubernetes/plugin/..." "k8s.io/kubernetes/test/e2e/framework/...")
34+
for d in staging/src/k8s.io/*/; do
35+
if [ -d "$d" ]; then
36+
packages+=("./vendor/${d#"staging/src/"}...")
37+
fi
38+
done
39+
40+
$(kube::util::find-binary "import-boss") --verify-only "$@" --input-dirs "$(IFS=, ; echo "${packages[*]}")"

pkg/cloudprovider/providers/.import-restrictions

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
{
22
"Rules": [
3-
{
4-
"SelectorRegexp": "k8s[.]io/utils",
5-
"AllowedPrefixes": [
6-
"k8s.io/utils/exec",
7-
"k8s.io/utils/io",
8-
"k8s.io/utils/keymutex",
9-
"k8s.io/utils/mount",
10-
"k8s.io/utils/net",
11-
"k8s.io/utils/nsenter",
12-
"k8s.io/utils/path",
13-
"k8s.io/utils/strings"
14-
]
15-
},
163
{
174
"SelectorRegexp": "k8s[.]io/kubernetes",
185
"AllowedPrefixes": [

0 commit comments

Comments
 (0)