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

New checksum listing with dictionaries leads to confusing errors if you forget to update them #4254

Closed
Micket opened this issue May 5, 2023 · 2 comments · Fixed by #4150
Closed
Milestone

Comments

@Micket
Copy link
Contributor

Micket commented May 5, 2023

From a PR which had forgotten to inject new checksums

name = 'VTK'
version = '9.2.6'
...
checksums = [
    {'VTK-9.2.2.tar.gz': '1c5b0a2be71fac96ff4831af69e350f7a0ea3168981f790c000709dcf9121075'},
    {'VTKData-9.2.2.tar.gz': '4b0ac438c77773ff741fd02c0e3b0dc1406b4c51e6cbe4e8304306fa125f27bf'},
    {'vtk-version.egg-info': '787b82415ae7a4a1f815b4db0e25f7abc809a05fc85d7d219627f3a7e5d3867b'},
]

with the problem being that they are mapping to the old versions (and, of course, the checksums being old as well.
They are technically correct for version 9.2.2 (so there isn't actually any errors here if one were to nitpick)

but it does lead to a very confusing error message

== 2023-05-05 17:55:58,351 build_log.py:171 ERROR EasyBuild crashed with an error (at easybuild/easybuild-framework/easybuild/base/exceptions.py:126 in __init__): Invalid checksum spec 'None', should be a string (MD5) or 2-tuple (type, value). (at easybuild/easybuild-framework/easybuild/tools/filetools.py:1306 in verify_checksum)

Invalid checksum spec 'None'? It should detect the lack of a checksum for the particular source and give a proper error for that specifically.

@boegel
Copy link
Member

boegel commented May 23, 2023

Should be fixed with #4261

@Flamefire
Copy link
Contributor

Should be fixed with #4261

It is rather fixed by #4150 and I think this is a good example why a missing key should be an error instead silently using None as the value: Forgetting to update that checksum dict is an error which would then go unnoticed until someone tries with enforce_checksums

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants