Backport of UI: fix client detail page failing to render into release/2.0.x#28012
Backport of UI: fix client detail page failing to render into release/2.0.x#28012hc-github-team-nomad-core wants to merge 2 commits into
Conversation
|
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.
temp seems not to be a GitHub user. Have you signed the CLA already but the status is still pending? Recheck it. |
|
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. 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`
Backport
This PR is auto-generated from #27958 to be assessed for backporting due to the inclusion of the label backport/2.0.x.
🚨
The person who merged in the original PR is:
@aklkv
This person should resolve the merge-conflict(s) by either:
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 functionEmber Data 4.12 calls
crypto.randomUUID()to mint record identifiers. The browser only exposes it in secure contexts (HTTPS orlocalhost/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: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 onstring.length. Triggered during fragment-array deserialization ofResources.Networkswhen an entry has noIP(e.g. reserved-port-only networks).Fix — guard the call sites:
ui/app/serializers/network.js—if (ip && isIPv6(ip))ui/app/serializers/port.js—if (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 cases3. Duplicate package resolutions
The Ember 6.10 upgrade pulled in two majors of
@ember/stringandember-inflector.Fix:
pnpm-workspace.yaml— pinned@ember/string@4.0.1andember-inflector@6.0.0viaoverrides; addedpeerDependencyRules.allowedVersionsfor 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 onisIPv6(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 using the
make clcommand.ensure regressions will be caught.
and job configuration, please update the Nomad product documentation, which is stored in the
web-unified-docsrepo. Refer to theweb-unified-docscontributor 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-docsteam in this PR.Reviewer Checklist
backporting document.
in the majority of situations. The main exceptions are long-lived feature branches or merges where
history should be preserved.
within the public repository.
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