Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update golang docker tag #517

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/access-management/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GOLANG_VERSION=1.17
ARG GOLANG_VERSION=1.24
FROM golang:${GOLANG_VERSION} as builder

WORKDIR /workspace
2 changes: 1 addition & 1 deletion components/admission-webhook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
ARG GOLANG_VERSION=1.21
ARG GOLANG_VERSION=1.24
FROM golang:${GOLANG_VERSION} as builder

# Copy in the go src
2 changes: 1 addition & 1 deletion components/notebook-controller/Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
#
# This is necessary because the Jupyter controller now depends on
# components/common
ARG GOLANG_VERSION=1.15
ARG GOLANG_VERSION=1.24
FROM golang:${GOLANG_VERSION} as builder

WORKDIR /workspace
2 changes: 1 addition & 1 deletion components/profile-controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.17 as builder
FROM golang:1.24 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
2 changes: 1 addition & 1 deletion components/pvcviewer-controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
ARG GOLANG_VERSION=1.22.2
ARG GOLANG_VERSION=1.24.0
FROM golang:${GOLANG_VERSION} as builder

WORKDIR /workspace
2 changes: 1 addition & 1 deletion components/tensorboard-controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
#
# This is necessary because the Jupyter controller now depends on
# components/common
FROM golang:1.17 as builder
FROM golang:1.24 as builder

WORKDIR /workspace
# Copy the Go Modules manifests

Unchanged files with check annotations Beta

for envVar, val := range c.env {
os.Setenv(envVar, val)
}
initGlobalVars()

Check failure on line 256 in components/notebook-controller/controllers/culling_controller_test.go

GitHub Actions / golangci-lint (components/notebook-controller)

Error return value is not checked (errcheck)
if notebookIsIdle(c.meta, TestLogger) != c.result {
t.Errorf("ENV VAR: %+v\n", c.env)
t.Errorf("Wrong result for case object: %+v\n", c.meta)
)
// log is for logging in this package.
var notebooklog = logf.Log.WithName("notebook-resource")

Check failure on line 24 in components/notebook-controller/api/v1beta1/notebook_webhook.go

GitHub Actions / golangci-lint (components/notebook-controller)

var `notebooklog` is unused (unused)
func (r *Notebook) SetupWebhookWithManager(mgr ctrl.Manager) error {
return ctrl.NewWebhookManagedBy(mgr).
}
if meta.GetAnnotations() != nil {
if _, ok := meta.GetAnnotations()["notebooks.kubeflow.org/last_activity"]; ok {

Check failure on line 137 in components/notebook-controller/pkg/culler/culler.go

GitHub Actions / golangci-lint (components/notebook-controller)

S1033: unnecessary guard around call to delete (gosimple)
delete(meta.GetAnnotations(), "notebooks.kubeflow.org/last_activity")
}
}
func updateTimestampFromKernelsActivity(meta *metav1.ObjectMeta, kernels []KernelStatus) bool {
log := log.WithValues("notebook", getNamespacedNameFromMeta(*meta))
if kernels == nil || len(kernels) == 0 {

Check failure on line 325 in components/notebook-controller/pkg/culler/culler.go

GitHub Actions / golangci-lint (components/notebook-controller)

S1009: should omit nil check; len() for []github.com/kubeflow/kubeflow/components/notebook-controller/pkg/culler.KernelStatus is defined as zero (gosimple)
log.Info("Notebook has no kernels. Will not update last-activity")
return false
}
}
t := getNotebookRecentTime(arr, "api/kernels")
log.Info(fmt.Sprintf("Comparing api/kernels last_activity time to current notebook annotation time"))

Check failure on line 346 in components/notebook-controller/pkg/culler/culler.go

GitHub Actions / golangci-lint (components/notebook-controller)

S1039: unnecessary use of fmt.Sprintf (gosimple)
if t == "" || !compareAnnotationTimeToResource(meta, t) {
return false
}
// going backwards in time.
log := log.WithValues("notebook", getNamespacedNameFromMeta(*meta))
if terminals == nil || len(terminals) == 0 {

Check failure on line 362 in components/notebook-controller/pkg/culler/culler.go

GitHub Actions / golangci-lint (components/notebook-controller)

S1009: should omit nil check; len() for []github.com/kubeflow/kubeflow/components/notebook-controller/pkg/culler.TerminalStatus is defined as zero (gosimple)
log.Info("Notebook has no terminals. Will not update last-activity")
return false
}
}
t := getNotebookRecentTime(arr, "api/terminals")
log.Info(fmt.Sprintf("Comparing api/terminals last_activity time to current notebook annotation time"))

Check failure on line 373 in components/notebook-controller/pkg/culler/culler.go

GitHub Actions / golangci-lint (components/notebook-controller)

S1039: unnecessary use of fmt.Sprintf (gosimple)
if t == "" || !compareAnnotationTimeToResource(meta, t) {
return false
}
func updateTimestampFromKernelsActivity(meta *metav1.ObjectMeta, kernels []KernelStatus, log logr.Logger) bool {
if kernels == nil || len(kernels) == 0 {

Check failure on line 359 in components/notebook-controller/controllers/culling_controller.go

GitHub Actions / golangci-lint (components/notebook-controller)

S1009: should omit nil check; len() for []github.com/kubeflow/kubeflow/components/notebook-controller/controllers.KernelStatus is defined as zero (gosimple)
log.Info("Notebook has no kernels. Will not update last-activity")
return false
}
}
t := getNotebookRecentTime(arr, "api/kernels", log)
log.Info(fmt.Sprintf("Comparing api/kernels last_activity time to current notebook annotation time"))

