-
Notifications
You must be signed in to change notification settings - Fork 435
Deprecate the hook config mode for cri-o #1314
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
Deprecate the hook config mode for cri-o #1314
Conversation
Pull Request Test Coverage Report for Build 17973486093Details
💛 - Coveralls |
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.
Pull Request Overview
Updates the default CRI-O configuration mode from 'hook' to 'config' to align with the GPU Operator's upcoming change in default behavior.
- Changed default configuration mode constant from "hook" to "config"
ArangoGutierrez
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.
LGTM, I'll leave final approval to ELezar
| Name = "crio" | ||
|
|
||
| defaultConfigMode = "hook" | ||
| defaultConfigMode = "config" |
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.
My one question was whether we wanted to print a deprecation warning when hook is configured?
In this case we would also need to update the nvidia-ctk runtime configure command to issue a similar warning.
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.
Minor UX improvement in terms of issuing a deprecation warning.
In order to more easily capture this in the release notes, maybe we can update the commit message to something like:
Deprecate hook config mode for cro-o
.
5446a9e to
e1f0f36
Compare
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.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| Usage: "the path to the OCI runtime hook to create if --config-mode=oci-hook is specified. If no path is specified, the generated hook is output to STDOUT.\n" + | ||
| "\tNote: The use of OCI hooks is deprecated.", |
Copilot
AI
Sep 24, 2025
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.
[nitpick] String concatenation across multiple lines reduces readability. Consider using a multi-line string literal or keeping the original format for better maintainability.
| Usage: "the path to the OCI runtime hook to create if --config-mode=oci-hook is specified. If no path is specified, the generated hook is output to STDOUT.\n" + | |
| "\tNote: The use of OCI hooks is deprecated.", | |
| Usage: `the path to the OCI runtime hook to create if --config-mode=oci-hook is specified. If no path is specified, the generated hook is output to STDOUT. | |
| Note: The use of OCI hooks is deprecated.`, |
| } | ||
|
|
||
| func (opts *Options) Validate(logger logger.Interface, _ *cli.Command) error { | ||
| if opts.configMode == "hook" { |
Copilot
AI
Sep 24, 2025
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.
Use the defined constant configModeHook instead of the string literal "hook" for consistency with the newly introduced constants.
This chagne updates the default cri-o config mode from 'hook' to 'config' and issues a deprecation warning if hook is explicitly selected. Signed-off-by: Christopher Desiniotis <[email protected]> Co-authored-by: Evan Lezar <[email protected]>
e1f0f36 to
781bbe2
Compare
elezar
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.
Thanks @cdesiniotis.
I added the deprecation log messages as changes on-top.
|
Thanks @elezar |
The GPU Operator is switching from 'hook' to 'config' by default in the next release. This change ensures the default behavior of the toolkit container and GPU Operator are aligned. We also add deprecation messages to cases where an OCI hook is explicitly requested.
See thread for additional context: NVIDIA/gpu-operator#1578 (comment)