The alex and fritz fixtures used "Flops/s" and "packets/s" as unit bases, which
are not in the enum of unit.schema.json ("F/s" is). They are copied into real
deployments, where an invalid cluster.json only fails at runtime once
main.validate is enabled.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The shipped examples had drifted from the code that parses them:
- configs/cluster.json was still in the pre-v3 format: no top-level "name",
"numberOfNodes" instead of the required "nodes" node-list expression, plain
numbers instead of MetricValue objects for flopRateScalar/flopRateSimd/
memoryBandwidth, unit strings instead of unit objects, "aggregation": null,
and hwthread 72 missing from the core topology. It neither validated against
cluster.schema.json nor decoded into schema.Cluster. Rewritten in the current
format and extended with the accelerator metrics the GPU subclusters need.
- archive.retention.location is not a field of taskmanager.Retention. That
decode is not strict, so the key was silently dropped and a "move" policy ran
with an empty target path. Replaced with target-kind/target-path.
- "ui-file" pointed at ui-config.json while the shipped file is uiConfig.json,
so ccConfig logged a load error and the UI fell back to defaults.
- Added the options introduced since the examples were written: checkpoint
file-format/interval/max-wal-size, api-subjects concurrency, db-config,
nodestate-retention, archive retention/compression, smoothing-window and the
resample policy/algo defaults.
The config written by -init had no metric-store section, so a server started
right after -init aborted with "missing metricstore configuration".
internal/configexample guards all of this: it resolves "-file" references the
way ccConfig does, strict-decodes every section into the struct that actually
parses it, and validates the cluster configs against the cc-lib schema.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Resolve conflicts in the generated GraphQL code by regenerating it against
the merged schema. cc-lib v2.13.0 adds Tooltip to schema.MetricConfig and
schema.GlobalMetricListItem, so gqlgen now binds the tooltip field directly
and the hand-written globalMetricListItem/metricConfig resolvers introduced
on the tooltip branch are no longer needed.
Also migrate to the cc-lib v2.13.0 metric container types, which changed
from bare maps to structs carrying array-valued metric groups:
schema.JobData map -> {Metrics, Groups}
schema.ScopedJobStats map -> {Metrics, Groups}
job.Statistics map -> schema.JobStatisticsSet{Metrics, Groups}
Callers index .Metrics, return the zero struct instead of nil, and
deepCopy/DecodeJobStats now also carry the Groups payload through.
archive.GetStatistics returns the full JobStatisticsSet so group
statistics survive the round trip.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>