Skip to content

Commit 759d579

Browse files
committed
Update GoLang, python and base images
chore: Update GoLang to 1.22 Update Python to 3.11 Update base images from UBI8 to UBI9 Signed-off-by: Spolti <[email protected]>
1 parent 046fdbc commit 759d579

File tree

11 files changed

+57
-22
lines changed

11 files changed

+57
-22
lines changed

.github/workflows/fvt-base.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,18 @@ jobs:
3838
- name: Setup go
3939
uses: actions/setup-go@v5
4040
with:
41-
go-version: '1.21'
41+
go-version: '1.22'
4242

4343
- name: Start Minikube
44-
uses: medyagh/[email protected].14
44+
uses: medyagh/[email protected].19
4545
id: minikube
4646
with:
47-
minikube-version: 1.32.0
47+
minikube-version: 1.35.0
4848
container-runtime: docker
49-
kubernetes-version: v1.26.1
49+
kubernetes-version: v1.32.0
5050
cpus: max
5151
memory: max
52+
addons: storage-provisioner
5253

5354
- name: Check pods
5455
run: |

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
repos:
1515
- repo: https://github.com/golangci/golangci-lint
16-
rev: v1.51.2
16+
rev: v1.60.3
1717
hooks:
1818
- id: golangci-lint
1919
entry: golangci-lint run

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
5151
###############################################################################
5252
# Stage 2: Copy build assets to create the smallest final runtime image
5353
###############################################################################
54-
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest AS runtime
54+
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5 AS runtime
5555

5656
ARG USER=2000
5757
ARG IMAGE_VERSION

Dockerfile.develop

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
###############################################################################
2222
# Create the develop, test, and build environment
2323
###############################################################################
24-
ARG GOLANG_VERSION=1.21
25-
FROM registry.access.redhat.com/ubi8/go-toolset:$GOLANG_VERSION
24+
ARG GOLANG_VERSION=1.22
25+
FROM registry.access.redhat.com/ubi9/go-toolset:$GOLANG_VERSION
2626

2727

2828
# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
@@ -44,14 +44,15 @@ ENV HOME=/root
4444
WORKDIR /workspace
4545

4646
# Install build and dev tools
47-
# NOTE: Require python38 to install pre-commit
47+
# NOTE: Require python to install pre-commit
4848
RUN --mount=type=cache,target=/root/.cache/dnf:rw \
4949
dnf install --setopt=cachedir=/root/.cache/dnf -y --nodocs \
5050
nodejs \
5151
jq \
52-
python38 \
53-
&& ln -sf /usr/bin/python3 /usr/bin/python \
54-
&& ln -sf /usr/bin/pip3 /usr/bin/pip \
52+
python3.11 \
53+
python3.11-pip \
54+
&& alternatives --install /usr/bin/python python /usr/bin/python3.11 1 \
55+
&& alternatives --install /usr/bin/pip pip /usr/bin/pip3.11 1 \
5556
&& true
5657

5758
# Install pre-commit

controllers/modelmesh/cluster_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (cc ClusterConfig) Reconcile(ctx context.Context, namespace string, cl clie
7171
return err
7272
}
7373

