Skip to content

Commit

Permalink
fix: flamectl job update
Browse files Browse the repository at this point in the history
flamectl's job udpate code was not updated when modelSpec and dataSpec
were introduced. Therefore, the job update code produces incorrect
configuraiton. This bug is now fixed in flamectl code.
  • Loading branch information
myungjin committed Sep 6, 2023
1 parent d392443 commit 142ae9a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/flamectl/resources/job/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,13 @@ func Update(params Params) error {
}

// encode the data
jobSpec := openapi.JobSpec{}
//validate the input - to ensure dataSpecPath and ModelSpecPath are correctly provide
isValid, jobSpec := createJobSpec(data, params.JobFile)
if !isValid {
fmt.Printf("Incorrect job specification provided %s\n", params.JobFile)
return nil
}

err = json.Unmarshal(data, &jobSpec)
if err != nil {
fmt.Printf("Failed to parse %s\n", params.JobFile)
Expand Down

0 comments on commit 142ae9a

Please sign in to comment.