Skip to content

go.mod: build against the CPU-placement eve-api - #158

Draft
rucoder wants to merge 1 commit into
lf-edge:masterfrom
rucoder:rucoder/cpu-placement-api
Draft

go.mod: build against the CPU-placement eve-api#158
rucoder wants to merge 1 commit into
lf-edge:masterfrom
rucoder:rucoder/cpu-placement-api

Conversation

@rucoder

@rucoder rucoder commented Aug 17, 2026

Copy link
Copy Markdown

Bumps eve-api so the CPU placement fields survive ingest.

Draft, and not mergeable as-is: the bump is a replace directive pointing at
a fork that carries the not-yet-upstream API (lf-edge/eve-api#155). It is here so
the controller team can run a full device-to-controller exchange against the
device-side implementation (lf-edge/eve#6335) while the API is still under
review. Once the API lands in lf-edge/eve-api the directive is replaced by an
ordinary version bump.

Why a bump is needed at all

Adam re-encodes every message it receives with protojson
(pkg/server/commonHandler.go, infoProcess/metricsProcess/logs), and
protojson cannot emit unknown fields. Any field the vendored eve-api does not
know is therefore destroyed at ingest, before it is persisted — so a device
reporting the new CPU placement and topology fields would have them silently
dropped before any controller or test harness could read them:

  • HardwareInventory.node_capabilities
  • CPUInfo topology coordinates, caches and capabilities
  • ZInfoDevice.cpu_pools
  • optional_capabilities.managed_cpu_isolation
  • ErrorInfo.error_code

No code change is needed beyond the bump. Note it only affects messages received
afterwards, since the loss happens at ingest rather than on read.

Adam re-encodes every device-to-controller message with protojson
(pkg/server/commonHandler.go infoProcess/metricsProcess/logs), and
protojson cannot emit unknown fields. Any info field the vendored
eve-api does not know is therefore destroyed at ingest, before it is
persisted — so a device reporting the new CPU placement/topology fields
(HardwareInventory.node_capabilities, CPUInfo topology coordinates,
caches and capabilities, ZInfoDevice.cpu_pools, optional_capabilities.
managed_cpu_isolation, ErrorInfo.error_code) would have them silently
dropped before any controller or test harness could read them.

Bumping eve-api is sufficient; no code change is needed. Note this only
fixes messages received after the bump, since the loss is at ingest.

The replace directive is temporary and points at the fork carrying the
not-yet-upstream API; it must be dropped once the API lands in
lf-edge/eve-api.

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
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.

1 participant