Skip to content

Commit 5119a77

Browse files
author
Abdallah Samara (EXT-Nokia)
committed
feat: Upgrade Go to 1.24 - notebook-controller component. #721
Signed-off-by: Abdallah Samara (EXT-Nokia) <[email protected]>
1 parent 8c44fd7 commit 5119a77

File tree

9 files changed

+233
-12
lines changed

9 files changed

+233
-12
lines changed

.github/workflows/nb_controller_integration_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ jobs:
6464
| sed "s|${CURRENT_IMAGE}:[a-zA-Z0-9_.-]*|${PR_IMAGE}|g" \
6565
| kubectl apply -f -
6666
67-
kubectl wait pods -n kubeflow -l app=notebook-controller --for=condition=Ready --timeout=300s
67+
kubectl wait pods -n kubeflow -l app=notebook-controller --for=condition=Ready --timeout=300s

.github/workflows/nb_controller_multi_arch_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
cd components/notebook-controller
3535
ARCH=linux/amd64 make docker-build-multi-arch
3636
ARCH=linux/ppc64le make docker-build-multi-arch
37-
ARCH=linux/arm64/v8 make docker-build-multi-arch
37+
ARCH=linux/arm64/v8 make docker-build-multi-arch

.github/workflows/nb_controller_unit_test.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
name: Run Notebook Controller unit tests
22
on:
3-
pull_request:
3+
push:
44
paths:
55
- components/notebook-controller/**
66
- releasing/version/VERSION
77
branches:
8-
- main
9-
- notebooks-v1
8+
- feat/721
109
- v*-branch
1110

1211
jobs:
@@ -19,7 +18,7 @@ jobs:
1918
- name: Install Go
2019
uses: actions/setup-go@v5
2120
with:
22-
go-version: "1.17"
21+
go-version: "1.24"
2322
check-latest: true
2423

2524
- name: Run unit tests

.github/workflows/tb_controller_docker_publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ jobs:
6161
if: steps.filter.outputs.version == 'true'
6262
run: |
6363
export TAG=$(cat ../../releasing/version/VERSION)
64-
make docker-build-push-multi-arch
64+
make docker-build-push-multi-arch

components/notebook-controller/Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# ${PATH_TO_KUBEFLOW/KUBEFLOW repo}/components
66
#
7-
ARG GOLANG_VERSION=1.17
7+
ARG GOLANG_VERSION=1.24
88
FROM golang:${GOLANG_VERSION} as builder
99

1010
WORKDIR /workspace
@@ -16,6 +16,14 @@ COPY notebook-controller /workspace/notebook-controller
1616
# and so that source changes don't invalidate our downloaded layer
1717
RUN cd /workspace/notebook-controller && go mod download
1818

19+
# Force download and extract all HashiCorp modules so they exist under /go/pkg/mod
20+
RUN set -e; cd /workspace/notebook-controller; \
21+
for m in $(go list -m all | awk '/^github.com\/hashicorp\// {print $1 "@" $2}'); do \
22+
go mod download "$m"; \
23+
pkg="${m%@*}"; \
24+
go list "$pkg/..." >/dev/null 2>&1 || true; \
25+
done
26+
1927
WORKDIR /workspace/notebook-controller
2028

2129
# Build

components/notebook-controller/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
136136
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
137137
.PHONY: controller-gen
138138
controller-gen: ## Download controller-gen locally if necessary.
139-
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0)
139+
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0)
140140

141141
KUSTOMIZE = $(shell pwd)/bin/kustomize
142142
.PHONY: kustomize

components/notebook-controller/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ notebook-controller-deployment-564d76877-mqsm8 1/1 Running 0 16
8080
```
8181

8282
### Build and Run the Controller locally
83-
In order to build the controller you will need to use Go 1.17 and up in order to have Go Modules support. You will also need to have a k8s cluster.
83+
In order to build the controller you will need to use Go 1.24 and up in order to have Go Modules support. You will also need to have a k8s cluster.
8484

8585
1. Install the CRDs into the cluster:
8686

@@ -135,7 +135,7 @@ make uninstall
135135

136136
To develop on `notebook-controller`, your environment must have the following:
137137

138-
- [go](https://golang.org/dl/) version v1.17+.
138+
- [go](https://golang.org/dl/) version v1.24+.
139139
- [docker](https://docs.docker.com/install/) version 20.10+.
140140
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) version 1.22.0+.
141141
- [kustomize](https://sigs.k8s.io/kustomize/docs/INSTALL.md) version 3.8.7+.

components/notebook-controller/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/kubeflow/kubeflow/components/notebook-controller
22

3-
go 1.17
3+
go 1.24
44

55
require (
66
github.com/go-logr/logr v1.2.0

components/notebook-controller/go.sum

Lines changed: 214 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)