hashicorp / hashicorp/nomad

UI error in the alloc details page when the allocation is rescheduled

Open
#11,996 1 comment 0 reactions 0 assignees View on GitHub
theme/ui type/bug
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

### Nomad version
`v1.2.4`

### Operating system and Environment details

### Issue
When accessing an allocation with a failed task, the allocation details page throw this error:

```
Uncaught TypeError: task is undefined
getTaskSortPrefix http://localhost:4200/ui/assets/nomad-ui.js:8123
_dec3 http://localhost:4200/ui/assets/nomad-ui.js:8042
customSort http://localhost:4200/ui/assets/vendor.js:46525
customSort http://localhost:4200/ui/assets/vendor.js:46525
arrayMacro http://localhost:4200/ui/assets/vendor.js:45184
get http://localhost:4200/ui/assets/vendor.js:20890
untrack http://localhost:4200/ui/assets/vendor.js:61061
get http://localhost:4200/ui/assets/vendor.js:20889
...
```
Full API JSON result and browser error stack: https://gist.github.com/lgfa29/9435ccaaf0f810ae56776fe7fa6c016a

![ezgif com-gif-maker(2)](https://user-images.githubusercontent.com/775380/152378118-e06f8190-deb2-43e5-9a68-1e439a2ed6bc.gif)

### Reproduction steps

The job I used was a mess, but I will try to create a simple job that reproduces this

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the allocation details page and reproduce the error with an allocation containing a failed task that has been rescheduled. Compare the full API JSON and browser stack trace in the linked gist with the generated nomad-ui.js locations; done means the page renders without the “task is undefined” error for that allocation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.