Skip to content

Conversation

@mkoushni
Copy link

Goal

This PR updates the required Go version for the tensorboard-controller component to Go 1.24.x. This change is necessary to maintain compatibility with updated Kubernetes client libraries and ensure the component is built with current, supported security patches.

Changes Made

Updated the go.mod file to specify go 1.24.

Synchronized dependencies via go mod tidy and go mod vendor to lock in compatible library versions (including necessary updates to transitive dependencies like golang.org/x/text, etc.).

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign thesuperzapper for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot added the area/controller area - related to controller components label Nov 18, 2025
@google-oss-prow google-oss-prow bot added area/v1 area - version - kubeflow notebooks v1 size/XS labels Nov 18, 2025
@mkoushni
Copy link
Author

/assign @mkoushni

@google-oss-prow google-oss-prow bot added size/S and removed size/XS labels Nov 24, 2025
@mkoushni mkoushni marked this pull request as ready for review November 25, 2025 13:36
Copy link

@liavweiss liavweiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Marina. In addition to the review comments, please include the go.sum file in the PR as well.
This file is important for validating module dependencies and ensuring consistent, reproducible builds across different environments.


WORKDIR /workspace/tensorboard-controller
COPY tensorboard-controller/go.mod tensorboard-controller/go.sum ./
RUN go mod download

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can copy go.mod and go.sum first, then run go mod download, and only after that copy the rest of the source
This preserves Docker layer caching: dependencies are downloaded only when the module files change, not every time source code changes. It significantly speeds up builds.

# Copy only Go module files first for better layer caching
COPY tensorboard-controller/go.mod tensorboard-controller/go.sum ./
# Download dependencies based on mod files
RUN go mod download
# Now copy the full source
COPY tensorboard-controller/ ./

WORKDIR /
COPY --from=builder /workspace/tensorboard-controller/manager .
USER 65532:65532
COPY --from=builder /manager /manager

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the copy of the compiled binary should be before switching to the non-root user
This aligns with standard Docker conventions and avoids permission or ownership ambiguity in the final image.

Suggested change
COPY --from=builder /manager /manager
COPY --from=builder /manager /manager
USER 65532:65532

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/controller area - related to controller components area/v1 area - version - kubeflow notebooks v1 size/S

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

2 participants