Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit 920a417

Browse files
uniemimutogashidm
authored andcommitted
revert vendoring of go-licenses
License pre-creation is fast enough as is. The vendoring of go-licenses is not warranted. Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
1 parent de1ec71 commit 920a417

File tree

5 files changed

+10
-228
lines changed

5 files changed

+10
-228
lines changed

gpu-aware-scheduling/Makefile

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,13 @@ ifneq ($(TAG),)
22
IMAGE_TAG=:$(TAG)
33
endif
44

5-
GOLICENSES_IN_GO_MOD=@$(shell grep "github.com/google/go-licenses" go.mod | cut -b 32-)
6-
ifneq ("$(wildcard vendor/)","")
7-
GOLICENCES_PREFIX=./vendor/
8-
else
9-
GOLICENSES_VERSION=$(GOLICENSES_IN_GO_MOD)
10-
endif
5+
GOLICENSES_VERSION?=v1.2.0
116

127
ifneq ("$(wildcard licenses/)","")
138
LOCAL_LICENSES=TRUE
149
endif
1510

16-
.PHONY: test all build image release-image format clean licenses mock e2e
11+
.PHONY: test all build image release-image format clean licenses mock e2e clean-licenses
1712

1813
test:
1914
go test ./... -v *_test.go
@@ -36,13 +31,15 @@ release-image: clean
3631
format:
3732
gofmt -w -s .
3833

39-
clean:
34+
clean: clean-licenses
4035
rm -f ./bin/*
41-
rm -rf vendor licenses
36+
rm -rf vendor
4237

43-
licenses:
38+
clean-licenses:
4439
rm -rf licenses
45-
GO111MODULE=on go run $(GOLICENSES_PREFIX)github.com/google/go-licenses$(GOLICENSES_VERSION) \
40+
41+
licenses: clean-licenses
42+
GO111MODULE=on go run github.com/google/go-licenses@$(GOLICENSES_VERSION) \
4643
save "./cmd/gas-scheduler-extender" --save_path licenses
4744

4845
mock:

gpu-aware-scheduling/deploy/images/Dockerfile_gpu-extender

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# SPDX-License-Identifier: Apache-2.0
22

33
FROM golang:1.18 as builder
4-
ARG GOLICENSES_PREFIX
54
ARG GOLICENSES_VERSION
65
ARG LOCAL_LICENSES
76
COPY . /src_root
87
WORKDIR /src_root/gpu-aware-scheduling
98
RUN mkdir -p /install_root/etc && adduser --disabled-password --quiet --gecos "" -u 10001 gas && tail -1 /etc/passwd > /install_root/etc/passwd \
109
&& CGO_ENABLED=0 GO111MODULE=on go build -ldflags="-s -w" -o /install_root/extender ./cmd/gas-scheduler-extender \
1110
&& if [ -z "$LOCAL_LICENSES" ] ; then \
12-
GO111MODULE=on go run ${GOLICENSES_PREFIX}github.com/google/go-licenses${GOLICENSES_VERSION} save "./cmd/gas-scheduler-extender" --save_path /install_root/licenses ; \
11+
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/gas-scheduler-extender" --save_path /install_root/licenses ; \
1312
else cp -r licenses /install_root/ ; fi
1413

1514
FROM scratch

gpu-aware-scheduling/go.mod

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,6 @@ require (
1212
k8s.io/klog/v2 v2.60.1
1313
)
1414

15-
require (
16-
github.com/Microsoft/go-winio v0.5.0 // indirect
17-
github.com/emirpasic/gods v1.18.1 // indirect
18-
github.com/golang/glog v1.0.0 // indirect
19-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
20-
github.com/google/licenseclassifier v0.0.0-20210722185704-3043a050f148 // indirect
21-
github.com/inconshreveable/mousetrap v1.0.0 // indirect
22-
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
23-
github.com/kevinburke/ssh_config v1.2.0 // indirect
24-
github.com/mitchellh/go-homedir v1.1.0 // indirect
25-
github.com/otiai10/copy v1.7.0 // indirect
26-
github.com/sergi/go-diff v1.2.0 // indirect
27-
github.com/spf13/cobra v1.4.0 // indirect
28-
github.com/src-d/gcfg v1.4.0 // indirect
29-
github.com/xanzy/ssh-agent v0.3.1 // indirect
30-
go.opencensus.io v0.23.0 // indirect
31-
golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 // indirect
32-
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
33-
golang.org/x/tools v0.1.10 // indirect
34-
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
35-
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
36-
gopkg.in/src-d/go-git.v4 v4.13.1 // indirect
37-
gopkg.in/warnings.v0 v0.1.2 // indirect
38-
)
39-
4015
require (
4116
github.com/davecgh/go-spew v1.1.1 // indirect
4217
github.com/emicklei/go-restful v2.15.0+incompatible // indirect
@@ -49,7 +24,6 @@ require (
4924
github.com/golang/protobuf v1.5.2 // indirect
5025
github.com/google/gnostic v0.6.9 // indirect
5126
github.com/google/go-cmp v0.5.8 // indirect
52-
github.com/google/go-licenses v1.2.0
5327
github.com/google/gofuzz v1.2.0 // indirect
5428
github.com/gopherjs/gopherjs v1.17.2 // indirect
5529
github.com/imdario/mergo v0.3.12 // indirect
@@ -71,6 +45,7 @@ require (
7145
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect
7246
golang.org/x/text v0.3.7 // indirect
7347
golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
48+
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
7449
google.golang.org/appengine v1.6.7 // indirect
7550
google.golang.org/protobuf v1.28.0 // indirect
7651
gopkg.in/inf.v0 v0.9.1 // indirect

0 commit comments

Comments
 (0)