Check failure on line 380 in components/notebook-controller/controllers/culling_controller.go

GitHub Actions / golangci-lint (components/notebook-controller)

S1039: unnecessary use of fmt.Sprintf (gosimple)
if t == "" || !compareAnnotationTimeToResource(meta, t, log) {
return false
}
// check this timestamp against the current annotation timestamp to ensure we are not
// going backwards in time.
if terminals == nil || len(terminals) == 0 {

Check failure on line 395 in components/notebook-controller/controllers/culling_controller.go

GitHub Actions / golangci-lint (components/notebook-controller)

S1009: should omit nil check; len() for []github.com/kubeflow/kubeflow/components/notebook-controller/controllers.TerminalStatus is defined as zero (gosimple)
log.Info("Notebook has no terminals. Will not update last-activity")
return false
}
ctx context.Context) error {
// Wait until the image pull secret is mounted in the notebook service
// account
retry.OnError(wait.Backoff{

Check failure on line 122 in components/odh-notebook-controller/controllers/notebook_controller.go

GitHub Actions / golangci-lint (components/odh-notebook-controller)

Error return value of `retry.OnError` is not checked (errcheck)
Steps: 3,
Duration: 1 * time.Second,
Factor: 5.0,
func NewNotebookOAuthSecret(notebook *nbv1.Notebook) *corev1.Secret {
// Generate the cookie secret for the OAuth proxy
cookieSeed := make([]byte, 16)
rand.Read(cookieSeed)

Check failure on line 193 in components/odh-notebook-controller/controllers/notebook_oauth.go

GitHub Actions / golangci-lint (components/odh-notebook-controller)

Error return value of `rand.Read` is not checked (errcheck)
cookieSecret := base64.StdEncoding.EncodeToString(
[]byte(base64.StdEncoding.EncodeToString(cookieSeed)))
return nil
}
func (tc *testContext) ensureOAuthNetworkPolicyExists(nbMeta *metav1.ObjectMeta, err error) error {

Check failure on line 142 in components/odh-notebook-controller/e2e/notebook_creation_test.go

GitHub Actions / golangci-lint (components/odh-notebook-controller)

SA4009: argument err is overwritten before first use (staticcheck)
// Test Notebook Network policy that allows all requests on Notebook OAuth port
notebookOAuthNetworkPolicy, err := tc.getNotebookNetworkPolicy(nbMeta, nbMeta.Name+"-oauth-np")

Check failure on line 144 in components/odh-notebook-controller/e2e/notebook_creation_test.go

GitHub Actions / golangci-lint (components/odh-notebook-controller)

SA4009(related information): assignment to err (staticcheck)
if err != nil {
return fmt.Errorf("error getting network policy for Notebook OAuth port %v: %v", notebookOAuthNetworkPolicy.Name, err)
}
To: routev1.RouteTargetReference{
Kind: "Service",
Name: notebook.Name,
Weight: pointer.Int32Ptr(100),

Check failure on line 47 in components/odh-notebook-controller/controllers/notebook_route.go

GitHub Actions / golangci-lint (components/odh-notebook-controller)

SA1019: pointer.Int32Ptr is deprecated: Use ptr.To instead. (staticcheck)
},
Port: &routev1.RoutePort{
TargetPort: intstr.FromString("http-" + notebook.Name),
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: notebook.Name + "-oauth-config",
DefaultMode: pointer.Int32Ptr(420),

Check failure on line 190 in components/odh-notebook-controller/controllers/notebook_webhook.go

GitHub Actions / golangci-lint (components/odh-notebook-controller)

SA1019: pointer.Int32Ptr is deprecated: Use ptr.To instead. (staticcheck)
},
},
}
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: notebook.Name + "-tls",
DefaultMode: pointer.Int32Ptr(420),

Check failure on line 213 in components/odh-notebook-controller/controllers/notebook_webhook.go

GitHub Actions / golangci-lint (components/odh-notebook-controller)

SA1019: pointer.Int32Ptr is deprecated: Use ptr.To instead. (staticcheck)
},
},
}
Kind: "Notebook",
Name: Name,
UID: notebook.GetObjectMeta().GetUID(),
Controller: pointer.BoolPtr(true),

Check failure on line 146 in components/odh-notebook-controller/controllers/notebook_controller_test.go

GitHub Actions / golangci-lint (components/odh-notebook-controller)

SA1019: pointer.BoolPtr is deprecated: Use ptr.To instead. (staticcheck)
BlockOwnerDeletion: pointer.BoolPtr(true),

Check failure on line 147 in components/odh-notebook-controller/controllers/notebook_controller_test.go

GitHub Actions / golangci-lint (components/odh-notebook-controller)

SA1019: pointer.BoolPtr is deprecated: Use ptr.To instead. (staticcheck)
}
By("By checking that the Notebook owns the Route object")
Kind: "Notebook",
Name: Name,
UID: notebook.GetObjectMeta().GetUID(),
Controller: pointer.BoolPtr(true),

Check failure on line 539 in components/odh-notebook-controller/controllers/notebook_controller_test.go

GitHub Actions / golangci-lint (components/odh-notebook-controller)

SA1019: pointer.BoolPtr is deprecated: Use ptr.To instead. (staticcheck)
BlockOwnerDeletion: pointer.BoolPtr(true),
}