Skip to content

Commit f02c9c7

Browse files
authored
refactor(gazelle_manifest): print the wrong hash when encountered (#3103)
Ideally developers should always re-run the manifest generator, which will update the hash for them. However I've got clients where the CI system is the only place that all the dependencies can resolve, either because of credentials needed to access the wheelhouse/PyPI, or because of disk exhaustion from massive wheels. Printing the difference allows a red PR to be greened up just by reading the CI log.
1 parent 2c7187d commit f02c9c7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gazelle/manifest/manifest.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ func (f *File) VerifyIntegrity(manifestGeneratorHashFile, requirements io.Reader
7070
return false, fmt.Errorf("failed to verify integrity: %w", err)
7171
}
7272
valid := (f.Integrity == fmt.Sprintf("%x", integrityBytes))
73+
if (!valid) {
74+
fmt.Printf("WARN: Integrity hash was %v but expected %x\n", f.Integrity, integrityBytes)
75+
}
7376
return valid, nil
7477
}
7578

0 commit comments

Comments
 (0)