Skip to content

Backport of UI: fix client detail page failing to render into release/2.0.x#28012

Open
hc-github-team-nomad-core wants to merge 2 commits into
release/2.0.xfrom
backport/fix/NMD-1454/admittedly-square-penguin
Open

Backport of UI: fix client detail page failing to render into release/2.0.x#28012
hc-github-team-nomad-core wants to merge 2 commits into
release/2.0.xfrom
backport/fix/NMD-1454/admittedly-square-penguin

Conversation

@hc-github-team-nomad-core
Copy link
Copy Markdown
Contributor

Backport

This PR is auto-generated from #27958 to be assessed for backporting due to the inclusion of the label backport/2.0.x.

🚨

Warning automatic cherry-pick of commits failed. If the first commit failed,
you will see a blank no-op commit below. If at least one commit succeeded, you
will see the cherry-picked commits up to, not including, the commit where
the merge conflict occurred.

The person who merged in the original PR is:
@aklkv
This person should resolve the merge-conflict(s) by either:

  • Manually completing the cherry picks into this branch
  • Creating a new branch and manually cherry-picking all commits being backported

merge conflict error: POST https://api.github.com/repos/hashicorp/nomad/merges: 409 Merge conflict []

The below text is copied from the body of the original PR.


Description

Two distinct UI errors on the client detail page after the Ember 6.10 upgrade, plus dependency cleanup.

1. crypto.randomUUID is not a function

Ember Data 4.12 calls crypto.randomUUID() to mint record identifiers. The browser only exposes it in secure contexts (HTTPS or localhost/127.0.0.1), so users hitting Nomad over plain HTTP via a LAN IP/hostname crashed.

  • ui/package.json — added "@ember-data/store": "~4.12.8" as a direct dep so embroider can resolve the macro target.
  • ui/ember-cli-build.mjs — added:
    '@embroider/macros': {
      setConfig: {
        '@ember-data/store': { polyfillUUID: true },
      },
    },

2. Cannot read properties of undefined (reading 'length')

is-ip@5 (pulled in by the Ember 6 upgrade) tightened input validation: isIPv6(undefined) now throws on string.length. Triggered during fragment-array deserialization of Resources.Networks when an entry has no IP (e.g. reserved-port-only networks).

Fix — guard the call sites:

  • ui/app/serializers/network.jsif (ip && isIPv6(ip))
  • ui/app/serializers/port.jsif (ip && isIPv6(ip))
  • ui/app/utils/format-host.js — already safe (early-returns if !address).

Regression tests:

  • ui/tests/unit/serializers/network-test.js — added "missing IP does not throw"
  • ui/tests/unit/serializers/port-test.js — new file with v4 / v6 / missing-HostIP cases

3. Duplicate package resolutions

The Ember 6.10 upgrade pulled in two majors of @ember/string and ember-inflector.

Fix:

  • pnpm-workspace.yaml — pinned @ember/string@4.0.1 and ember-inflector@6.0.0 via overrides; added peerDependencyRules.allowedVersions for the noisy peer-dep warnings.

Lockfile verified: only single versions resolved.


Net effect: Linux/HTTP/LAN users no longer crash on crypto.randomUUID; nodes with IP-less network entries no longer crash on isIPv6(undefined); build output is leaner due to deduplication.

Testing & Reproduction steps

Links

Fixes: #27955
Ref: https://hashicorp.atlassian.net/browse/NMD-1454

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad product documentation, which is stored in the
    web-unified-docs repo. Refer to the web-unified-docs contributor guide for docs guidelines.
    Please also consider whether the change requires notes within the upgrade
    guide
    . If you would like help with the docs, tag the nomad-docs team in this PR.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.
  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.


Overview of commits

@hashicorp-cla-app
Copy link
Copy Markdown

hashicorp-cla-app Bot commented May 19, 2026

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes


1 out of 2 committers have signed the CLA.

  • aklkv
  • temp

temp seems not to be a GitHub user.
You need a GitHub account to be able to sign the CLA.
If you have already a GitHub account, please add the email address used for this commit to your account.

Have you signed the CLA already but the status is still pending? Recheck it.

@hashicorp-cla-app
Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes


temp seems not to be a GitHub user.
You need a GitHub account to be able to sign the CLA.
If you have already a GitHub account, please add the email address used for this commit to your account.

Have you signed the CLA already but the status is still pending? Recheck it.

* fix(ui): NMD-1454

* add guard for emoty IP

* add regrations test for missing IP

* fix(ui): correct configuration for `polyfillUUID`
@aklkv aklkv marked this pull request as ready for review May 20, 2026 07:34
@aklkv aklkv requested review from a team as code owners May 20, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants