symlinked pump names don't work as expected
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
@andreleblanc11 noticed this.
When the pump name directory is a symlink, sr3_tools uses the *link target* as the pump name.
e.g.:
```
sr3-config/
├── _dsh_config
├── cluster_A -> cluster_1/
└── cluster_1
# we're in the cluster_A pump directory, but sr3_tools uses cluster_1 as the pump name
user@srv:~/sr3-config/cluster_A$ sr3l pwd
Data Pump Name: cluster_1. DSH Machine List: /home/user/sr3-config/_dsh_config/cluster_1.list
```
This is a good thing if you want `cluster_A` to just be an alternative name for `cluster_1`.
But it's bad if you want `cluster_A` and `cluster_1` to be different clusters that share the same configs.
The problem comes from this line in the code:
https://github.com/MetPX/sr3_tools/blob/d17a0804f794e97e6844a9476169bf696d8c28aa/bin/sr3_utils#L14
`git rev-parse --show-toplevel` **always** returns a real path and when I wrote it, I wanted to ensure it would work on a system that used symlinked home directories so I used `pwd -P`.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at bin/sr3_utils around line 14 and reproduce the issue with a symlinked pump directory, using `sr3l pwd` from the issue example. Trace how `git rev-parse --show-toplevel` and `pwd -P` determine the pump name, then verify that symlinked pump names remain distinct while existing symlinked home-directory behavior is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100