GoogleCloudPlatform / GoogleCloudPlatform/cluster-toolkit

MODULEPATH: may not successively drop (ml unuse) components when exhausting the list

Open
#6,244 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
361
Forks
322
Avg merge
2d 21h
Merged PRs (30d)
115

Description

continuation of cases #5699 & #6214.

There is still at least one bug present, the way to reproduce it is, to successively drop each component - at the very end we observe something like this:

(i.e. add exactly one path component to MODULEPATH and then use a sequence of `ml unuse` to exhaust the list)

```
module unuse
module unuse
module unuse
...
[f@...img-test-01 ~]$ module unuse /etc/modulefiles ; for i in sh csh tcsh ksh zsh bash "bash -l"; do echo == S
HELL is $i; echo 'echo $MODULEPATH'| $i ; done
== SHELL is sh
/tmp/hello
== SHELL is csh
/tmp/hello
== SHELL is tcsh
/tmp/hello
== SHELL is ksh
/tmp/hello
== SHELL is zsh
/tmp/hello
== SHELL is bash
/tmp/hello
== SHELL is bash -l
/tmp/hello
[f@...img-test-01 ~]$ module unuse /tmp/hello ; for i in sh csh tcsh ksh zsh bash "bash -l"; do echo == SHELL i
s $i; echo 'echo $MODULEPATH'| $i ; done
== SHELL is sh

== SHELL is csh
/etc/modulefiles:/usr/share/modulefiles
== SHELL is tcsh
/etc/modulefiles:/usr/share/modulefiles
== SHELL is ksh

== SHELL is zsh

== SHELL is bash

== SHELL is bash -l
/etc/modulefiles:/usr/share/modulefiles
[f@...img-test-01 ~]$ date
Tue Sep 1 11:00:27 UTC 2026
[f@...img-test-01 ~]$
```

Obviously, this is not as high-priority case as #5699 - however, since the bug is reproducible, I think it is correct to keep it open, at least to help others hitting it.

Usually, this class of `module` bugs are accompanied by related bugs in respecting the priority of the MODULEPATH components (i.e. your invocation of `ml unuse` may be partially successful but still have another path component surprising the user space)

Contributor guide

Open the contributing guide

Research direction

Start by running the successive `module unuse` reproduction with one added MODULEPATH component, then compare the reported MODULEPATH across sh, csh, tcsh, ksh, zsh, and bash, including login bash. Done means exhausting the components leaves consistent MODULEPATH results in every listed shell and preserves component priority.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.