Skip to content

dump easyconfig before initializing easyblock in order to compare it with original easyconfig#12925

Merged
branfosj merged 1 commit intoeasybuilders:developfrom
boegel:fix_dump_check
May 21, 2021
Merged

dump easyconfig before initializing easyblock in order to compare it with original easyconfig#12925
branfosj merged 1 commit intoeasybuilders:developfrom
boegel:fix_dump_check

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented May 21, 2021

This change is required because of the fix to get_config_dict in easybuilders/easybuild-framework#3692 .

The result of the fix is that ec.parser.get_config_dict() now accurately reflects the original easyconfig file, whereas before the fix the value of mutable easyconfig parameters could have been tweaked by the easyblock constructor (like PythonBundle does for exts_default_options).

The easyconfig file that is dumped via ec.dump() will still include the modified easyconfig parameter though, and hence the comparison between the original easyconfig file and the dumped easyconfig file failed for easyconfigs that use an easyblock like PythonBundle that fiddles with easyconfig parameters at initialization.

Note that the behavior of dump() wasn't affected by the change in easybuilders/easybuild-framework#3692, but we're now (accurately) comparing the parsed dumped easyconfig with the actual original easyconfig parameter as defined in the easyconfig file.

The fix here is to just dump the easyconfig file before the easyblock instance is created, so any tweaks done by the easyblock constructor to parameter values don't affect the value comparison for easyconfig parameters we want to do in the tests...

@boegel boegel added the bug fix label May 21, 2021
@boegel boegel added this to the 4.4.0 milestone May 21, 2021
Copy link
Copy Markdown
Member

@branfosj branfosj left a comment

Choose a reason for hiding this comment

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

lgtm

@branfosj branfosj enabled auto-merge May 21, 2021 16:15
@branfosj branfosj merged commit 899e470 into easybuilders:develop May 21, 2021
@boegel boegel deleted the fix_dump_check branch May 21, 2021 16:39
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.

2 participants