11470: Fix accidentally cleared fields during job_task update.
authorTom Clegg <tom@curoverse.com>
Thu, 20 Apr 2017 02:09:45 +0000 (22:09 -0400)
committerTom Clegg <tom@curoverse.com>
Thu, 20 Apr 2017 02:09:45 +0000 (22:09 -0400)
Updating with a Task struct had the effect of clearing job_uuid,
created_by_job_task_uuid, and parameters fields, and resetting
sequence to 0.

sdk/go/crunchrunner/crunchrunner.go

index 5d7e10be4beb34fef1892b2d2d7c150fd9906176..36343d3df33c655dc9eba8c0790b2598d9c4fa11 100644 (file)
@@ -254,10 +254,10 @@ func runner(api IArvadosClient,
                        }
                        err = api.Update("job_tasks", taskUuid,
                                map[string]interface{}{
-                                       "job_task": Task{
-                                               Output:   "",
-                                               Success:  true,
-                                               Progress: 1.0}},
+                                       "job_task": map[string]interface{}{
+                                               "output":   "",
+                                               "success":  true,
+                                               "progress": 1.0}},
                                nil)
                        return nil
                }