Skip to content

Commit

Permalink
[Fix][kubectl-plugin] ray job submit runtime-env-json null error (ray…
Browse files Browse the repository at this point in the history
…-project#3063)

Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
  • Loading branch information
MortalHappiness authored Feb 14, 2025
1 parent 4aa91f1 commit a860884
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kubectl-plugin/pkg/cmd/job/job_submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (options *SubmitJobOptions) Validate() error {
}

runtimeEnvYaml := options.RayJob.Spec.RuntimeEnvYAML
if options.runtimeEnv == "" && options.runtimeEnvJson == "" {
if options.runtimeEnv == "" && options.runtimeEnvJson == "" && runtimeEnvYaml != "" {
runtimeJson, err := yaml.YAMLToJSON([]byte(runtimeEnvYaml))
if err != nil {
return fmt.Errorf("Failed to convert runtime env to json: %w", err)
Expand Down

0 comments on commit a860884

Please sign in to comment.