[21.01] Refactor default mounting of $tmp_directory in containers #11654
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What did you do?
Why did you make this change?
e9f2b3a forced Galaxy to erroneously mount the host filesystem. In my case the path that $_GALAXY_JOB_TMP_DIR resolves to is in a docker volume. If multiple instances of Galaxy are running, they would mount the same path.
The issue is that $_GALAXY_JOB_TMP_DIR:$_GALAXY_JOB_TMP_DIR:rw assumes that $_GALAXY_JOB_TMP_DIR exists on the host.
The better solution is to add '$_GALAXY_JOB_TMP_DIR' to the $default value in docker_volumes runner spec.
The $tmp_directory variable can then resolve to self.job_info.tmp_directory or '$_GALAXY_JOB_TMP_DIR'.
I can then omit $tmp_directory from the docker_volumes config as the data volume where the job folder exists is already in the spec and the $_GALAXY_JOB_TMP_DIR path remains valid.
How to test the changes?
(select the most appropriate option; if the latter, provide steps for testing below)
For UI Components