easybuild-framework icon indicating copy to clipboard operation
easybuild-framework copied to clipboard

fake modules should have a unique name

Open boegel opened this issue 5 months ago • 0 comments
trafficstars

With https://github.com/easybuilders/easybuild-framework/pull/4868, we're now re-generating a fake module file for each extension, but we're reusing the same location and same name each time.

This is especially problematic when installing extensions in parallel, since the completion of the installation of one extension involves unloading and removing the fake module file.

While in practice there's no problem with this, mostly because Lmod doesn't care if a non-existing module file is being unloaded (which happens when another extension installation completes), it definitely not good to assume this will always be fine.

Fixing this should be easy: in ModuleGenerator.get_module_filepath, we can add some random salt to the name of the module file when fake is True, to ensure a unique module filename for every fake module.

boegel avatar May 26 '25 08:05 boegel