#22111·meshery

[Server] Performance results replace server board configuration with server metrics

Author: maverickaayushCreated Sep 27, 2026Updated Sep 28, 2026

Description

Meshery's local performance-result conversion stores and returns serverMetrics in the serverBoardConfig field, discarding the actual board configuration in both directions.

Current Behavior

When serverMetrics and serverBoardConfig contain different values, conversion to the database representation writes the metrics value into both columns. Conversion back to the API model again reads ServerMetrics for both fields.

Expected Behavior

serverBoardConfig should round-trip independently from serverMetrics, as defined by the distinct fields in the result contract.

Steps to Reproduce

  1. Construct a MesheryResult with serverMetrics={"source":"metrics"} and serverBoardConfig={"source":"board"}.
  2. Convert it with convertMesheryResultToLocalRepresentation.
  3. Observe that ServerBoardConfig contains the metrics map.
  4. Repeat in the reverse direction and observe the same substitution.

Evidence

$ go test ./server/models -run '^TestReproMesheryResultPreservesServerBoardConfig$' -count=1
write conversion stored map[string]interface {}{"source":"metrics"} as serverBoardConfig, want map[string]interface {}{"source":"board"}
FAIL

Root Cause

Both conversion functions select the wrong source field:

Affected Components

  • Meshery Server
  • Performance result persistence
  • Performance result API responses

Validation

Executed on master commit 5b75615243e92b088b4ebf6e7bff82d6f60e5462:

go test ./server/models -run '^TestReproMesheryResultPreservesServerBoardConfig$' -count=1

Result: deterministic failure; the board config is replaced with metrics during write conversion.

Acceptance Criteria

  • Both conversions map ServerBoardConfig from/to the matching field.
  • Distinct metrics and board-config values survive a database round trip.
  • A regression test asserts both directions.

References