Skip to content

The unit fields a layer manifest may carry, and the rule for any other - #24

Merged
marcos-mendez merged 1 commit into
mainfrom
docs/manifest-unit-fields
Sep 27, 2026
Merged

marcos-mendez merged 1 commit into
mainfrom
docs/manifest-unit-fields

Conversation

@marcos-mendez

Copy link
Copy Markdown
Collaborator

bt-layer now records the components a layer carries as fab units (Keel-Linux/buildtasks#8), in two fields that are not in REQUIRED_KEYS:

Key Meaning
units every component the layer carries as a fab unit, name@version sorted by name, or none; cumulative, the parent's merged with this build's
build_units the units this build applied: default for a rootfs, else the difference, or none

A child layer subtracts what its parent recorded, so the record has to survive a trip through keel pull, which writes a manifest back out of what it read. A unit dropped there is a layer whose provenance record no longer says what it is made of.

Nothing in the code had to change: parse keeps a key it does not know, validate looks only for the required ones, and Manifest.text writes them all back in the order they were read. That is now a property the layer format depends on, so this documents it and tests hold it.

Test plan

  • TestOptionalFields: the two fields validate and are readable; a manifest without them still validates; text() gives the file back byte for byte; an unknown key is kept in fields and in text(); a key that is not a key is still refused.
  • python3 -m pytest: 555 passed, 59 subtests.
  • coverage report: 100 percent, gate 95.
  • Docs only and tests only, so package / changelog does not apply (both paths are in the exempt list).

…y other

bt-layer now records the components a layer carries as fab units, in two
fields that are not in REQUIRED_KEYS: units, every component the layer
carries as name@version, and build_units, the ones this build applied. A
child layer subtracts what its parent recorded, so the record has to survive
a trip through keel pull, which writes a manifest back out of what it read.

Nothing here had to change: parse keeps a key it does not know, validate
looks only for the required ones, and Manifest.text writes them all back in
the order they were read. That is a property the layer format depends on now,
so docs/layers.md states it and TestOptionalFields holds it: the two fields
validate and are readable, a manifest without them still validates, text
gives back the file byte for byte, a key nobody here knows is kept, and a key
that is not a key is still refused.
@marcos-mendez
marcos-mendez merged commit 4579aba into main Sep 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant