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

fall back to getting values with unresolved templates in EasyBlock.check_checksums_for #4725

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

boegel
Copy link
Member

@boegel boegel commented Dec 19, 2024

Fix for problems that arise with for example QuantumESPRESSO-7.3-intel-2023a.eb in the easyconfigs test suite:

Failed to resolve all templates in "mkdir -p %(builddir)s/qe-%(version)s && tar xzvf %%s --strip-components=1 -C $_" using template dictionary: {...}

That's because the %(builddir)s template can not be resolved yet when checking checksums for sources/patches, but since that's part of extract_cmd there's no reason for concern here:

sources = [
    {
        'filename': 'q-e-qe-%(version)s.tar.gz',
        'extract_cmd': 'mkdir -p %(builddir)s/qe-%(version)s && tar xzvf %s --strip-components=1 -C $_',
        'source_urls': ['https://gitlab.com/QEF/q-e/-/archive/qe-%(version)s']
    },
...

Falling back to grabbing values without resolving templates via get_ref fixes this issue, only small downside is that it leads to using q-e-qe-%(version)s.tar.gz in any potential error messages in case of incorrect checksum.

edit: fallout from changes in #4516

@boegel boegel added bug fix EasyBuild-5.0 EasyBuild 5.0 labels Dec 19, 2024
@boegel boegel added this to the release after 4.9.4 milestone Dec 19, 2024
@boegel boegel force-pushed the unresolved_templates_fixes branch from 95e071e to 6cae9c0 Compare December 19, 2024 07:49
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.

Just one question

easybuild/framework/easyblock.py Outdated Show resolved Hide resolved
@boegel boegel force-pushed the unresolved_templates_fixes branch from 85987c2 to b2bee28 Compare December 19, 2024 09:38
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

@lexming lexming enabled auto-merge December 19, 2024 09:40
@lexming lexming merged commit d336035 into easybuilders:5.0.x Dec 19, 2024
39 checks passed
@boegel boegel deleted the unresolved_templates_fixes branch December 19, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Breaking changes
Development

Successfully merging this pull request may close these issues.

2 participants