-
Notifications
You must be signed in to change notification settings - Fork 69
feat: Upgrade Go to 1.24 - notebook-controller component. #721 #748
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
base: notebooks-v1
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
11f9f79 to
5df2e12
Compare
05e2d3d to
a8b52c0
Compare
|
Thank you, Abdalla |
fb92eff to
5119a77
Compare
|
/assign |
|
close: #721 |
|
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.
I checked our environment and the module cache is writable, so We can remove these flags, though it’s not required for the PR approval. |
|
New changes are detected. LGTM label has been removed. |
|
done |
Signed-off-by: Abdallah Samara (EXT-Nokia) <[email protected]>
Signed-off-by: abdallahsamabd <[email protected]>
Signed-off-by: abdallahsamabd <[email protected]>
Signed-off-by: abdallahsamabd <[email protected]>
Signed-off-by: abdallahsamabd <[email protected]>
Signed-off-by: abdallahsamabd <[email protected]>
Signed-off-by: abdallahsamabd <[email protected]>
fbe6baf to
d961d17
Compare
andyatmiami
left a comment
There was a problem hiding this 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-genupgrade- something? to do with
hashicorpmodules
should definitely perk your attention and realize you need to comment on why these changes are necessarily/included.
THANKS!
| # 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 | ||
|
|
There was a problem hiding this comment.
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 🙇
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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!)
There was a problem hiding this comment.
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
|
/ok-to-test |









No description provided.