v1 of the Flux source artifact type removed the .status.artifact.checksum field in favor of .status.artifact.digest. This PR adds logic to use the digest field with a fallback for checksum.
Note: we need to normalize the digest field since the current verifier function only accepts a hash, instead of the digest format (<algorithm>:<hash>"). We'd have to update github.com/fluxcd/pkg/http/fetch to at least v0.4.0 or higher to remove this normalization. However, upgrading our dependencies isn't as simple as go get -u ./... && go mod tidy since our dependencies are relatively old and the project will need to be refactored.
Proposed changes
v1 of the Flux source artifact type removed the
.status.artifact.checksum
field in favor of.status.artifact.digest
. This PR adds logic to use thedigest
field with a fallback forchecksum
.Note: we need to normalize the digest field since the current verifier function only accepts a hash, instead of the digest format (
<algorithm>:<hash>"
). We'd have to update github.com/fluxcd/pkg/http/fetch to at least v0.4.0 or higher to remove this normalization. However, upgrading our dependencies isn't as simple asgo get -u ./... && go mod tidy
since our dependencies are relatively old and the project will need to be refactored.Related issues (optional)
Fixes: #457