Skip to content

Commit c100648

Browse files
authored
chore: Remove License checker (kubeflow#11609)
* update dependencies Signed-off-by: Humair Khan <[email protected]> * remove license checking Signed-off-by: Humair Khan <[email protected]> --------- Signed-off-by: Humair Khan <[email protected]>
1 parent 42fc132 commit c100648

23 files changed

+203
-1407
lines changed

backend/Dockerfile

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,11 @@ WORKDIR /go/src/github.com/kubeflow/pipelines
1919

2020
COPY ./go.mod ./
2121
COPY ./go.sum ./
22-
COPY ./hack/install-go-licenses.sh ./hack/
2322

2423
RUN GO111MODULE=on go mod download
25-
RUN ./hack/install-go-licenses.sh
2624

2725
COPY . .
2826
RUN GO111MODULE=on go build -o /bin/apiserver backend/src/apiserver/*.go
29-
# Check licenses and comply with license terms.
30-
# First, make sure there's no forbidden license.
31-
RUN go-licenses check ./backend/src/apiserver
32-
RUN go-licenses csv ./backend/src/apiserver > /tmp/licenses.csv && \
33-
diff /tmp/licenses.csv backend/third_party_licenses/apiserver.csv && \
34-
go-licenses save ./backend/src/apiserver --save_path /tmp/NOTICES
3527

3628
# 2. Compile preloaded pipeline samples
3729
FROM python:3.9 as compiler
@@ -73,9 +65,6 @@ WORKDIR /bin
7365
COPY backend/src/apiserver/config/ /config
7466
COPY --from=builder /bin/apiserver /bin/apiserver
7567

76-
# Copy licenses and notices.
77-
COPY --from=builder /tmp/licenses.csv /third_party/licenses.csv
78-
COPY --from=builder /tmp/NOTICES /third_party/NOTICES
7968
COPY --from=compiler /samples/ /samples/
8069
RUN chmod +x /bin/apiserver
8170

backend/Dockerfile.cacheserver

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,13 @@ WORKDIR /go/src/github.com/kubeflow/pipelines
2222

2323
COPY ./go.mod ./
2424
COPY ./go.sum ./
25-
COPY ./hack/install-go-licenses.sh ./hack/
2625

2726
RUN GO111MODULE=on go mod download
28-
RUN ./hack/install-go-licenses.sh
2927

3028
COPY . .
3129

3230
RUN GO111MODULE=on go build -o /bin/cache_server backend/src/cache/*.go
3331

34-
# Check licenses and comply with license terms.
35-
# First, make sure there's no forbidden license.
36-
RUN go-licenses check ./backend/src/cache
37-
RUN go-licenses csv ./backend/src/cache > /tmp/licenses.csv && \
38-
diff /tmp/licenses.csv backend/third_party_licenses/cache_server.csv && \
39-
go-licenses save ./backend/src/cache --save_path /tmp/NOTICES
40-
4132
FROM alpine:3.19
4233

4334
RUN adduser -S appuser
@@ -46,8 +37,5 @@ USER appuser
4637
WORKDIR /bin
4738

4839
COPY --from=builder /bin/cache_server /bin/cache_server
49-
# Copy licenses and notices.
50-
COPY --from=builder /tmp/licenses.csv /third_party/licenses.csv
51-
COPY --from=builder /tmp/NOTICES /third_party/NOTICES
5240

5341
ENTRYPOINT [ "/bin/cache_server" ]

backend/Dockerfile.driver

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,13 @@ WORKDIR /go/src/github.com/kubeflow/pipelines
2020

2121
COPY ./go.mod ./
2222
COPY ./go.sum ./
23-
COPY ./hack/install-go-licenses.sh ./hack/
2423

2524
RUN GO111MODULE=on go mod download
26-
RUN ./hack/install-go-licenses.sh
2725

2826
COPY . .
2927

3028
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -gcflags="${GCFLAGS}" -ldflags '-extldflags "-static"' -o /bin/driver ./backend/src/v2/cmd/driver/*.go
3129

32-
# Check licenses and comply with license terms.
33-
# First, make sure there's no forbidden license.
34-
RUN go-licenses check ./backend/src/v2/cmd/driver
35-
RUN go-licenses csv ./backend/src/v2/cmd/driver > /tmp/licenses.csv && \
36-
diff /tmp/licenses.csv backend/third_party_licenses/driver.csv && \
37-
go-licenses save ./backend/src/v2/cmd/driver --save_path /tmp/NOTICES
38-
3930
FROM alpine:3.19
4031

4132
RUN adduser -S appuser
@@ -44,8 +35,5 @@ USER appuser
4435
WORKDIR /bin
4536

4637
COPY --from=builder /bin/driver /bin/driver
47-
# Copy licenses and notices.
48-
COPY --from=builder /tmp/licenses.csv /third_party/licenses.csv
49-
COPY --from=builder /tmp/NOTICES /third_party/NOTICES
5038

5139
ENTRYPOINT [ "/bin/driver" ]

backend/Dockerfile.launcher

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,13 @@ WORKDIR /go/src/github.com/kubeflow/pipelines
1818

1919
COPY ./go.mod ./
2020
COPY ./go.sum ./
21-
COPY ./hack/install-go-licenses.sh ./hack/
2221

2322
RUN GO111MODULE=on go mod download
24-
RUN ./hack/install-go-licenses.sh
2523

2624
COPY . .
2725

2826
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -ldflags '-extldflags "-static"' -o /bin/launcher-v2 ./backend/src/v2/cmd/launcher-v2/*.go
2927

30-
# Check licenses and comply with license terms.
31-
# First, make sure there's no forbidden license.
32-
RUN go-licenses check ./backend/src/v2/cmd/launcher-v2
33-
RUN go-licenses csv ./backend/src/v2/cmd/launcher-v2 > /tmp/licenses.csv && \
34-
diff /tmp/licenses.csv backend/third_party_licenses/launcher.csv && \
35-
go-licenses save ./backend/src/v2/cmd/launcher-v2 --save_path /tmp/NOTICES
36-
3728
FROM alpine:3.19
3829

3930
RUN adduser -S appuser
@@ -42,8 +33,5 @@ USER appuser
4233
WORKDIR /bin
4334

4435
COPY --from=builder /bin/launcher-v2 /bin/launcher-v2
45-
# Copy licenses and notices.
46-
COPY --from=builder /tmp/licenses.csv /third_party/licenses.csv
47-
COPY --from=builder /tmp/NOTICES /third_party/NOTICES
4836

4937
ENTRYPOINT [ "/bin/launcher-v2" ]

backend/Dockerfile.persistenceagent

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ WORKDIR /go/src/github.com/kubeflow/pipelines
1818

1919
COPY ./go.mod ./
2020
COPY ./go.sum ./
21-
COPY ./hack/install-go-licenses.sh ./hack/
2221

2322
RUN GO111MODULE=on go mod download
24-
RUN ./hack/install-go-licenses.sh
2523

2624
COPY . .
2725

@@ -30,12 +28,6 @@ RUN apk update && apk upgrade && \
3028
apk add --no-cache bash git openssh gcc musl-dev
3129

3230
RUN GO111MODULE=on go build -o /bin/persistence_agent backend/src/agent/persistence/*.go
33-
# Check licenses and comply with license terms.
34-
# First, make sure there's no forbidden license.
35-
RUN go-licenses check ./backend/src/agent/persistence
36-
RUN go-licenses csv ./backend/src/agent/persistence > /tmp/licenses.csv && \
37-
diff /tmp/licenses.csv backend/third_party_licenses/persistence_agent.csv && \
38-
go-licenses save ./backend/src/agent/persistence --save_path /tmp/NOTICES
3931

4032
FROM alpine:3.19
4133

@@ -45,10 +37,6 @@ USER appuser
4537
WORKDIR /bin
4638

4739
COPY --from=builder /bin/persistence_agent /bin/persistence_agent
48-
# Copy licenses and notices.
49-
COPY --from=builder /tmp/licenses.csv /third_party/licenses.csv
50-
COPY --from=builder /tmp/NOTICES /third_party/NOTICES
51-
5240
ENV NAMESPACE ""
5341

5442
# Set Workflow TTL to 1 day. The way to use a different value for a particular Kubeflow Pipelines deployment is demonstrated in manifests/kustomize/base/pipeline/ml-pipeline-persistenceagent-deployment.yaml

backend/Dockerfile.scheduledworkflow

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ WORKDIR /go/src/github.com/kubeflow/pipelines
1818

1919
COPY ./go.mod ./
2020
COPY ./go.sum ./
21-
COPY ./hack/install-go-licenses.sh ./hack/
2221

2322
RUN GO111MODULE=on go mod download
24-
RUN ./hack/install-go-licenses.sh
2523

2624
COPY . .
2725

@@ -30,12 +28,6 @@ RUN apk update && apk upgrade && \
3028
apk add --no-cache bash git openssh gcc musl-dev
3129

3230
RUN GO111MODULE=on go build -o /bin/controller backend/src/crd/controller/scheduledworkflow/*.go
33-
# Check licenses and comply with license terms.
34-
# First, make sure there's no forbidden license.
35-
RUN go-licenses check ./backend/src/crd/controller/scheduledworkflow
36-
RUN go-licenses csv ./backend/src/crd/controller/scheduledworkflow > /tmp/licenses.csv && \
37-
diff /tmp/licenses.csv backend/third_party_licenses/swf.csv && \
38-
go-licenses save ./backend/src/crd/controller/scheduledworkflow --save_path /tmp/NOTICES
3931

4032
FROM alpine:3.19
4133

@@ -47,10 +39,6 @@ USER appuser
4739
WORKDIR /bin
4840

4941
COPY --from=builder /bin/controller /bin/controller
50-
# Copy licenses and notices.
51-
COPY --from=builder /tmp/licenses.csv /third_party/licenses.csv
52-
COPY --from=builder /tmp/NOTICES /third_party/NOTICES
53-
5442
ENV NAMESPACE ""
5543
ENV LOG_LEVEL info
5644

backend/Dockerfile.viewercontroller

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,19 @@ WORKDIR /src/github.com/kubeflow/pipelines
2121

2222
COPY ./go.mod ./
2323
COPY ./go.sum ./
24-
COPY ./hack/install-go-licenses.sh ./hack/
2524

2625
RUN GO111MODULE=on go mod download
27-
RUN ./hack/install-go-licenses.sh
2826

2927
COPY . .
3028

3129
RUN GO111MODULE=on go build -o /bin/controller backend/src/crd/controller/viewer/*.go
32-
# Check licenses and comply with license terms.
33-
# First, make sure there's no forbidden license.
34-
RUN go-licenses check ./backend/src/crd/controller/viewer
35-
RUN go-licenses csv ./backend/src/crd/controller/viewer > /tmp/licenses.csv && \
36-
diff /tmp/licenses.csv backend/third_party_licenses/viewer.csv && \
37-
go-licenses save ./backend/src/crd/controller/viewer --save_path /tmp/NOTICES
3830

3931
FROM alpine
4032
WORKDIR /bin
4133

4234
COPY --from=builder /bin/controller /bin/controller
4335
RUN chmod +x /bin/controller
4436

45-
# Copy licenses and notices.
46-
COPY --from=builder /tmp/licenses.csv /third_party/licenses.csv
47-
COPY --from=builder /tmp/NOTICES /third_party/NOTICES
4837

4938
ENV MAX_NUM_VIEWERS "50"
5039
ENV NAMESPACE "kubeflow"

backend/Makefile

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -17,51 +17,12 @@ IMG_TAG_LAUNCHER ?= kfp-launcher
1717
# Whenever build command for any of the binaries change, we should update them both here and in backend/Dockerfiles.
1818

1919
.PHONY: all
20-
all: license_apiserver license_persistence_agent license_cache_server license_swf license_viewer license_driver license_launcher
20+
all: image_all
2121

2222
.PHONY: clean
2323
clean:
2424
rm -rf $(BUILD)
2525

26-
$(BUILD)/apiserver:
27-
GO111MODULE=on go build -o $(BUILD)/apiserver github.com/kubeflow/pipelines/backend/src/apiserver
28-
$(BUILD)/persistence_agent:
29-
GO111MODULE=on go build -o $(BUILD)/persistence_agent github.com/kubeflow/pipelines/backend/src/agent/persistence
30-
$(BUILD)/cache_server:
31-
GO111MODULE=on go build -o $(BUILD)/cache_server github.com/kubeflow/pipelines/backend/src/cache
32-
$(BUILD)/swf:
33-
GO111MODULE=on go build -o $(BUILD)/swf github.com/kubeflow/pipelines/backend/src/crd/controller/scheduledworkflow
34-
$(BUILD)/viewer:
35-
GO111MODULE=on go build -o $(BUILD)/viewer github.com/kubeflow/pipelines/backend/src/crd/controller/viewer
36-
$(BUILD)/driver:
37-
GO111MODULE=on go build -o $(BUILD)/driver github.com/kubeflow/pipelines/backend/src/v2/cmd/driver
38-
$(BUILD)/launcher:
39-
GO111MODULE=on go build -o $(BUILD)/launcher github.com/kubeflow/pipelines/backend/src/v2/cmd/launcher-v2
40-
41-
# Update licenses info after dependencies changed.
42-
# See README.md#updating-licenses-info section for more details.
43-
.PHONY: license_apiserver
44-
license_apiserver: $(BUILD)/apiserver
45-
cd $(MOD_ROOT) && go-licenses csv ./backend/src/apiserver > $(CSV_PATH)/apiserver.csv
46-
.PHONY: license_persistence_agent
47-
license_persistence_agent: $(BUILD)/persistence_agent
48-
cd $(MOD_ROOT) && go-licenses csv ./backend/src/agent/persistence > $(CSV_PATH)/persistence_agent.csv
49-
.PHONY: license_cache_server
50-
license_cache_server: $(BUILD)/cache_server
51-
cd $(MOD_ROOT) && go-licenses csv ./backend/src/cache > $(CSV_PATH)/cache_server.csv
52-
.PHONY: license_swf
53-
license_swf: $(BUILD)/swf
54-
cd $(MOD_ROOT) && go-licenses csv ./backend/src/crd/controller/scheduledworkflow > $(CSV_PATH)/swf.csv
55-
.PHONY: license_viewer
56-
license_viewer: $(BUILD)/viewer
57-
cd $(MOD_ROOT) && go-licenses csv ./backend/src/crd/controller/viewer > $(CSV_PATH)/viewer.csv
58-
.PHONY: license_driver
59-
license_driver: $(BUILD)/driver
60-
cd $(MOD_ROOT) && go-licenses csv ./backend/src/v2/cmd/driver > $(CSV_PATH)/driver.csv
61-
.PHONY: license_launcher
62-
license_launcher: $(BUILD)/launcher
63-
cd $(MOD_ROOT) && go-licenses csv ./backend/src/v2/cmd/launcher-v2 > $(CSV_PATH)/launcher.csv
64-
6526
.PHONY: image_all
6627
image_all: image_apiserver image_persistence_agent image_cache image_swf image_viewer image_visualization image_driver image_launcher
6728

backend/README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ This README will help you set up your coding environment in order to build and r
1010
## Prerequisites
1111
Before you begin, ensure you have:
1212
- Go programming language installed
13-
- [go-licenses tool](../hack/install-go-licenses.sh)
1413
- Docker or Podman installed (for building container images)
1514

1615
Note that you may need to restart your shell after installing these resources in order for the changes to take effect.
@@ -50,16 +49,6 @@ Change it to point to your own build, after saving and closing the file, apiserv
5049
After making changes to proto files, the Go client libraries, Python client libraries and swagger files
5150
need to be regenerated and checked-in. Refer to [backend/api](./api/README.md) for details.
5251

53-
### Updating licenses info
54-
55-
1. [Install go-licenses tool](../hack/install-go-licenses.sh) (if you haven't already) and refer to [its documentation](https://github.com/google/go-licenses) for how to use it.
56-
57-
2. Run the tool to update all licenses:
58-
59-
```bash
60-
make -C backend all
61-
```
62-
6352
### Updating python dependencies
6453

6554
[pip-tools](https://github.com/jazzband/pip-tools) is used to manage python

backend/src/v2/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ REPO_ROOT=../../..
2222
GOOS_VALUE?=linux
2323
GOARCH_VALUE?=amd64
2424
# override this via env to increase verbosity of go-licenses, example:
25-
# GO_LICENSES_FLAGS=-v4 make license-launcher
26-
GO_LICENSES_FLAGS?=
2725
GO_FLAGS=GO111MODULE=on CGO_ENABLED=0 GOOS=${GOOS_VALUE} GOARCH=${GOARCH_VALUE}
2826
GO_BUILD_FLAGS=-tags netgo -ldflags '-extldflags "-static"'
2927
KO_VERSION?=v0.8.3

0 commit comments

Comments
 (0)