Fix for possible metadata duplicates as well as un-initialized GPU resource when creating a new job update.

This commit is contained in:
Renan DelValle 2019-03-15 12:28:56 -07:00
parent c997b90720
commit 40a6e8145b
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
2 changed files with 9 additions and 1 deletions

View file

@ -96,6 +96,7 @@ func NewUpdateJob(config *aurora.TaskConfig, settings *aurora.JobUpdateSettings)
}
if ptr.NumGpus != nil {
job.resources[GPU] = &aurora.Resource{}
job.resources[GPU].NumGpus = ptr.NumGpus
continue // Guard against Union violations that Go won't enforce
}