Skip to content

Commit 3b2cd04

Browse files
committed
Merge remote-tracking branch 'kubeflow/master' into rebase-2.4-master
# Conflicts: # backend/Dockerfile # backend/Dockerfile.driver # backend/Dockerfile.launcher # backend/Dockerfile.persistenceagent # backend/Dockerfile.scheduledworkflow
2 parents cc03632 + c100648 commit 3b2cd04

18 files changed

+203
-1348
lines changed

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.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

backend/src/v2/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -115,29 +115,3 @@ Instructions:
115115
```
116116
117117
Read [v2 sample test documentation](./test/README.md) for more details.
118-
119-
### Update licenses
120-
121-
Note, this is currently outdated instructions for v2 compatible mode. We haven't set up licensing workflow for v2 engine.
122-
123-
Download the license tool binary from <https://github.com/Bobgy/go-licenses/releases> and put it into $PATH.
124-
125-
Update licenses info by:
126-
127-
```bash
128-
make license-launcher
129-
```
130-
131-
or run the following to enable verbose output:
132-
133-
```bash
134-
GO_LICENSES_FLAGS=-v4 make license-launcher
135-
```
136-
137-
After the update, check generated third_party/licenses/launcher.csv file to
138-
make sure licenses of new dependencies are correctly identified.
139-
140-
If something is unexpected, examine the unexpected dependencies by yourself and add
141-
overrides to [go-licenses.yaml](./go-licenses.yaml).
142-
143-
For detailed documentation about the tool: <https://github.com/Bobgy/go-licenses/tree/main/v2>.

backend/src/v2/test/presubmit-v2-go-test.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,3 @@ kubectl port-forward svc/metadata-grpc-service 8080:8080 -n "$NAMESPACE" & PORT_
5050
# wait for kubectl port forward
5151
sleep 10
5252
go test -v -cover ./...
53-
54-
# TODO(zijianjoy): re-enable license check for v2 images
55-
# verify licenses are up-to-date, because all license updates must be reviewed by a human.
56-
# ../hack/install-go-licenses.sh
57-
# make license-launcher
58-
# git diff --exit-code -- third_party/licenses/launcher.csv || (echo "v2/third_party/licenses/launcher.csv is outdated, refer to https://github.com/kubeflow/pipelines/tree/master/v2#update-licenses for update instructions.")

0 commit comments

Comments
 (0)