-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Nomad UI breaks when a job name includes a period #4866
Comments
Hi @nickwales, I just tried replicating this locally with v0.8.6 and couldn't. Can you reproduce this while the chrome/firefox/safari dev tools are open monitoring network traffic? I'm wondering if the API request is erroring and causing the UI to error. Or maybe the dots are a red herring and the issue is something else? I'm looking for a screenshot like this: Thank you! |
@DingoEatingFuzz interesting that you're not seeing it, could be a red herring but I can't yet see any differences between jobs with and without the dots! The network diagram or syslog doesn't show me anything but the console has an unrecoverable error: |
Thank you for the screenshots @nickwales. @angrycub managed to reproduce this and together we diagnosed the issue. Turns out it isn't the dot in the job name, but a dot in the task name. This is a perfectly valid Nomad thing to do, but it breaks this line of code. const state = get(hash, `TaskStates.${key}`);
const state = get(hash, `TaskStates.my.task`); Which uses Ember's getter function to avoid having to check for undefined objects. Unfortunately, this expands to vanilla js that looks something like const state = hash.TaskStates.my.task; Which doesn't work since the actual object looks something like {
"TaskStates": {
"my.task": { ... }
}
} The correct js is more like const state = hash.TaskStates ? hash.TaskStates['my.task'] : {} Now that the root issue is known, I can fix it. I'll also make sure to check any other place where this might be a problem. |
Awesome, thank you! |
Fixed in #4994 |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Nomad version
Nomad v0.8.6
Operating system and Environment details
Ubuntu 16.04
Issue
The UI breaks whenever a job name has a period
Reproduction steps
Run a job with periods in the name e.g. 'my.new.job' , browse the jobs view and click on a job with a period. Get a page with "Error Something went wrong"
The text was updated successfully, but these errors were encountered: