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
add warning whenever a value with a template is replaced by a value without template #4212
base: develop
Are you sure you want to change the base?
add warning whenever a value with a template is replaced by a value without template #4212
Conversation
… replaced by a value without template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at the related issue and I wonder if we can define a more clear behaviour here. Ideally I would trigger a straight error when the template replacement is dangerous/unintended and not do anything otherwise.
Maybe we can check if templating is disabled through EasyConfig.enable_templating
and in such a case trigger an error whenever __setitem__
replaces a template. If templating is enabled probably is not an issue. What do you think? Would this approach work?
Raising an error makes existing tests fail. That's why I switched to a warning. See https://github.com/easybuilders/easybuild-framework/pull/4212/checks?check_run_id=11226883289 |
There's various reasons why passing a "raw" string value (with unresolved template values) makes sense, and some template values (like |
Hum ? That warning is precisely the opposite, i.e. when a "non-raw" string value (with resolved template values) is used to overwrite a raw one. |
… replaced by a value without template