From 654194490968daac964750e9a2c024c5e34c640f Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Tue, 16 Jun 2026 16:51:15 -0400 Subject: [PATCH 1/4] ui: fix error getting task logs when refreshing page --- ui/app/routes/allocations/allocation/task/logs.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/app/routes/allocations/allocation/task/logs.js b/ui/app/routes/allocations/allocation/task/logs.js index 987283e4c39..a7c8127eee2 100644 --- a/ui/app/routes/allocations/allocation/task/logs.js +++ b/ui/app/routes/allocations/allocation/task/logs.js @@ -4,9 +4,20 @@ */ import Route from '@ember/routing/route'; +import { service } from '@ember/service'; export default class LogsRoute extends Route { + @service abilities; model() { - return this.modelFor('allocations.allocation.task'); + const task = this.modelFor('allocations.allocation.task') + // streaming logs can require the node object to be loaded + // in order for the logUrl() function to correctly use the + // allocation.node.httpAddr property. + // An alternative option here is to use just allocation.node + // as the computed property for logUrl() + if (this.abilities.can('read client')){ + return task.get('allocation.node').then(() => task) + } + return task } } From d48198f9d7e09518c9a7a59b8adb6ab3d274e6b7 Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Tue, 16 Jun 2026 17:04:27 -0400 Subject: [PATCH 2/4] lint --- ui/app/routes/allocations/allocation/task/logs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/app/routes/allocations/allocation/task/logs.js b/ui/app/routes/allocations/allocation/task/logs.js index a7c8127eee2..629a42a9209 100644 --- a/ui/app/routes/allocations/allocation/task/logs.js +++ b/ui/app/routes/allocations/allocation/task/logs.js @@ -9,15 +9,15 @@ import { service } from '@ember/service'; export default class LogsRoute extends Route { @service abilities; model() { - const task = this.modelFor('allocations.allocation.task') + const task = this.modelFor('allocations.allocation.task'); // streaming logs can require the node object to be loaded // in order for the logUrl() function to correctly use the // allocation.node.httpAddr property. // An alternative option here is to use just allocation.node // as the computed property for logUrl() - if (this.abilities.can('read client')){ - return task.get('allocation.node').then(() => task) + if (this.abilities.can('read client')) { + return task.get('allocation.node').then(() => task); } - return task + return task; } } From 86aec5fdb127187744f8206df7eb93038ece38ec Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Wed, 17 Jun 2026 09:37:40 -0400 Subject: [PATCH 3/4] check for undefined task --- ui/app/routes/allocations/allocation/task/logs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/routes/allocations/allocation/task/logs.js b/ui/app/routes/allocations/allocation/task/logs.js index 629a42a9209..ef2cfc1e41e 100644 --- a/ui/app/routes/allocations/allocation/task/logs.js +++ b/ui/app/routes/allocations/allocation/task/logs.js @@ -16,7 +16,7 @@ export default class LogsRoute extends Route { // An alternative option here is to use just allocation.node // as the computed property for logUrl() if (this.abilities.can('read client')) { - return task.get('allocation.node').then(() => task); + return task && task.get('allocation.node').then(() => task); } return task; } From 2435506c638696fdf41203a2c9f24d42b2754e8f Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Tue, 23 Jun 2026 13:02:07 -0400 Subject: [PATCH 4/4] add cl --- .changelog/28137.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/28137.txt diff --git a/.changelog/28137.txt b/.changelog/28137.txt new file mode 100644 index 00000000000..7956c7b6967 --- /dev/null +++ b/.changelog/28137.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: fixes an issue where streaming task logs would error +```