Skip to content

ui: fix service page not rendering#28005

Open
pkazmierczak wants to merge 2 commits into
mainfrom
b-fix-service-detail-page
Open

ui: fix service page not rendering#28005
pkazmierczak wants to merge 2 commits into
mainfrom
b-fix-service-detail-page

Conversation

@pkazmierczak
Copy link
Copy Markdown
Contributor

@pkazmierczak pkazmierczak commented May 19, 2026

Fixes a bug in the service detail page rendering.

Running a jobspec:

job "example" {

  group "group" {

    service {
      name     = "httpd-web"
      provider = "nomad"
    }

    task "task" {

      driver = "docker"
      user   = "www-data"

      config {
        image   = "busybox:1"
        command = "httpd"
        args    = ["-vv", "-f", "-p", "8001", "-h", "/local"]
      }

      resources {
        cpu    = 100
        memory = 100
      }

    }
  }
}
$ nomad service info http-web
Job ID   Address  Tags  Node ID   Alloc ID
example  <none>   []    2b91b659  5e117e45

In the UI I can see:

Screenshot 2026-05-19 at 10 25 54 Screenshot 2026-05-19 at 10 26 10

Console shows no JS/ember errors.

Resolves #27980

@pkazmierczak pkazmierczak self-assigned this May 19, 2026
@pkazmierczak pkazmierczak requested review from a team as code owners May 19, 2026 08:34
@pkazmierczak pkazmierczak added theme/ui backport/2.0.x backport to 2.0.x release line labels May 19, 2026
@pkazmierczak pkazmierczak requested review from aklkv and tgross May 19, 2026 08:39
@tgross
Copy link
Copy Markdown
Member

tgross commented May 19, 2026

I checked out this branch to test (Chrome on Fedora Linux). I'm seeing the page rendered as I'd expect, but I see the following error in the console:

index.js:10 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
    at isIPv6 (index.js:10:321)
    at NetworkSerializer.normalize (network.js:29:1)
    at Class.deserializeSingle (fragment.js:77:1)
    at Class.<anonymous> (fragment-array.js:26:1)
    at Array.map (<anonymous>)
    at Class.deserializeFragmentArray [as deserialize] (fragment-array.js:25:1)
    at ext.js:211:1
    at has-many-d45aa09e.js:5484:1
    at Map.forEach (<anonymous>)
    at Resources.eachTransformedAttribute (has-many-d45aa09e.js:5483:1)

If I delete the service registration out from under the job, I see this error:

ember.js:308 Uncaught (in promise) Error: Assertion Failed: <model::service:_nomad-task-e6ef1eef-1f2b-d38a-2bd1-9f22b7a46337-group-web-httpd-web-www> is not a record instantiated by @ember-data/store
    at assert (ember.js:308:1)
    at recordIdentifierFor (index-cc461d33.js:2903:1)
    at lookupLegacySupport (has-many-d45aa09e.js:3650:1)
    at Service.belongsTo (has-many-d45aa09e.js:4528:1)
    at formatID (format-id.js:15:1)
    at ember.js:9589:1
    at SimpleClassicHelperManager.getValue (ember.js:9589:1)
    at ember.js:1901:1
    at ember.js:1763:1
    at track (ember.js:1654:1)

And once I hit this error, I can't tab-over to any of the other tabs in the job page without hard-reloading the page.

@pkazmierczak
Copy link
Copy Markdown
Contributor Author

huh. ok I checked on macOS Chrome 148.0.7778.168, couldn't see any errors, but I'll do more checks with other browsers.

@pkazmierczak
Copy link
Copy Markdown
Contributor Author

pkazmierczak commented May 20, 2026

@tgross I was never able to reproduce your errors, neither on macOS nor on darwin. Tried with latest Chrome stable and FF.

@aklkv mind having a look at this? Tests are green, and in my manual testing it all works as expected.

@tgross
Copy link
Copy Markdown
Member

tgross commented May 20, 2026

@tgross I was never able to reproduce your errors, neither on macOS nor on darwin. Tried with latest Chrome stable and FF.

Including deleting the service out from under the UI? That's the one that triggered the more serious of the two bugs. I just reproduced again:

$ nomad service info -verbose httpd-web
ID           = _nomad-task-c9c0749b-b40d-4e6f-31f8-2e463039226b-group-web-httpd-web-www
Service Name = httpd-web
Namespace    = default
Job ID       = httpd
Alloc ID     = c9c0749b-b40d-4e6f-31f8-2e463039226b
Node ID      = c5cb6f23-a86d-373c-7528-cf70675557e9
Datacenter   = dc1
Address      = 192.168.1.194:26932
Tags         = []

$ nomad service delete httpd-web _nomad-task-c9c0749b-b40d-4e6f-31f8-2e463039226b-group-web-httpd-web-www
Successfully deleted service registration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/2.0.x backport to 2.0.x release line theme/ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI: service detail page fails to render

3 participants