You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTTP API should support validating checksums #3228
We should support validating checksums for HTTP downloads. LLB already supports it, thankfully: llb.Checksum.
Here are some discussion points:
# should it be required or optional?http(url: String!, digest: String!): File!
http(url: String!, digest: String): File!
# usage:http(url: "https://dagger.io", digest: "sha256:4f559663fb9d7d49db9c17b4ef81fb41c85fe8a3c7dca127a18af4818f07b807")
# should we have a top-level sha256 field to avoid having an embedded string format?http(url: String!, sha256: String): File!
# usage:http(url: "https://dagger.io", sha256: "4f559663fb9d7d49db9c17b4ef81fb41c85fe8a3c7dca127a18af4818f07b807")
I think it should be optional, we don't always know the checksum in advance.
It depends on the scenario I guess.
For SBOM, it makes sense to make sure to get exactly what you expect, and make for more idempotent builds.
For testing/experimenting, you don't want to get a checksum beforehand every time.
On the format, I'm not sure. We've retired sha1 a while ago, I don't know when sha256 will. As most of the tools we use are still on sha256 as well, maybe it makes sense to just use that. When those tools evolve, we and our clients will also have to update that as well. So it make sense for them to update it at that time.
I don't think we should care about it for an optimization perspective, and for the usage, I just don't want to stumble in PGP land supporting 1000's algorithm, but finally only 1 or 2 are worth using. Making it explicit communicates that clearly.
Activity
dolanor commentedon Oct 6, 2022
I think it should be optional, we don't always know the checksum in advance.
It depends on the scenario I guess.
For SBOM, it makes sense to make sure to get exactly what you expect, and make for more idempotent builds.
For testing/experimenting, you don't want to get a checksum beforehand every time.
On the format, I'm not sure. We've retired sha1 a while ago, I don't know when sha256 will. As most of the tools we use are still on sha256 as well, maybe it makes sense to just use that. When those tools evolve, we and our clients will also have to update that as well. So it make sense for them to update it at that time.
I don't think we should care about it for an optimization perspective, and for the usage, I just don't want to stumble in PGP land supporting 1000's algorithm, but finally only 1 or 2 are worth using. Making it explicit communicates that clearly.