Skip to content

[Bug] Wrong default value for cmd flags #5023

Description

@machichima

Search before asking

  • I searched the issues and found no similar issues.

KubeRay Component

kubectl-plugin

What happened + What you expected to happen

Related to: #3801

  1. Should be ""

    cmd.Flags().StringVar(&options.outputDir, "out-dir", options.outputDir, "directory to save the logs to")

  2. Can directly use util.RayVersion

    cmd.Flags().StringVar(&options.image, "image", fmt.Sprintf("rayproject/ray:%s", options.rayVersion), "container image to use")

    cmd.Flags().StringVar(&options.image, "image", fmt.Sprintf("rayproject/ray:%s", options.rayVersion), "container image to use")

For 2., an improvement can be update the image if user specify ray version that's different from default (now there can be some mismatch). Like what we did in create_cluster.go

// If the image is the default but the ray version is not the default, set the image to use the specified ray version
if options.image == defaultImageWithTag && options.rayVersion != util.RayVersion {
options.image = fmt.Sprintf("%s:%s", defaultImage, options.rayVersion)
}

Reproduction script

N/A

Anything else

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingclikubectl plugingood-first-issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions