Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure download.test does not fail due to a checksum collision in the download cache #6378

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

kit-ty-kate
Copy link
Member

Example of random failure: https://github.com/ocaml/opam/actions/runs/13137623611/job/36656730451?pr=6273

 diff --git a/_build/default/tests/reftests/download.test b/_build/default/tests/reftests/download.out
File "tests/reftests/download.test", line 1, characters 0-0:
"C:\Program Files\Git\cmd\git.exe" --no-pager diff --no-index --color=always -u --ignore-cr-at-eol _build/default/tests/reftests/download.test _build/default/tests/reftests/download.out
Command exited with code 1.
index c01c510..e2a08c0 100644
--- a/_build/default/tests/reftests/download.test
+++ b/_build/default/tests/reftests/download.out
@@ -262,7 +262,6 @@ SYSTEM                          mkdir ${OPAMTMP}
 Processing  1/1: [baz.1: http]
 + wget "--header=Accept: */*" "-t" "3" "-O" "${OPAMTMP}/v1.0.0.tar.gz.part" "-U" "opam/current" "--" "https://github.com/UnixJunkie/get_line/archive/v1.0.0.tar.gz"
 SYSTEM                          mv ${OPAMTMP}/v1.0.0.tar.gz.part -> ${OPAMTMP}/v1.0.0.tar.gz
-SYSTEM                          mkdir ${BASEDIR}/OPAM/download-cache/md5-dir/
 SYSTEM                          copy ${OPAMTMP}/v1.0.0.tar.gz -> ${BASEDIR}/OPAM/download-cache/md5-dir/
 SYSTEM                          mkdir ${OPAMTMP}
 Processing  1/1: [baz.1: extract]

This happens because some archives are being created above in the tests and their checksums will vary with the time of day so in some cases a collision will happen with the fix get_line archive

@kit-ty-kate kit-ty-kate added this to the 2.4.0~alpha1 milestone Feb 4, 2025
@kit-ty-kate kit-ty-kate requested a review from rjbou February 4, 2025 16:07
@rjbou rjbou force-pushed the reftest-checksum-collision branch from a386c68 to 34500f0 Compare February 5, 2025 14:17
@rjbou rjbou merged commit 42b8619 into ocaml:master Feb 5, 2025
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants