containers / storage

Container Storage Library
Apache License 2.0
539 stars 234 forks source link

Refactor to make it clearer that we return the validated TOC value #1887

Closed mtrmac closed 2 months ago

mtrmac commented 2 months ago

Primarily, this ensures that the value in ApplyDiff’s DriverWithDifferOutput.TOCDigest is really exactly the value we used to validate the digest, by only reading it once and passing it around.

That’s to simplify auditing and make the relationship clear, but it should not change behavior.

Incidentally, this also should fix #1886 — but I still think the binary footer code path should be removed entirely.

Cc: @giuseppe

mtrmac commented 2 months ago

(Completely untested, to be transparent.)

openshift-ci[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, mtrmac

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/containers/storage/blob/main/OWNERS)~~ [giuseppe,mtrmac] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
rhatdan commented 2 months ago

LGTM

rhatdan commented 2 months ago

/lgtm