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

don't allow unresolved templates in easyconfig parameters by default + add support for --allow-unresolved-templates configuration option #4516

Merged
merged 7 commits into from
Dec 18, 2024

Conversation

Flamefire
Copy link
Contributor

A failure in template resolving is currently hidden in the log although
it is likely due to a bug in the code (either EasyBuild, EasyBlock or EasyConfig)
This may lead to cryptic error messages later on or misbehave silently
which is even worse.

@Flamefire Flamefire force-pushed the disallow-template-failure branch 3 times, most recently from 604053a to 4a73b73 Compare April 25, 2024 13:34
@boegel boegel added the EasyBuild-5.0 EasyBuild 5.0 label May 22, 2024
@boegel boegel added this to the 5.0 milestone May 22, 2024
@boegel boegel added the EasyBuild-5.0-blocker Blocker for EasyBuild 5.0 label Jun 5, 2024
@Flamefire Flamefire force-pushed the disallow-template-failure branch 3 times, most recently from 145defc to eaaf115 Compare June 6, 2024 15:35
@boegel
Copy link
Member

boegel commented Nov 6, 2024

@Flamefire Can you sync this with the current 5.0.x branch, so we have a fresh run of the test suite here?

@boegel boegel removed the EasyBuild-5.0-blocker Blocker for EasyBuild 5.0 label Nov 6, 2024
@boegel boegel changed the title Disallow template failure don't allow unresolved templates in easyconfig parameters by default + add support for --allow-unresolved-templates configuration option Nov 6, 2024
@Flamefire Flamefire force-pushed the disallow-template-failure branch from eaaf115 to a6cc123 Compare November 8, 2024 14:54
@Flamefire
Copy link
Contributor Author

CI finished after the sync as requested.

Micket
Micket previously approved these changes Nov 23, 2024
Copy link
Contributor

@Micket Micket left a comment

Choose a reason for hiding this comment

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

changes look reasonable to me. Ready to merge @boegel ?

boegel
boegel previously approved these changes Dec 18, 2024
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

easybuild/tools/config.py Outdated Show resolved Hide resolved
Flamefire and others added 5 commits December 18, 2024 10:37
A failure in template resolving is currently hidden in the log although
it is likely due to a bug in the code (either EasyBuild, EasyBlock or EasyConfig)
This may lead to cryptic error messages later on or misbehave silently
which is even worse.
If we only want the `len` of some list we don't need to resolve the templates.
We cannot resolve templates in collect_exts_file_info like `installdir` present in e.g.
`installcmd` of the extension options.
…ions & `asdict`

Some dependencies may use templates referring to other dependencies
which cannot yet be resolved. Hence add an opt-out to the enforcment
of resolved templates via `expect_resolved=False` and use that.

This allows use of `%(installdir)s` or `%(ext_name)s` and similar in the
options.
@Flamefire
Copy link
Contributor Author

Flamefire commented Dec 18, 2024

Rebased and fixed the 2 style issues.

BTW: For 5.0x we can use assertRegex to avoid the boilerplate without loosing anything

@Flamefire Flamefire force-pushed the disallow-template-failure branch from bc6a136 to 4e21bc9 Compare December 18, 2024 10:21
@Flamefire Flamefire force-pushed the disallow-template-failure branch from 4e21bc9 to b426aaa Compare December 18, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants