mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-11-28 16:58:31 +01:00
Align Workloads stale telemetry Help and fix FAQ link count test (#5375)
**Align Workloads stale telemetry Help and fix FAQ link count test** Document the stale workload telemetry cues added across rows, filters, node group headers, and GuestDrawer in #5369, and restore the green Public docs Help suite after #5370 added Proxmox Backups/PBS links to docs/FAQ.md: - Add a Workloads (VMs and containers) entry under "No data showing?" in docs/FAQ.md and a "Stale workload telemetry" section in docs/UNIFIED_RESOURCES.md covering primary provider scope (Proxmox, vCenter, Docker, Kubernetes), hybrid linked-agent separation, Attention filter routing ahead of Running while keeping offline/error/failed first, stale parent node headers without dimming guests as Node offline, row cues, searchable stale details/errors, and GuestDrawer stale notices clearing on recovery. - Mirror docs/FAQ.md and docs/UNIFIED_RESOURCES.md byte-for-byte into frontend-modern/public/docs/. - Update frontend-modern/src/features/docs/__tests__/missingDataFAQ.test.ts from 12 to 15 shipped-guide links and assert the #5370 Proxmox Backups and PBS stale-telemetry link targets. - Bind the new workload staleness Help to live frontend markers in scripts/tests/test_stale_reading_help_docs.py and include UNIFIED_RESOURCES.md in its mirror check. Contract-Neutral: Documentation, Help-mirror, and documentation-assertion test alignment only with no runtime, UI, API, or subsystem contract delta. **Remove semicolons from UNIFIED_RESOURCES stale workload Help prose** Replace two semicolons with periods in the new Stale workload telemetry section of docs/UNIFIED_RESOURCES.md and mirror to frontend-modern/public/docs/UNIFIED_RESOURCES.md so check_public_docs.py passes on the base diff. Contract-Neutral: Documentation prose punctuation cleanup only with no runtime, UI, API, or subsystem contract delta. --- Fleet candidate `20261128T085704Z-product-intelligence` from the `product-intelligence` lane. Reviewed tip `d93c0df01f066061353be7b03d2a7df6516f745d` on `main`. [How Pulse handles triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
This commit is contained in:
13
docs/FAQ.md
13
docs/FAQ.md
@@ -333,6 +333,19 @@ does not prove that every reading is fresh. Missing or unavailable is not zero.
|
||||
failed), **Stale · Degraded** (the Proxmox provider is degraded), **Stale**
|
||||
(Pulse has no recent Proxmox readings), and **Degraded** (a node warning with
|
||||
current Proxmox readings).
|
||||
- **Workloads (VMs and containers)** across Proxmox, VMware vSphere, Docker, and
|
||||
Kubernetes surface stale primary provider telemetry without falsely flagging
|
||||
fresh hypervisor readings when only an optional linked Pulse agent goes quiet.
|
||||
Stale running and stopped workloads leave **Running** and join **Attention**
|
||||
(while explicit **Offline**, **Error**, and **Failed** states stay ahead of
|
||||
staleness), stale parent nodes show an amber **Stale data** badge in the node
|
||||
group header (`Node telemetry is stale. Workload readings below reflect the
|
||||
last poll received.`) without dimming guests as **Node offline**, affected
|
||||
workload rows show an inline amber cue (`Stale · <age>` or `Stale data`) while
|
||||
preserving last-known values, workload search matches stale labels, details,
|
||||
and recorded source errors, and expanded workload drawers switch the header
|
||||
indicator to amber and display an inline **Readings are stale** notice that
|
||||
clears automatically when live telemetry recovers.
|
||||
- **Proxmox Ceph clusters** (`/proxmox/ceph`) show **Stale data** beneath the
|
||||
cluster name on desktop and phones when Proxmox polling goes quiet or hits a
|
||||
collection error, moving stale **Healthy** or **Unknown** clusters out of
|
||||
|
||||
@@ -102,6 +102,15 @@ On **Machines** (`/standalone/machines`), Pulse keeps a host's last known metric
|
||||
- **Table banner and row cue:** A table-level warning banner lists affected hosts and ages (`Telemetry is stale for <host> (<age>). CPU, memory, disk, and sensor readings shown are last known values until their agents report again.`). Each affected row displays an always-visible compact amber cue beneath the machine name (`Stale · <age>` or `Stale data` on desktop, and `Stale` on narrow screens).
|
||||
- **Expanded details, search, and fallbacks:** Expanding a stale machine displays an amber warning notice (`Agent has stopped reporting.`, the last report age, `Showing last known readings.`, and `Last error:` when recorded). Machine search matches stale labels, detail text, and recorded source errors. Retained RAID summaries are labelled `RAID Arrays (last known)`, and retained temperatures stay muted as last-known values.
|
||||
|
||||
### Stale workload telemetry
|
||||
|
||||
Workload tables and drawers (VMs, system containers, and container workloads across Proxmox, VMware vSphere, Docker, and Kubernetes) project canonical resource staleness and primary provider `sourceStatus` directly onto each workload row:
|
||||
|
||||
- **Primary provider scope:** Staleness tracks the workload's primary hypervisor or container provider (`Proxmox`, `vCenter`, `Docker`, or `Kubernetes`). On hybrid workloads (such as a Proxmox VM with an optional Pulse agent), fresh hypervisor readings stay unflagged when only the linked agent goes silent. Agent-sourced fields track agent staleness separately.
|
||||
- **Filter routing and status priority:** Stale running and stopped workloads leave **Running** and route into **Attention** so stale workloads do not appear healthy, while explicit `offline`, `error`, and `failed` resource states stay ahead of staleness. If a running workload also has a failed attached availability probe, the header indicator keeps the probe warning alongside the stale label (`Running, not responding to probe · <stale label>`).
|
||||
- **Parent node headers and workload rows:** Only a confirmed offline parent node marks its guests **Node offline** and dims them. A stale or degraded parent node displays an amber **Stale data** badge in the node group header (`Node telemetry is stale. Workload readings below reflect the last poll received.`) while keeping last-known guest rows readable. Affected workload rows show an inline amber cue (`Stale · <age>` when report age is available, or `Stale data`) with hover detail while preserving last-known metrics.
|
||||
- **Search and workload drawer:** Workload search matches stale labels, stale detail text (`Showing the last values received.`), and recorded source error text. Expanding a stale workload aligns the drawer header status dot to amber and shows an inline **Readings are stale** warning notice with the provider stale detail. Both clear reactively as soon as live telemetry resumes.
|
||||
|
||||
## API
|
||||
|
||||
### Primary Endpoint
|
||||
|
||||
@@ -333,6 +333,19 @@ does not prove that every reading is fresh. Missing or unavailable is not zero.
|
||||
failed), **Stale · Degraded** (the Proxmox provider is degraded), **Stale**
|
||||
(Pulse has no recent Proxmox readings), and **Degraded** (a node warning with
|
||||
current Proxmox readings).
|
||||
- **Workloads (VMs and containers)** across Proxmox, VMware vSphere, Docker, and
|
||||
Kubernetes surface stale primary provider telemetry without falsely flagging
|
||||
fresh hypervisor readings when only an optional linked Pulse agent goes quiet.
|
||||
Stale running and stopped workloads leave **Running** and join **Attention**
|
||||
(while explicit **Offline**, **Error**, and **Failed** states stay ahead of
|
||||
staleness), stale parent nodes show an amber **Stale data** badge in the node
|
||||
group header (`Node telemetry is stale. Workload readings below reflect the
|
||||
last poll received.`) without dimming guests as **Node offline**, affected
|
||||
workload rows show an inline amber cue (`Stale · <age>` or `Stale data`) while
|
||||
preserving last-known values, workload search matches stale labels, details,
|
||||
and recorded source errors, and expanded workload drawers switch the header
|
||||
indicator to amber and display an inline **Readings are stale** notice that
|
||||
clears automatically when live telemetry recovers.
|
||||
- **Proxmox Ceph clusters** (`/proxmox/ceph`) show **Stale data** beneath the
|
||||
cluster name on desktop and phones when Proxmox polling goes quiet or hits a
|
||||
collection error, moving stale **Healthy** or **Unknown** clusters out of
|
||||
|
||||
@@ -102,6 +102,15 @@ On **Machines** (`/standalone/machines`), Pulse keeps a host's last known metric
|
||||
- **Table banner and row cue:** A table-level warning banner lists affected hosts and ages (`Telemetry is stale for <host> (<age>). CPU, memory, disk, and sensor readings shown are last known values until their agents report again.`). Each affected row displays an always-visible compact amber cue beneath the machine name (`Stale · <age>` or `Stale data` on desktop, and `Stale` on narrow screens).
|
||||
- **Expanded details, search, and fallbacks:** Expanding a stale machine displays an amber warning notice (`Agent has stopped reporting.`, the last report age, `Showing last known readings.`, and `Last error:` when recorded). Machine search matches stale labels, detail text, and recorded source errors. Retained RAID summaries are labelled `RAID Arrays (last known)`, and retained temperatures stay muted as last-known values.
|
||||
|
||||
### Stale workload telemetry
|
||||
|
||||
Workload tables and drawers (VMs, system containers, and container workloads across Proxmox, VMware vSphere, Docker, and Kubernetes) project canonical resource staleness and primary provider `sourceStatus` directly onto each workload row:
|
||||
|
||||
- **Primary provider scope:** Staleness tracks the workload's primary hypervisor or container provider (`Proxmox`, `vCenter`, `Docker`, or `Kubernetes`). On hybrid workloads (such as a Proxmox VM with an optional Pulse agent), fresh hypervisor readings stay unflagged when only the linked agent goes silent. Agent-sourced fields track agent staleness separately.
|
||||
- **Filter routing and status priority:** Stale running and stopped workloads leave **Running** and route into **Attention** so stale workloads do not appear healthy, while explicit `offline`, `error`, and `failed` resource states stay ahead of staleness. If a running workload also has a failed attached availability probe, the header indicator keeps the probe warning alongside the stale label (`Running, not responding to probe · <stale label>`).
|
||||
- **Parent node headers and workload rows:** Only a confirmed offline parent node marks its guests **Node offline** and dims them. A stale or degraded parent node displays an amber **Stale data** badge in the node group header (`Node telemetry is stale. Workload readings below reflect the last poll received.`) while keeping last-known guest rows readable. Affected workload rows show an inline amber cue (`Stale · <age>` when report age is available, or `Stale data`) with hover detail while preserving last-known metrics.
|
||||
- **Search and workload drawer:** Workload search matches stale labels, stale detail text (`Showing the last values received.`), and recorded source error text. Expanding a stale workload aligns the drawer header status dot to amber and shows an inline **Readings are stale** warning notice with the provider stale detail. Both clear reactively as soon as live telemetry resumes.
|
||||
|
||||
## API
|
||||
|
||||
### Primary Endpoint
|
||||
|
||||
@@ -69,10 +69,18 @@ describe('shipped missing-data FAQ', () => {
|
||||
it('routes each symptom to a real heading in a shipped guide', () => {
|
||||
const sections = [section('no-data-showing'), section('connection-refused')];
|
||||
const links = sections.flatMap((element) => [...element.querySelectorAll('a[href]')]);
|
||||
expect(links).toHaveLength(12);
|
||||
expect(links).toHaveLength(15);
|
||||
expect(
|
||||
sections[0].querySelector('a[href="/docs/KUBERNETES#stale-kubernetes-readings"]'),
|
||||
).not.toBeNull();
|
||||
expect(
|
||||
sections[0].querySelector('a[href="/docs/RECOVERY#stale-proxmox-backup-telemetry"]'),
|
||||
).not.toBeNull();
|
||||
expect(
|
||||
sections[0].querySelector(
|
||||
'a[href="/docs/PBS#stale-pbs-readings-and-unread-datastore-capacity"]',
|
||||
),
|
||||
).not.toBeNull();
|
||||
expect(
|
||||
sections[0].querySelector(
|
||||
'a[href="/docs/TROUBLESHOOTING#replication-jobs-are-pending-stale-or-missing"]',
|
||||
|
||||
@@ -827,6 +827,105 @@ class StaleReadingAndAgentHelpDocsTest(unittest.TestCase):
|
||||
self.assertIn('lead="Source telemetry is stale."', recoverable)
|
||||
self.assertIn("· Stale data", shared)
|
||||
|
||||
def test_help_documents_workload_stale_telemetry_across_rows_filters_and_drawers(self):
|
||||
faq = doc_text("docs/FAQ.md")
|
||||
faq_section = norm(
|
||||
faq.split("### No data showing?\n", 1)[1].split("\n### ", 1)[0]
|
||||
)
|
||||
for phrase in (
|
||||
"**Workloads (VMs and containers)** across Proxmox, VMware vSphere, Docker, and Kubernetes",
|
||||
"without falsely flagging fresh hypervisor readings when only an optional linked Pulse agent goes quiet",
|
||||
"Stale running and stopped workloads leave **Running** and join **Attention**",
|
||||
"explicit **Offline**, **Error**, and **Failed** states stay ahead of staleness",
|
||||
"amber **Stale data** badge in the node group header (`Node telemetry is stale. Workload readings below reflect the last poll received.`)",
|
||||
"without dimming guests as **Node offline**",
|
||||
"inline amber cue (`Stale · <age>` or `Stale data`)",
|
||||
"workload search matches stale labels, details, and recorded source errors",
|
||||
"inline **Readings are stale** notice that clears automatically when live telemetry recovers",
|
||||
):
|
||||
with self.subTest(doc="FAQ.md", phrase=phrase):
|
||||
self.assertIn(phrase, faq_section)
|
||||
|
||||
unified = doc_text("docs/UNIFIED_RESOURCES.md")
|
||||
stale_section = norm(
|
||||
unified.split("### Stale workload telemetry\n", 1)[1].split("\n## ", 1)[0]
|
||||
)
|
||||
for phrase in (
|
||||
"primary hypervisor or container provider (`Proxmox`, `vCenter`, `Docker`, or `Kubernetes`)",
|
||||
"fresh hypervisor readings stay unflagged when only the linked agent goes silent",
|
||||
"Stale running and stopped workloads leave **Running** and route into **Attention**",
|
||||
"explicit `offline`, `error`, and `failed` resource states stay ahead of staleness",
|
||||
"`Running, not responding to probe · <stale label>`",
|
||||
"Only a confirmed offline parent node marks its guests **Node offline** and dims them",
|
||||
"`Node telemetry is stale. Workload readings below reflect the last poll received.`",
|
||||
"`Stale · <age>` when report age is available, or `Stale data`",
|
||||
"Workload search matches stale labels, stale detail text (`Showing the last values received.`), and recorded source error text",
|
||||
"inline **Readings are stale** warning notice with the provider stale detail",
|
||||
):
|
||||
with self.subTest(doc="UNIFIED_RESOURCES.md", phrase=phrase):
|
||||
self.assertIn(phrase, stale_section)
|
||||
|
||||
use_workloads = doc_text("frontend-modern/src/hooks/useWorkloads.ts")
|
||||
selectors = doc_text("frontend-modern/src/components/Workloads/workloadSelectors.ts")
|
||||
panel = doc_text("frontend-modern/src/components/Workloads/WorkloadPanel.tsx")
|
||||
node_header = doc_text("frontend-modern/src/components/shared/NodeGroupHeader.tsx")
|
||||
guest_row = doc_text("frontend-modern/src/components/Workloads/GuestRow.tsx")
|
||||
guest_drawer = doc_text("frontend-modern/src/components/Workloads/GuestDrawer.tsx")
|
||||
status_util = doc_text("frontend-modern/src/utils/status.ts")
|
||||
|
||||
for marker in (
|
||||
"case 'proxmox-pve':",
|
||||
"label: 'Proxmox'",
|
||||
"case 'vmware-vsphere':",
|
||||
"label: 'vCenter'",
|
||||
"case 'docker':",
|
||||
"label: 'Docker'",
|
||||
"case 'kubernetes':",
|
||||
"label: 'Kubernetes'",
|
||||
"if (primarySource && CONNECTED_WORKLOAD_SOURCE_STATUS.test(primaryStatus)) {",
|
||||
"Showing the last values received.",
|
||||
"telemetryStale: resolveWorkloadTelemetryStale(resource, platformType)",
|
||||
):
|
||||
self.assertIn(marker, use_workloads)
|
||||
for marker in (
|
||||
"guest.telemetryStale &&",
|
||||
"resourceStatus !== 'offline' &&",
|
||||
"resourceStatus !== 'error' &&",
|
||||
"resourceStatus !== 'failed'",
|
||||
"return 'degraded';",
|
||||
"guest.telemetryStale?.label,",
|
||||
"guest.telemetryStale?.detail,",
|
||||
"guest.telemetryStale?.error,",
|
||||
):
|
||||
self.assertIn(marker, selectors)
|
||||
self.assertIn(
|
||||
"return pn ? getNodeStatusIndicator(pn).variant !== 'danger' : true;",
|
||||
panel,
|
||||
)
|
||||
for marker in (
|
||||
"data-node-group-stale",
|
||||
'title="Node telemetry is stale. Workload readings below reflect the last poll received."',
|
||||
"Stale data",
|
||||
):
|
||||
self.assertIn(marker, node_header)
|
||||
for marker in (
|
||||
"data-workload-stale-cue",
|
||||
"{stale().age ? `Stale · ${stale().age}` : stale().label}",
|
||||
):
|
||||
self.assertIn(marker, guest_row)
|
||||
for marker in (
|
||||
"getGuestHealthIndicator(props.guest, props.parentNodeOnline !== false)",
|
||||
'data-testid="guest-telemetry-stale-notice"',
|
||||
'<p class="font-medium">Readings are stale</p>',
|
||||
):
|
||||
self.assertIn(marker, guest_drawer)
|
||||
for marker in (
|
||||
"`Running, not responding to probe · ${stale.label}`",
|
||||
"if (stale) {",
|
||||
"return { variant: 'warning', label: stale.detail || stale.label };",
|
||||
):
|
||||
self.assertIn(marker, status_util)
|
||||
|
||||
def test_shipped_public_docs_mirrors_match_byte_for_byte(self):
|
||||
for name in (
|
||||
"AGENT_SECURITY.md",
|
||||
@@ -836,6 +935,7 @@ class StaleReadingAndAgentHelpDocsTest(unittest.TestCase):
|
||||
"RECOVERY.md",
|
||||
"TRUENAS.md",
|
||||
"UNIFIED_AGENT.md",
|
||||
"UNIFIED_RESOURCES.md",
|
||||
):
|
||||
with self.subTest(doc=name):
|
||||
self.assertEqual(
|
||||
|
||||
Reference in New Issue
Block a user