Documentation
¶
Overview ¶
Package lineage derives parent edges between images from their layer stacks, adds the parents images declare in annotations and labels, and materializes ancestry facts for fast queries.
The parent of an image is the indexed stack that is the longest exact prefix of its own stack. Stacks are compared by chain ID, so the work is a handful of joins over image_prefixes rather than any layer comparison.
When two or more stacks share a prefix that no indexed image ends at, that prefix is a common ancestor that was deleted or never pushed. It is kept as a phantom node keyed by its chain ID, so the tree stays intact, unless only one repo's images share it below another node: that is the repo's build cache, not a base.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Recompute ¶
Recompute rebuilds the edges, phantoms and lineage tables from the images in the index. It computes them in full but writes only the rows that differ from what is stored, since rewriting every row costs far more than the comparison, and returns the nodes whose lineage row changed: a new parent, root, generation, child or descendant count, or conflict.