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

resolve template values when getting checksums for extensions #4727

Merged

Conversation

boegel
Copy link
Member

@boegel boegel commented Dec 21, 2024

With the fix, the enhanced test fails with:

ERROR: test_exts_list (test.framework.easyconfig.EasyConfigTest.test_exts_list)
Test handling of list of extensions.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Volumes/work/easybuild-framework/easybuild/tools/filetools.py", line 1305, in verify_checksum
    checksum = checksum[filename]
               ~~~~~~~~^^^^^^^^^^
KeyError: 'toy-0.0.eb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Volumes/work/easybuild-framework/test/framework/easyconfig.py", line 512, in test_exts_list
    exts_sources = eb.collect_exts_file_info()
  File "/Volumes/work/easybuild-framework/easybuild/framework/easyblock.py", line 735, in collect_exts_file_info
    if verify_checksum(patch, checksum, computed_checksums[patch]):
       ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Volumes/work/easybuild-framework/easybuild/tools/filetools.py", line 1307, in verify_checksum
    raise EasyBuildError("Missing checksum for %s in %s", filename, checksum)
easybuild.tools.build_log.EasyBuildError: "Missing checksum for toy-0.0.eb in {'toy-0.%(version_minor)s.eb': '177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad'}"

This reproduces the problem reported in easybuilders/easybuild-easyconfigs#22090

edit: This is fallout from #4516, where templates are being resolved for sources in EasyBlock.collect_exts_file_info, but not in checksums.

@boegel boegel added bug fix EasyBuild-5.0 EasyBuild 5.0 labels Dec 21, 2024
@boegel boegel added this to the 5.0 milestone Dec 21, 2024
@boegel boegel requested a review from lexming December 21, 2024 17:50
@branfosj branfosj enabled auto-merge December 21, 2024 18:35
Copy link
Contributor

@lexming lexming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

As discussed, templates in dict keys should be avoided. However, given that this has been behavior in EasyBuild for a long time, we need this change to not break existing easyconfigs.

@branfosj branfosj merged commit c999fe4 into easybuilders:5.0.x Dec 21, 2024
39 checks passed
@boegel boegel deleted the resolve_template_extensio_checksums branch December 21, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Changed default
Development

Successfully merging this pull request may close these issues.

3 participants