go.mod: build against the CPU-placement eve-api - #158
Draft
rucoder wants to merge 1 commit into
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps eve-api so the CPU placement fields survive ingest.
Draft, and not mergeable as-is: the bump is a
replacedirective pointing ata 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), andprotojsoncannot emit unknown fields. Any field the vendored eve-api does notknow 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_capabilitiesCPUInfotopology coordinates, caches and capabilitiesZInfoDevice.cpu_poolsoptional_capabilities.managed_cpu_isolationErrorInfo.error_codeNo code change is needed beyond the bump. Note it only affects messages received
afterwards, since the loss happens at ingest rather than on read.