Skip to content

Conversation

@abdallahsamabd
Copy link

No description provided.

@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 kimwnasptd 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 area/controller area - related to controller components area/v1 area - version - kubeflow notebooks v1 size/S labels Nov 16, 2025
@abdallahsamabd abdallahsamabd marked this pull request as draft November 16, 2025 13:28
@abdallahsamabd abdallahsamabd force-pushed the feat/721 branch 2 times, most recently from 11f9f79 to 5df2e12 Compare November 16, 2025 21:33
@google-oss-prow google-oss-prow bot added size/M and removed size/S labels Nov 16, 2025
@abdallahsamabd abdallahsamabd force-pushed the feat/721 branch 2 times, most recently from 05e2d3d to a8b52c0 Compare November 16, 2025 22:33
@google-oss-prow google-oss-prow bot added size/L and removed size/M labels Nov 16, 2025
@abdallahsamabd
Copy link
Author

abdallahsamabd commented Nov 17, 2025

image image image image image

@liavweiss
Copy link

@abdallahsamabd abdallahsamabd force-pushed the feat/721 branch 2 times, most recently from fb92eff to 5119a77 Compare November 19, 2025 10:38
@abdallahsamabd
Copy link
Author

/assign

@liavweiss
Copy link

liavweiss commented Nov 19, 2025

close: #721
Thank you, Abdalla
/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Nov 19, 2025
@abdallahsamabd abdallahsamabd marked this pull request as ready for review November 19, 2025 12:30
@liavweiss
Copy link

Hey @abdallahsamabd , following my earlier review, I noticed one more thing that could be improved. It’s not mandatory, but it would make the code cleaner.

RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -mod=mod -o manager main.go

I checked our environment and the module cache is writable, so -mod=mod doesn’t add anything in Go 1.20+.
GO111MODULE=on is also deprecated and has no effect since modules are always enabled now.

We can remove these flags, though it’s not required for the PR approval.

@google-oss-prow google-oss-prow bot removed the lgtm label Nov 24, 2025
@google-oss-prow
Copy link

New changes are detected. LGTM label has been removed.

@abdallahsamabd
Copy link
Author

abdallahsamabd commented Nov 24, 2025

done

@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Kubeflow Notebooks Nov 24, 2025
Abdallah Samara (EXT-Nokia) and others added 7 commits November 30, 2025 10:59
Copy link
Contributor

@andyatmiami andyatmiami left a comment

Choose a reason for hiding this comment

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

Hey @abdallahsamabd - thanks for the these changes! I think we are close - but need some help from you articulating why a few decisions were made in this PR.

In general - consider using the PR description to provide valuable context like this at the time you open the PR so I don't have to reach back out to ask 😎

i..e with a PR titled Upgrade to Go 1.24 seeing things like:

  • controller-gen upgrade
  • something? to do with hashicorp modules

should definitely perk your attention and realize you need to comment on why these changes are necessarily/included.

THANKS!

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

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry - i don't see any discussion highlighting why exactly we are doing this (?)

I'm not (yet) commenting on if this is a good or bad change - only that we absolutely should be calling it out in the commit message to awareness.

Please provide justification/motivation behind adding this code block to help me review better 🙇

Copy link
Author

Choose a reason for hiding this comment

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

before adding this block, when running the code locally always failed on this line
COPY --from=builder /go/pkg/mod/github.com/hashicorp third_party/hashicorp

Go 1.24 behavior change: With Go 1.24, go mod download may not fully extract modules to /go/pkg/mod in a way that allows copying them. The explicit loop:
Finds all HashiCorp modules via go list -m all
Downloads each module explicitly with go mod download
Extracts them by running go list "$pkg/..." to ensure they're available in /go/pkg/mod
Without this step: The COPY command (COPY --from=builder /go/pkg/mod/github.com/hashicorp third_party/hashicorp) would fail because the modules might not be fully extracted or available at that path.
This ensures the HashiCorp source code is included in the final Docker image for license compliance, which is a common requirement for containerized applications using third-party dependencies.

.PHONY: controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Did we need to increase controller-gen to version 0.14.0 as a result of the Go upgrade to 1.24?

If its required - it at minimum should be called out in the commit message. If its not required - it feels like scope creep (imho) - unless all other controllers in notebooks-v1 are also using this 0.14.0 version (at which point aligning for consistency I could appreciate would be nice to have!)

Copy link
Author

@abdallahsamabd abdallahsamabd Dec 1, 2025

Choose a reason for hiding this comment

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

without this changes, when I ran unit tests, it failed
https://github.com/abdallahsamabd/notebooks/actions/runs/19412389148/job/55535609268
as I understand, controller-gen v0.8.0 is not compatible with Go 1.24. The newer version (v0.14.0) supports Go 1.24

@andyatmiami
Copy link
Contributor

/ok-to-test

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

Labels

area/ci area - related to ci area/controller area - related to controller components area/v1 area - version - kubeflow notebooks v1 ok-to-test size/L

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants