refactor(controller,xceadmin): drop generic Resource.unit, hardcode bytes for maxmem
Simplification per review feedback on e3b3ffa: a generic schema-driven
unit field touched the capnp wire schema (2 structs), C structs
(xce_resource_t/xce_resval_t), resobj.c's deep-copy/destroy, opget.c's
reply-build lookup, resources.yaml/resources.schema.json, and mapping.py
-- real cross-cutting cost for a mechanism only one resource (maxmem)
actually needs today.
Reverted all of that. The controller CLI (test.c) now just knows
"maxmem" is bytes-valued via a small explicit is_bytes_valued_resource()
name list, and adaptively picks the best-fit human unit at display time
(format_bytes_human, unchanged) -- same observable behavior (resval/
workerlist render maxmem as e.g. "30.90 GB"), zero wire schema surface.
Regenerated the xceadmin golden fixture back to its pre-unit-field size
(5304 bytes, exactly matching the size right after the mxj-only fix,
confirming a clean, complete removal).
Verified: 1095/1095 controller_unit_test (3 runs; one hit the
pre-existing flaky segfault already logged as bug-1553, unrelated),
228/228 xceadmin pytest, clean rebuild of lib/controller/xceadmin/xce_test.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
e3b3ffaa97
commit
5bf123cc20
10 changed files with 36 additions and 58 deletions
|
|
@ -35,7 +35,6 @@ static int resobj_init(meta_obj_t* obj, va_list ap)
|
|||
|
||||
dst->name = makeString(src->name);
|
||||
dst->desc = makeString(src->desc);
|
||||
dst->unit = makeString(src->unit);
|
||||
|
||||
#if 0
|
||||
if (src->distributions != NULL) {
|
||||
|
|
@ -65,7 +64,6 @@ static void resobj_destroy(meta_obj_t* obj)
|
|||
|
||||
dereference(r->name);
|
||||
dereference(r->desc);
|
||||
dereference(r->unit);
|
||||
|
||||
memset(priv, 0x0, sizeof(*priv));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue