mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
address review comments
This commit is contained in:
@@ -604,6 +604,9 @@ func (b *Builder) setAlloc(alloc *structs.Allocation) *Builder {
|
||||
tg := alloc.Job.LookupTaskGroup(alloc.TaskGroup)
|
||||
|
||||
b.otherPorts = make(map[string]string, len(tg.Tasks)*2)
|
||||
|
||||
// Protect against invalid allocs where AllocatedResources isn't set.
|
||||
// TestClient_AddAllocError explicitly tests for this condition
|
||||
if alloc.AllocatedResources != nil {
|
||||
// Populate task resources
|
||||
if tr, ok := alloc.AllocatedResources.Tasks[b.taskName]; ok {
|
||||
|
||||
Reference in New Issue
Block a user