Skip to content

disable templates when defining easyconfig parameters in EasyConfig.set_keys()#3037

Merged
akesandgren merged 1 commit intoeasybuilders:developfrom
boegel:set_keys_fix
Sep 29, 2019
Merged

disable templates when defining easyconfig parameters in EasyConfig.set_keys()#3037
akesandgren merged 1 commit intoeasybuilders:developfrom
boegel:set_keys_fix

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Sep 28, 2019

This patch fixes an elusive problem that only (sometimes) manifests with Python 3.5, as follows:

======================================================================
FAIL: test_toy_build_formatv2 (test.framework.toy_build.ToyBuildTest)
Perform a toy build (format v2).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/easybuild-framework/easybuild-framework/test/framework/toy_build.py", line 324, in test_toy_build_formatv2
    self.check_toy(self.test_installpath, outtxt)
  File "/home/easybuild-framework/easybuild-framework/test/framework/toy_build.py", line 86, in check_toy
    self.assertTrue(success.search(outtxt), "COMPLETED message found in '%s" % outtxt)
AssertionError: None is not true : COMPLETED message found in '== 2019-09-23 08:14:07,988 generaloption.py:1505 DEBUG generate_cmd_line no ignore
...
== 2019-09-23 08:14:08,260 build_log.py:164 ERROR EasyBuild crashed with an error (at easybuild/base/exceptions.py:124 in __init__): Unexpected type for dependency: == 6.4.0-2.28 (at easybuild/framework/easyconfig/templates.py:227 in template_constant_dict)
== 2019-09-23 08:14:08,261 build_log.py:164 ERROR EasyBuild crashed with an error (at easybuild/base/exceptions.py:124 in __init__): Failed to process easyconfig /home/easybuild-framework/test/framework/easyconfigs/v2.0/toy.eb: Unexpected type for dependency: == 6.4.0-2.28 (at easybuild/framework/easyconfig/easyconfig.py:1771 in process_easyconfig)

It occasionally made the test_toy_build_formatv2 test fail, but only when using Python 3.5, and only when the dependencies easyconfig parameter was being set first.

Ensuring a fixed order in which keys are processed in set_keys() also helps to make things more consistent...

@boegel boegel added the bug fix label Sep 28, 2019
@boegel boegel added this to the next release (4.0.1) milestone Sep 28, 2019
…et_keys(), to avoid elusive problem that only (sometimes) manifests with Python 3.5
Copy link
Copy Markdown
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

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

LGTM

@akesandgren
Copy link
Copy Markdown
Contributor

Going in, thanks @boegel!

@akesandgren akesandgren merged commit c03c702 into easybuilders:develop Sep 29, 2019
@boegel boegel deleted the set_keys_fix branch September 29, 2019 08:26
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