fix(cms-deploy): preserve Compose-owned image labels
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# CMS r41: preserve Compose-owned image labels
|
||||
|
||||
The operator installed and verified runner SHA
|
||||
`aa507dc77acdead0d3cd76db0f0254dca1b2f707638361b6e5e8cac1b5d6448b`
|
||||
on 2026-11-05. At 06:29:54 UTC its automatic preflight reported
|
||||
`CmsBuildBaseError`, reason `cms-base-missing`. r41 remained staged, with no
|
||||
application receipt or backup. This means no discovered candidate passed the
|
||||
predicate, not that Docker necessarily lacks the filesystem base.
|
||||
|
||||
The predicate had a reproducible ownership error: it required base-image Labels
|
||||
to equal application-image Labels. Compose's BuildKit path adds its own project,
|
||||
service and version labels to the application image. These are build metadata,
|
||||
not inherited Node configuration. The behavior is explicit in
|
||||
[Compose 2.20.3 getImageBuildLabels](https://github.com/docker/compose/blob/v2.20.3/pkg/compose/build.go#L502-L513).
|
||||
The old direct-docker fixture omitted that production build path, so its passing
|
||||
result did not test this case. Whether this is the sole NAS mismatch is still
|
||||
unproven; do not claim the production base has already been accepted.
|
||||
|
||||
The corrected model permits exactly three Compose-owned additions: project must
|
||||
be dc-cms, service must be cms-app, and version must be a bounded-format numeric
|
||||
version with an optional release suffix. Partial, unknown or malformed Compose
|
||||
labels fail. All other labels must still match the base exactly. The builder
|
||||
passes those same three accepted values through explicit --label arguments;
|
||||
it does not choose the local Compose version or delete any metadata. The full
|
||||
post-build Labels comparison remains exact, as do Env, layers, platform and
|
||||
all existing runtime/rollback guards. No change to the registered Dockerfile,
|
||||
payload, service set, dependencies, sites, authentication or release queue.
|
||||
|
||||
Missing/ambiguous-base errors now carry a bounded diagnostic containing only
|
||||
parent/node candidate counts and fixed rejection-category counts (layers,
|
||||
platform, base shape, inherited config, labels, environment, Node version).
|
||||
The public status validates this shape again; raw image fields, arbitrary keys,
|
||||
label values, environment values and external stderr are never exported.
|
||||
|
||||
Validation: 95 CMS tests and 95 Device Core tests. New cases cover exact Compose
|
||||
additions, inherited-label drift, wrong project/service, partial/unknown labels,
|
||||
malformed version, exact builder flags, final Env/Labels mismatch before runtime
|
||||
recreation and diagnostic redaction. Python 3.8 AST and diff checks pass.
|
||||
|
||||
A separate real local integration builds an isolated fixture with actual Docker
|
||||
Compose/BuildKit (local Compose 5.0.0), without mocked image inspection. The
|
||||
installed aa507dc predicate rejects that known base; the corrected predicate
|
||||
accepts it through the real Node-only lookup. The canonical builder then builds
|
||||
from the same immutable base using legacy Docker, retaining the exact full Env
|
||||
and Compose labels. All exported layers exclude the private-project fixture,
|
||||
and the registered source Dockerfile stays unchanged. Test tags are removed;
|
||||
no NAS or workload containers are involved. Local evidence is not proof of NAS
|
||||
cache availability.
|
||||
|
||||
The candidate is promoted through the same tested SHA-pinned root gate, with
|
||||
aa507dc as predecessor. The existing automatic controller then replans queued
|
||||
r41; no manual Docker action, image pull, failed-run replay or new application
|
||||
commit is required. A successful canonical application receipt remains required
|
||||
before the multisite migration and public Mission Core publication.
|
||||
Reference in New Issue
Block a user