galaxyproject / galaxyproject/planemo

Setting TMPDIR not respected when > 10 characters long.

Open
#603 1 comment 0 reactions 0 assignees View on GitHub
bug testing
Dominant language
Python
Stars
110
Forks
102
Avg merge
4d 21h
Merged PRs (30d)
13

Description

Please change the code in planemo/galaxy/config.py, in def _config_directory(ctx, **kwds):

On our galaxy, our jobs are submitted to a cluster to run. To test using planemo, temporary files must be in a location that is visible from the cluster. The smallest length of such directory locations that are writable by our users are either "/N/dc2/scratch/username" or "/N/u/username", and usernames are quite frequently longer than 5 or 6 characters long.

The temporary fix that is referenced in https://github.com/galaxyproject/planemo/pull/460

causes any value of TMPDIR that is longer than 10 characters to be ignored and the value is set to /tmp instead. That will not work in a cluster situation, because the /tmp where galaxy runs is a totally different file system than the /tmp on the cluster nodes (each node has its own /tmp). Even though the test is for 20 characters, before the test, a 9 character directory name (plus a "/" separator) is added to the TMPDIR variable when calling mkdtemp() to create the config_directory value.

There needs to be a way that we can set TMPDIR and make that value be respected.
Since the issue with long names is with conda, then some sort of test could be made as to whether conda is being used, and if the name is too long and conda is being used, then a message about the situation could be printed for the user to find a work around for their system, rather than assuming that /tmp is going to work for them.

Another solution might be to add a command line argument that would be used to set the config_directory variable.

Thanks,
Cicada

Contributor guide

Open the contributing guide

Research direction

Start in planemo/galaxy/config.py at _config_directory(ctx, **kwds), then inspect how TMPDIR and mkdtemp() are handled, including the temporary fix referenced in pull request 460. Reproduce the reported long-path case and consider the conda-related behavior described in the issue; done means a user-provided TMPDIR is respected without breaking the existing configuration-directory behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.