You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The easyconfig ec parameter gets passed as the first argument to EasyBlock's base init . This gets assigned as self.cfg = ec inside the easyblocks.
However, it's a few easyblocks (cargo, Bundle, and others) then modifies the self.cfg variable, modifying the referenced input argument ec .
This can break things in test suites and in the code as EasyBlock 's get initialized several times throughout the code.
Example: easybuilders/easybuild-easyconfigs#18027 failing at the time of writing this because check_sha256_checksum adds.
Workarounds have also been added in Cargo easyblock which prevents it from adding the crates to the source list repeatedly.
I think it also might be happening outside of just the check_sha256* CI stuff, and it just hasn't caused an issue.
Maybe the base easyblock should get a copy self.cfg = deepcopy(ec) such that the original input argument isn't modified. But I don't know if there are any places where it's assumed that the ec should be modified by the constructor of the easyblocks.
Add a parameter inside ec to detect if it's been initialized already, and add checks to skip that in Bundle. Quite fragile approach, but if this behavior is relied on, then this is still far better than the attempts to "restore" ec by trying to undo what the EasyBlock did (which is basically impossible, since it just guesses what the easyblock did and deletes everything it thinks was added).
Try to fix CI not to repeat the initilization, presumably be preserving the easyblock instance somehow. Very ugly but perhaps the EasyConfig class could store a reference to it, i.e. lazily once init the easyblock?
The text was updated successfully, but these errors were encountered:
The easyconfig ec parameter gets passed as the first argument to EasyBlock's base init . This gets assigned as self.cfg = ec inside the easyblocks.
However, it's a few easyblocks (cargo, Bundle, and others) then modifies the self.cfg variable, modifying the referenced input argument ec .
This can break things in test suites and in the code as EasyBlock 's get initialized several times throughout the code.
Example: easybuilders/easybuild-easyconfigs#18027 failing at the time of writing this because check_sha256_checksum adds.
Workarounds have also been added in Cargo easyblock which prevents it from adding the crates to the source list repeatedly.
I think it also might be happening outside of just the check_sha256* CI stuff, and it just hasn't caused an issue.
The text was updated successfully, but these errors were encountered: