Skip to content

Conversation

@elezar
Copy link
Member

@elezar elezar commented Mar 7, 2025

The urfave update to v2.27.6 fixes the behaviour when disabling a separator for repeated StringSliceFlags. This change updates the nvidia-ctk config command to allow list options to be specified as comma-separated values.

For example:

➜  container-toolkit git:(allow-comma-separated-config-values) ✗ ./nvidia-ctk config --set nvidia-container-runtime.runtimes=foo,bar,baz | grep runtimes
runtimes = ["foo", "bar", "baz"]
➜  container-toolkit git:(allow-comma-separated-config-values) ✗ ./nvidia-ctk config --set nvidia-container-runtime.runtimes=foo:bar:baz | grep runtimes
runtimes = ["foo", "bar", "baz"]

@ArangoGutierrez ArangoGutierrez requested a review from Copilot March 7, 2025 14:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This PR updates the nvidia-ctk configuration command to allow list options to be specified as comma-separated values. It refactors the list-splitting logic in the config module and disables the automatic slice flag separator in the CLI application.

  • Refactored list splitting in config.go to check both the provided separator and comma.
  • Disabled the slice flag separator in main.go to ensure comma-separated list support.

Reviewed Changes

File Description
cmd/nvidia-ctk/config/config.go Updated list splitting logic to support comma-separated values.
cmd/nvidia-ctk/main.go Disabled the slice flag separator in the CLI to complement the new behavior.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

The urfave update to v2.27.6 fixes the behaviour when disabling a separator
for repeated StringSliceFlags. This change updates the nvidia-ctk config
command to allow list options to be specified as comma-separated values.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar force-pushed the allow-comma-separated-config-values branch from ef0f97b to d32449b Compare March 12, 2025 13:47
@elezar elezar merged commit e4547bd into NVIDIA:main Mar 12, 2025
16 checks passed
@elezar elezar deleted the allow-comma-separated-config-values branch March 12, 2025 14:21
@elezar elezar modified the milestone: v1.18.0 Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants