polydawn / repeatr

Repeatr: Reproducible, hermetic Computation. Provision containers from Content-Addressable snapshots; run using familiar containers (e.g. runc); store outputs in Content-Addressable form too! JSON API; connect your own pipelines! (Or, use github.com/polydawn/stellar for pipelines!)
https://repeatr.io
Apache License 2.0
68 stars 5 forks source link

Multiple Hash Mismatches Cause Valid Hash to be Reported as a Mismatch #83

Closed ericevenchick closed 7 years ago

ericevenchick commented 7 years ago

Using this input section:

inputs:
        "/":
                type: "tar"
                tag:  "ubuntu-base+gcc"
                silo:
                        - "file+ca://./wares"
                        - "http+ca://repeatr.s3.amazonaws.com/assets/"
        "/task/src/gcc":
                type: "tar"
                hash: ""
                silo: "https://ftp.gnu.org/gnu/gcc/gcc-6.2.0/gcc-6.2.0.tar.gz"
        "/task/src/mpfr":
                type: "tar"
                hash: "zDDUnHejvCr6AOuxeJHXgG4tDtvB6_tVpmC8aIQFSsQmYBokgJxXtb2TeWdul9yZ"
                silo: "https://ftp.gnu.org/gnu/mpfr/mpfr-3.1.5.tar.gz"
        "/task/src/gmp":
                type: "tar"
                hash: "mbO3LDXQDhJZvH9hKPUFYbidQc9tI8qkSqVvstJWGfdT4S3u6y2mDboltFVNjYKY"
                silo: "https://ftp.gnu.org/gnu/gmp/gmp-6.1.1.tar.bz2"
        "/task/src/mpc":
                type: "tar"
                hash: "WfzjtnEfTaA-NaczWSMymCVxH8ydkaUa44wlfbilZnBt_H5KNaXq4zChZJ7qFdiQ"
                silo: "https://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz"

The mpc hash is reported as invalid.

WARN[12-08|01:08:22] Error during materialize                 input=/task/src/mpc type=tar hash=WfzjtnEfTaA-NaczWSMymCVxH8ydkaUa44wlfbilZnBt_H5KNaXq4zChZJ7qFdiQ error="Hash Mismatch: expected \"WfzjtnEfTaA-NaczWSMymCVxH8ydkaUa44wlfbilZnBt_H5KNaXq4zChZJ7qFdiQ\", got \"WfzjtnEfTaA-NaczWSMymCVxH8ydkaUa44wlfbilZnBt_H9KNaXq4zChZJ7qFdiQ\" from " elapsed=0.836

However. this hash is valid. Other hashes are not, but this one is reported as an error despite matching.