Skip to content

Allow use of alternate envvar(s) to $HOME for user modules #3558

New issue

Have a question about this project? Sign up for a free account to open an issue and contact its maintainers and the community.

By clicking “Sign up for ”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on ? Sign in to your account

Merged
merged 21 commits into from
Feb 18, 2021

Conversation

ocaisa
Copy link
Member

@ocaisa ocaisa commented Feb 2, 2021

The use of $HOME for user modules is quite restrictive, it makes it very difficult to share user space installations. Even if we use a symlink to an accessible space it is still problematic as the root directory is still placed into the module (with $HOME expanded).

The nice thing about $HOME is that it is guaranteed to exist and right now that is required by module file that we create. Nevertheless, if a site is willing to take on using another (configurable) variable instead (with a sensible default value, such as $HOME), it would make user space installations with a module hierarchy a lot more flexible.

@ocaisa
Copy link
Member Author

@boegel This is also interesting for EESSI since it would allow sites to easily configure a stack built on top of the EESSI baseline

@akesandgren
Copy link
Contributor

Ha, nice. I have had vague thoughts in this direction a few weeks ago...

@ocaisaocaisa changed the title Allow use of alternate envvar to HOME for user modules Allow use of alternate envvar(s) to HOME for user modules Feb 3, 2021
@boegelboegel added this to the release after 4.3.3 milestone Feb 3, 2021
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

@ocaisa It would be nice to have a more complete test for this, where the generated module file actually gets loaded, and the effect on the changes in the environment are checked.

That may be a significant additional effort though...

@ocaisa
Copy link
Member Author

ocaisa commented Feb 16, 2021

@boegel Regarding having an end-to-end test for this, that is indeed additional effort and I don't really see the point. We currently check for the exact text we expect to find in the module file, the only additional thing that could be done is to make sure of the order.

@easybuilderseasybuilders deleted a comment from boegelbot Feb 16, 2021
@ocaisa
Copy link
Member Author

@ocaisa It would be nice to have a more complete test for this, where the generated module file actually gets loaded, and the effect on the changes in the environment are checked.

That may be a significant additional effort though...

@boegel Ok, I found a relatively easy way to do this

@ocaisaocaisa requested a review from boegel February 16, 2021 13:16
@ocaisa
Copy link
Member Author

@akesandgren Can you take a look at this to see if it makes sense for you too? We kind of need this so that we can create additional installations shared among a project as opposed to (or as well as) just for a single user.

@boegelboegel changed the title Allow use of alternate envvar(s) to HOME for user modules Allow use of alternate envvar(s) to $HOME for user modules Feb 18, 2021
@boegelboegel merged commit e9e2262 into easybuilders:develop Feb 18, 2021
@ocaisaocaisa deleted the alt-envvar-user-mod branch March 17, 2021 07:50
Sign up for free to join this conversation on . Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants