Conversation
This allows reading the metadata contained in tar-split without expensively recreating the whole tar stream including full contents. We have two use cases for this: - In a situation where tar-split is distributed along with a separate metadata stream, ensuring that the two are exactly consistent - Reading the tar headers allows making a ~cheap check of consistency of on-disk layers, just checking that the files exist in expected sizes, without reading the full contents. This can be implemented outside of this repo, but it's not ideal: - The function necessarily hard-codes some assumptions about how tar-split determines the boundaries of SegmentType/FileType entries (or, indeed, whether it uses FileType entries at all). That's best maintained directly beside the code that creates this. - The ExpectedPadding() value is not currently exported, so the consumer would have to heuristically guess where the padding ends. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
@mtrmac, this is very nice! Thank you for exposing this! There was a use case I had where exposing |
|
/approve |
vbatts
left a comment
There was a problem hiding this comment.
Interesting use-case. Thanks for that.
|
and i've tagged release v0.11.6 |
|
@vbatts Thanks! |
The current code simply ignores |
This allows reading the metadata contained in tar-split without expensively recreating the whole tar stream including full contents.
We have two use cases for this:
This can be implemented outside of this repo, but it's not ideal:
SegmentType/FileTypeentries (or, indeed, whether it uses FileType entries at all). That's best maintained directly beside the code that creates this.ExpectedPadding()value is not currently exported, so the consumer would have to heuristically guess where the padding ends.Cc: @kwilczynski