copy EasyConfig instance in constructor of Bundle and Cargo easyblocks before making changes to it#3448
Conversation
…s before changes to it
|
Test report by @boegel Overview of tested easyconfigs (in order)
Build succeeded for 4 out of 4 (4 easyconfigs in total) |
|
hm, well, i'm not opposed, but we should make it clear or not if init method are expected to be idempotent or always copy. Seems very inconsistent that will the input argument then tests would always be consistent with normal usage. |
|
I'd say that We're currently not enforcing this, but we probably should. |
That would mean we should likely do the copy in framework in the We could add a check in the easyconfig repo tests, that the EasyConfig instance is unmodified after the ctor because there we instantiate pretty much all easyblocks. We can also add a check in framework at the place where it instantiates the easyblock to fail if the ctor modifies it. However I'm afraid that doing that check on scale would be expensive as it involves a deep copy and deep comparison. It would slow down the tests and/or runtime quite a bit I guess. But of course we'd need to measure that. |
|
Some fallout of this for easyconfigs test suite is being fixed in: |
Yeah, this likely needs some follow-up. Always copying the |
EasyConfig instance in constructor of Bundle and Cargo easyblocks before changes to itEasyConfig instance in constructor of Bundle and Cargo easyblocks before making changes to it
required to make creating multiple
EasyBlockinstances from oneEasyConfiginstance works as intended + fix easybuilders/easybuild-easyconfigs#21393