mesh-catalog modules/nfs-server/cmd/nfs-server/backup.go (BackupFrom) reads seat:mesh-controller.seats and seat:mesh-controller.data, and finds the holder of a node seat and that module's data paths.
What the answers look like (both modules read every form):
{"answer": {"data": [{"machine","module","item","path","class", …}]}, "ok": true, "output": "<same as text>"}, or the bare object;
Both copies follow one rule: an answer with no data list is an error, never an empty list read as "nothing there".
The rule (hq working-on-the-mesh): code shared between modules belongs in mesh-sdk. The move was too large to do in mesh-catalog #142, because it means a new SDK API, a go/v0.1.x tag, and both modules moving to it. So this issue records it, raised by the review of #142 (hq ADR 0263).
Ask: typed readers in mesh-sdk/go, for example stdio.DataOf(raw) ([]DataItem, error) and stdio.HoldersOf(raw, seat) ([]Holder, error), tested against the controller's real answer shapes. Then both modules move to them.
Two catalogue modules parse the same controller answers with their own copies:
- `mesh-catalog modules/mounts/cmd/mounts/data.go` (`DataFrom`) reads `seat:mesh-controller.data`.
- `mesh-catalog modules/nfs-server/cmd/nfs-server/backup.go` (`BackupFrom`) reads `seat:mesh-controller.seats` and `seat:mesh-controller.data`, and finds the holder of a node seat and that module's data paths.
What the answers look like (both modules read every form):
- `{"answer": {"data": [{"machine","module","item","path","class", …}]}, "ok": true, "output": "<same as text>"}`, or the bare object;
- `{"answer": {"seats": [{"seat", "holders": [{"module","node"}]}]}}`.
Both copies follow one rule: an answer with no data list is an error, never an empty list read as "nothing there".
The rule (hq working-on-the-mesh): code shared between modules belongs in mesh-sdk. The move was too large to do in mesh-catalog #142, because it means a new SDK API, a `go/v0.1.x` tag, and both modules moving to it. So this issue records it, raised by the review of #142 (hq ADR 0263).
Ask: typed readers in `mesh-sdk/go`, for example `stdio.DataOf(raw) ([]DataItem, error)` and `stdio.HoldersOf(raw, seat) ([]Holder, error)`, tested against the controller's real answer shapes. Then both modules move to them.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Two catalogue modules parse the same controller answers with their own copies:
mesh-catalog modules/mounts/cmd/mounts/data.go(DataFrom) readsseat:mesh-controller.data.mesh-catalog modules/nfs-server/cmd/nfs-server/backup.go(BackupFrom) readsseat:mesh-controller.seatsandseat:mesh-controller.data, and finds the holder of a node seat and that module's data paths.What the answers look like (both modules read every form):
{"answer": {"data": [{"machine","module","item","path","class", …}]}, "ok": true, "output": "<same as text>"}, or the bare object;{"answer": {"seats": [{"seat", "holders": [{"module","node"}]}]}}.Both copies follow one rule: an answer with no data list is an error, never an empty list read as "nothing there".
The rule (hq working-on-the-mesh): code shared between modules belongs in mesh-sdk. The move was too large to do in mesh-catalog #142, because it means a new SDK API, a
go/v0.1.xtag, and both modules moving to it. So this issue records it, raised by the review of #142 (hq ADR 0263).Ask: typed readers in
mesh-sdk/go, for examplestdio.DataOf(raw) ([]DataItem, error)andstdio.HoldersOf(raw, seat) ([]Holder, error), tested against the controller's real answer shapes. Then both modules move to them.