74-
if cc.SRSpecs == nil || len(cc.SRSpecs) == 0 {
74+
if len(cc.SRSpecs) == 0 {
7575
if !notfound {
7676
return cl.Delete(ctx, m)
7777
}

controllers/servingruntime_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ func (r *ServingRuntimeReconciler) Reconcile(ctx context.Context, req ctrl.Reque
242242
RESTProxyEnabled: cfg.RESTProxy.Enabled,
243243
RESTProxyImage: cfg.RESTProxy.Image.TaggedImage(),
244244
RESTProxyPort: cfg.RESTProxy.Port,
245+
RESTProxySkipVerify: cfg.RESTProxy.SkipVerify,
245246
RESTProxyResources: cfg.RESTProxy.Resources.ToKubernetesType(),
246247
PullerImage: cfg.StorageHelperImage.TaggedImage(),
247248
PullerImageCommand: cfg.StorageHelperImage.Command,

fvt/fvtclient.go

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ import (
2828
"strings"
2929
"time"
3030

31-
"google.golang.org/grpc/credentials/insecure"
32-
3331
"github.com/go-logr/logr"
3432
"github.com/kserve/kserve/pkg/apis/serving/v1beta1"
3533
api "github.com/kserve/modelmesh-serving/apis/serving/v1alpha1"
34+
"google.golang.org/grpc/credentials/insecure"
3635

3736
"github.com/onsi/ginkgo/v2"
3837
. "github.com/onsi/gomega"
@@ -497,6 +496,29 @@ func (fvt *FVTClient) TailPodLogs(sinceTime string) {
497496
}
498497
}
499498

499+
func (fvt *FVTClient) PrintContainerEnvsFromAllPods() {
500+
podList, err := fvt.Resource(gvrPods).Namespace(fvt.namespace).List(context.TODO(), metav1.ListOptions{
501+
LabelSelector: "modelmesh-service=modelmesh-serving",
502+
})
503+
if err != nil {
504+
fvt.log.Error(err, "Error listing the pods")
505+
}
506+
for _, podList := range podList.Items {
507+
podName := podList.GetName()
508+
err = fvt.RunKubectl("get", "pod/"+podName, "-o", "yaml")
509+
if err != nil {
510+
fvt.log.Error(err, "Error running kubectl exec env command")
511+
}
512+
}
513+
}
514+
515+
func (fvt *FVTClient) PrintMMConfig() {
516+
err := fvt.RunKubectl("get", "cm", UserConfigMapName, "-o", "yaml")
517+
if err != nil {
518+
fvt.log.Error(err, "Error running get config map command")
519+
}
520+
}
521+
500522
func (fvt *FVTClient) RunKubectl(args ...string) error {
501523
args = append(args, "-n", fvt.namespace)
502524
kubectlCmd := exec.Command("kubectl", args...)
@@ -533,13 +555,13 @@ func (fvt *FVTClient) RunKfsModelMetadata(req *inference.ModelMetadataRequest) (
533555
return grpcClient.ModelMetadata(ctx, req)
534556
}
535557

536-
func (fvt *FVTClient) RunKfsRestInference(modelName string, body []byte, tls bool) (string, error) {
558+
func (fvt *FVTClient) RunKfsRestInference(modelName string, body []byte, useTls bool) (string, error) {
537559
if fvt.restConn == nil {
538560
return "", errors.New("you must connect to model mesh before running an inference")
539561
}
540562

541563
protocol := "http"
542-
if tls {
564+
if useTls {
543565
protocol = "https"
544566
}
545567

fvt/globals.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ var NameSpaceScopeMode = false
2727
var DefaultConfig = map[string]interface{}{
2828
"podsPerRuntime": 1,
2929
"restProxy": map[string]interface{}{
30-
"enabled": true,
30+
"enabled": true,
31+
"skipVerify": true,
3132
},
3233
"scaleToZero": map[string]interface{}{
3334
"enabled": false,

fvt/predictor/predictor_suite_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,13 @@ var _ = JustBeforeEach(func() {
8787
})
8888
var _ = JustAfterEach(func() {
8989
if CurrentSpecReport().Failed() {
90+
FVTClientInstance.PrintMMConfig()
9091
FVTClientInstance.PrintPredictors()
9192
FVTClientInstance.PrintIsvcs()
9293
FVTClientInstance.PrintPods()
9394
FVTClientInstance.PrintDescribeNodes()
9495
FVTClientInstance.PrintEvents()
9596
FVTClientInstance.TailPodLogs(startTime)
97+
FVTClientInstance.PrintContainerEnvsFromAllPods()
9698
}
9799
})

fvt/predictor/predictor_test.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
package predictor
1616

1717
import (
18+
"crypto/sha1"
1819
"fmt"
1920
"time"
2021

21-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22-
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
23-
2422
inference "github.com/kserve/modelmesh-serving/fvt/generated"
2523
tfsframework "github.com/kserve/modelmesh-serving/fvt/generated/tensorflow/core/framework"
2624
tfsapi "github.com/kserve/modelmesh-serving/fvt/generated/tensorflow_serving/apis"
25+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
26+
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
2727

2828
. "github.com/kserve/modelmesh-serving/fvt"
2929
. "github.com/onsi/ginkgo/v2"
@@ -364,10 +364,16 @@ var _ = Describe("Predictor", func() {
364364
BeforeAll(func() {
365365
// load the test predictor object
366366
tfPredictorObject = NewPredictorForFVT("tf-predictor.yaml")
367+
rd := fmt.Sprintf("%x", sha1.Sum([]byte(time.Now().String())))
368+
randomName := fmt.Sprintf("minimal-tf-predictor-%s", rd[len(rd)-5:])
369+
SetString(tfPredictorObject, randomName, "metadata", "name")
370+
367371
tfPredictorName = tfPredictorObject.GetName()
368372

369373
CreatePredictorAndWaitAndExpectLoaded(tfPredictorObject)
370374

375+
WaitForStableActiveDeployState(time.Second * 60)
376+
371377
err := FVTClientInstance.ConnectToModelServing(Insecure)
372378
Expect(err).ToNot(HaveOccurred())
373379
})
@@ -1175,6 +1181,7 @@ var _ = Describe("TLS XGBoost inference", Ordered, Serial, func() {
11751181

11761182
It("should successfully run an inference with basic TLS", func() {
11771183
By("Updating the user ConfigMap to for basic TLS")
1184+
11781185
FVTClientInstance.UpdateConfigMapTLS(BasicTLSConfig)
11791186

11801187
By("Waiting for stable deploy state after UpdateConfigMapTLS")

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/kserve/modelmesh-serving
22

3-
go 1.21
3+
go 1.22.9
44

55
require (
66
github.com/dereklstinson/cifar v0.0.0-20200421171932-5722a3b6a0c7

0 commit comments

Comments
 (0)