docs: Add implementation plan for Windows agent parity
This commit is contained in:
@@ -115,9 +115,14 @@ A new field `reboot_required` on `InventoryReport`, added to
|
||||
(`agent/internal/grpc/pb`, `server/internal/grpc/pb`) in the same commit.
|
||||
|
||||
It travels on the inventory report rather than the update report because it is a
|
||||
host property like the kernel version, and inventory refreshes every 30 seconds
|
||||
with a full static snapshot every 15 minutes — so a host rebooted by hand clears
|
||||
the flag promptly instead of showing it for up to an hour.
|
||||
host property like the kernel version, and it is set on the **static** snapshot
|
||||
only — every 15 minutes rather than every 30 seconds. A host rebooted by hand
|
||||
clears the flag in a quarter of an hour instead of showing it for up to a full
|
||||
one, and the detection costs a PowerShell process on Windows, which is not
|
||||
something to spawn twice a minute forever.
|
||||
|
||||
It is set in `agentsync.runInventory`, not inside the `inventory` package, so
|
||||
`inventory` gains no dependency on `updates`.
|
||||
|
||||
Both platforms set it, since parity is free here:
|
||||
|
||||
@@ -245,10 +250,15 @@ nothing is normal, and an error there would read as a broken feature.
|
||||
The server changes in one place: `services.ReportInventory` persists
|
||||
`reboot_required`.
|
||||
|
||||
The web changes in three, all keyed on `server.os_type`, which is already stored
|
||||
on the server document and already serialised, but currently unread by `web/`:
|
||||
The web changes in three, all keyed on the same `os_info` test
|
||||
`MaintenanceTab.tsx` already uses (`server.os_info?.toLowerCase().includes("windows")`)
|
||||
rather than on `os_type`. `os_type` is stored and serialised but unread by
|
||||
`web/` today, and introducing a second Windows test in the same component is how
|
||||
the two come to disagree. `WorkloadList` takes the result as a prop, since it
|
||||
receives only a `serverId`:
|
||||
|
||||
1. `web/components/workloads/WorkloadList.tsx` — the systemd status lines become
|
||||
1. `web/components/workloads/WorkloadList.tsx` — takes an `isWindows` prop from
|
||||
the server detail page, and the systemd status lines become
|
||||
platform-worded. On Windows the error line reads "Windows services could not
|
||||
be read" and the "systemd is not in use on this server" line is not rendered
|
||||
at all. The empty-state line drops "on Linux only". The Docker lines are
|
||||
@@ -261,8 +271,10 @@ on the server document and already serialised, but currently unread by `web/`:
|
||||
## Testing
|
||||
|
||||
The Windows collectors are, in substance, parsers of PowerShell output. Parsing
|
||||
is separated from invocation and table-tested against captured real output,
|
||||
following `agent/internal/packages/parse.go`:
|
||||
is separated from invocation and table-tested against captured real output. The
|
||||
`agent` module has no tests at all today, so these are the first — they live
|
||||
beside the parsers as ordinary `_test.go` files, run with `go test ./...` from
|
||||
`agent/`, and need no new dependency:
|
||||
|
||||
- `Win32_Service` JSON, including a quoted path with arguments, a
|
||||
`%SystemRoot%\System32` service that must be filtered out, a stopped
|
||||
|
||||
Reference in New Issue
Block a user