Skip to content

ui: fix service page not rendering - #28005

Merged
tgross merged 5 commits into
mainfrom
b-fix-service-detail-page
May 22, 2026
Merged

tgross merged 5 commits into
mainfrom
b-fix-service-detail-page

Conversation

@pkazmierczak

@pkazmierczak pkazmierczak commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

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

tgross commented May 19, 2026

Copy link
Copy Markdown
Member

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

pkazmierczak commented May 20, 2026 •

Copy link
Copy Markdown
Contributor Author

@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.

aklkv
aklkv previously approved these changes May 20, 2026
@tgross

tgross commented May 20, 2026

Copy link
Copy Markdown
Member

@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

@pkazmierczak

pkazmierczak commented May 21, 2026 •

Copy link
Copy Markdown
Contributor Author

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

a-ha! So what I did in the past was I'd update the job, removing the service. Never removed the service manually. I reproduced now!

@pkazmierczak

pkazmierczak commented May 21, 2026 •

Copy link
Copy Markdown
Contributor Author

ok ok. @tgross in ef0831c I fixed a few things. The services page now details the service as it should, but if a service gets deleted, it shows no allocations running a service, but the service still present in the list (since it's defined in the jobspec).

Screenshot 2026-05-21 at 09 58 46 Screenshot 2026-05-21 at 09 58 50

can you check on your end?

@tgross tgross added backport/ent/1.10.x+ent backport to 1.10.x+ent release line backport/ent/1.11.x+ent backport to 1.11.x+ent release line labels May 22, 2026

@tgross tgross left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, LGTM!

@tgross
tgross merged commit 83ef3d0 into main May 22, 2026
27 checks passed
@tgross
tgross deleted the b-fix-service-detail-page branch May 22, 2026 18:57
@github-actions

Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 25, 2026

This branch was successfully deployed

1 active deployment
Preview — 0bfced77 Deployed May 21, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/ent/1.10.x+ent backport to 1.10.x+ent release line backport/ent/1.11.x+ent backport to 1.11.x+ent release line 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