1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/d252ac015734/
Changeset: d252ac015734
User: jmchilton
Date: 2014-10-06 01:45:08+00:00
Summary: Merged in kellrott/galaxy-farm/docker-work (pull request #516)
Running docker with 'auto-remove' be default
Affected #: 3 files
diff -r 37cf5505992bcccfc54f133d04b857076e7164ac -r d252ac015734d6e382ff07a0497a84ac575059e2 config/job_conf.xml.sample_advanced
--- a/config/job_conf.xml.sample_advanced
+++ b/config/job_conf.xml.sample_advanced
@@ -77,7 +77,7 @@
of old LWR job runner. If your Pulsar server is running on a
Windows machine for instance this runner should still be used.
- These destinations still needs to target a Pulsar server,
+ These destinations still needs to target a Pulsar server,
older LWR plugins and destinations still work in Galaxy can
target LWR servers, but this support should be considered
deprecated and will disappear with a future release of Galaxy.
@@ -110,7 +110,7 @@
<destination id="local" runner="local"/><destination id="multicore_local" runner="local"><param id="local_slots">4</param><!-- Specify GALAXY_SLOTS for local jobs. -->
- <!-- Warning: Local slot count doesn't tie up additional worker threads, to prevent over
+ <!-- Warning: Local slot count doesn't tie up additional worker threads, to prevent over
allocating machine define a second local runner with different name and fewer workers
to run this destination. --><param id="embed_metadata_in_job">True</param>
@@ -119,7 +119,7 @@
try it early - it will slightly speed up local jobs by
embedding metadata calculation in job script itself.
-->
- <job_metrics />
+ <job_metrics /><!-- Above element demonstrates embedded job metrics definition - see
job_metrics_conf.xml.sample for full documentation on possible nested
elements. This empty block will simply disable job metrics for the
@@ -134,12 +134,12 @@
destination - but be sure to add any library paths or data incides
that may be needed read-only.
-->
- <!--
+ <!--
<param id="docker_volumes">$defaults,/mnt/galaxyData/libraries:ro,/mnt/galaxyData/indices:ro</param>
--><!-- For a stock Galaxy instance and traditional job runner $defaults will
expand out as:
-
+
$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$default_file_path:rw
This assumes most of what is needed is available under Galaxy's root directory,
@@ -153,7 +153,7 @@
$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$default_file_path:ro
- If using the Pulsar, defaults will be even further restricted because the
+ If using the Pulsar, defaults will be even further restricted because the
Pulsar will (by default) stage all needed inputs into the job's job_directory
(so there is not need to allow the docker container to read all the
files - let alone write over them). Defaults in this case becomes:
@@ -173,15 +173,15 @@
<!-- Control memory allocatable by docker container with following option:
--><!-- <param id="docker_memory">24G</param> -->
- <!-- By default Docker will need to runnable by Galaxy using
+ <!-- By default Docker will need to runnable by Galaxy using
password-less sudo - this can be configured by adding the
following line to the sudoers file of all compute nodes
with docker enabled:
-
+
galaxy ALL = (root) NOPASSWD: SETENV: /usr/bin/docker
- The follow option is set to false to disable sudo (docker
- must likewise be configured to allow this).
+ The follow option is set to false to disable sudo (docker
+ must likewise be configured to allow this).
--><!-- <param id="docker_sudo">false</param> --><!-- Following option can be used to tweak sudo command used by
@@ -192,6 +192,11 @@
http://docs.docker.io/reference/run/#network-settings
--><!-- <param id="docker_net">bridge</param> -->
+ <!-- By default, a container will live on past its run. By
+ adding the '--rm' flag to the command line, the container
+ will be removed automatically after the program is complete.
+ -->
+ <!-- <param id="docker_auto_rm">false</param> --><!-- Following command can be used to tweak docker command. --><!-- <param id="docker_cmd">/usr/local/custom_docker/docker</param> --><!-- Following can be used to connect to docke server in different
@@ -265,7 +270,7 @@
<!-- Burst out from static destination local_cluster_8_core to
static destination shared_cluster_8_core when there are about
50 Galaxy jobs assigned to any of the local_cluster_XXX
- destinations (either running or queued). If there are fewer
+ destinations (either running or queued). If there are fewer
than 50 jobs, just use local_cluster_8_core destination.
Uncomment job_state parameter to make this bursting happen when
@@ -294,8 +299,8 @@
configuration. --><param id="private_token">123456789changeme</param><!-- Uncomment the following statement to disable file staging (e.g.
- if there is a shared file system between Galaxy and the Pulsar
- server). Alternatively action can be set to 'copy' - to replace
+ if there is a shared file system between Galaxy and the Pulsar
+ server). Alternatively action can be set to 'copy' - to replace
http transfers with file system copies, 'remote_transfer' to cause
the Pulsar to initiate HTTP transfers instead of Galaxy, or
'remote_copy' to cause Pulsar to initiate file system copies.
@@ -337,7 +342,7 @@
instead. This may be required if remote host is Windows machine
but probably not otherwise.
-->
- <!-- <param id="rewrite_parameters">false</params> -->
+ <!-- <param id="rewrite_parameters">false</params> --></destination><destination id="pulsar_mq_dest" runner="amqp_pulsar" ><!-- The RESTful Pulsar client sends a request to Pulsar
diff -r 37cf5505992bcccfc54f133d04b857076e7164ac -r d252ac015734d6e382ff07a0497a84ac575059e2 lib/galaxy/tools/deps/containers.py
--- a/lib/galaxy/tools/deps/containers.py
+++ b/lib/galaxy/tools/deps/containers.py
@@ -208,6 +208,7 @@
env_directives=env_directives,
working_directory=working_directory,
net=prop("net", "none"), # By default, docker instance has networking disabled
+ auto_rm=prop("auto_rm", docker_util.DEFAULT_AUTO_REMOVE),
**docker_host_props
)
return "%s\n%s" % (cache_command, run_command)
diff -r 37cf5505992bcccfc54f133d04b857076e7164ac -r d252ac015734d6e382ff07a0497a84ac575059e2 lib/galaxy/tools/deps/docker_util.py
--- a/lib/galaxy/tools/deps/docker_util.py
+++ b/lib/galaxy/tools/deps/docker_util.py
@@ -8,6 +8,7 @@
DEFAULT_NET = None
DEFAULT_MEMORY = None
DEFAULT_VOLUMES_FROM = None
+DEFAULT_AUTO_REMOVE = True
class DockerVolume(object):
@@ -82,6 +83,7 @@
docker_cmd=DEFAULT_DOCKER_COMMAND,
sudo=DEFAULT_SUDO,
sudo_cmd=DEFAULT_SUDO_COMMAND,
+ auto_rm=DEFAULT_AUTO_REMOVE,
host=DEFAULT_HOST,
):
command_parts = __docker_prefix(docker_cmd, sudo, sudo_cmd, host)
@@ -100,6 +102,8 @@
command_parts.extend(["-w", working_directory])
if net:
command_parts.extend(["--net", net])
+ if auto_rm:
+ command_parts.append("--rm")
full_image = image
if tag:
full_image = "%s:%s" % (full_image, tag)
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/db93990f8def/
Changeset: db93990f8def
Branch: docker-work
User: kell...(a)gmail.com
Date: 2014-10-05 23:23:55+00:00
Summary: Adding behavior that docker is called with '--rm' flag by default, so containers will automatically be removed. This can be disabled via job_config
Affected #: 3 files
diff -r 4aca849f229f538770376d091fac30e4a76854a8 -r db93990f8def9e20c979337dbca0ef1e7e06f400 config/job_conf.xml.sample_advanced
--- a/config/job_conf.xml.sample_advanced
+++ b/config/job_conf.xml.sample_advanced
@@ -77,7 +77,7 @@
of old LWR job runner. If your Pulsar server is running on a
Windows machine for instance this runner should still be used.
- These destinations still needs to target a Pulsar server,
+ These destinations still needs to target a Pulsar server,
older LWR plugins and destinations still work in Galaxy can
target LWR servers, but this support should be considered
deprecated and will disappear with a future release of Galaxy.
@@ -110,7 +110,7 @@
<destination id="local" runner="local"/><destination id="multicore_local" runner="local"><param id="local_slots">4</param><!-- Specify GALAXY_SLOTS for local jobs. -->
- <!-- Warning: Local slot count doesn't tie up additional worker threads, to prevent over
+ <!-- Warning: Local slot count doesn't tie up additional worker threads, to prevent over
allocating machine define a second local runner with different name and fewer workers
to run this destination. --><param id="embed_metadata_in_job">True</param>
@@ -119,7 +119,7 @@
try it early - it will slightly speed up local jobs by
embedding metadata calculation in job script itself.
-->
- <job_metrics />
+ <job_metrics /><!-- Above element demonstrates embedded job metrics definition - see
job_metrics_conf.xml.sample for full documentation on possible nested
elements. This empty block will simply disable job metrics for the
@@ -134,12 +134,12 @@
destination - but be sure to add any library paths or data incides
that may be needed read-only.
-->
- <!--
+ <!--
<param id="docker_volumes">$defaults,/mnt/galaxyData/libraries:ro,/mnt/galaxyData/indices:ro</param>
--><!-- For a stock Galaxy instance and traditional job runner $defaults will
expand out as:
-
+
$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$default_file_path:rw
This assumes most of what is needed is available under Galaxy's root directory,
@@ -153,7 +153,7 @@
$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$default_file_path:ro
- If using the Pulsar, defaults will be even further restricted because the
+ If using the Pulsar, defaults will be even further restricted because the
Pulsar will (by default) stage all needed inputs into the job's job_directory
(so there is not need to allow the docker container to read all the
files - let alone write over them). Defaults in this case becomes:
@@ -173,15 +173,15 @@
<!-- Control memory allocatable by docker container with following option:
--><!-- <param id="docker_memory">24G</param> -->
- <!-- By default Docker will need to runnable by Galaxy using
+ <!-- By default Docker will need to runnable by Galaxy using
password-less sudo - this can be configured by adding the
following line to the sudoers file of all compute nodes
with docker enabled:
-
+
galaxy ALL = (root) NOPASSWD: SETENV: /usr/bin/docker
- The follow option is set to false to disable sudo (docker
- must likewise be configured to allow this).
+ The follow option is set to false to disable sudo (docker
+ must likewise be configured to allow this).
--><!-- <param id="docker_sudo">false</param> --><!-- Following option can be used to tweak sudo command used by
@@ -192,6 +192,11 @@
http://docs.docker.io/reference/run/#network-settings
--><!-- <param id="docker_net">bridge</param> -->
+ <!-- By default, a container will live on past its run. By
+ adding the '--rm' flag to the command line, the container
+ will be removed automatically after the program is complete.
+ -->
+ <!-- <param id="docker_auto_rm">false</param> --><!-- Following command can be used to tweak docker command. --><!-- <param id="docker_cmd">/usr/local/custom_docker/docker</param> --><!-- Following can be used to connect to docke server in different
@@ -265,7 +270,7 @@
<!-- Burst out from static destination local_cluster_8_core to
static destination shared_cluster_8_core when there are about
50 Galaxy jobs assigned to any of the local_cluster_XXX
- destinations (either running or queued). If there are fewer
+ destinations (either running or queued). If there are fewer
than 50 jobs, just use local_cluster_8_core destination.
Uncomment job_state parameter to make this bursting happen when
@@ -294,8 +299,8 @@
configuration. --><param id="private_token">123456789changeme</param><!-- Uncomment the following statement to disable file staging (e.g.
- if there is a shared file system between Galaxy and the Pulsar
- server). Alternatively action can be set to 'copy' - to replace
+ if there is a shared file system between Galaxy and the Pulsar
+ server). Alternatively action can be set to 'copy' - to replace
http transfers with file system copies, 'remote_transfer' to cause
the Pulsar to initiate HTTP transfers instead of Galaxy, or
'remote_copy' to cause Pulsar to initiate file system copies.
@@ -337,7 +342,7 @@
instead. This may be required if remote host is Windows machine
but probably not otherwise.
-->
- <!-- <param id="rewrite_parameters">false</params> -->
+ <!-- <param id="rewrite_parameters">false</params> --></destination><destination id="pulsar_mq_dest" runner="amqp_pulsar" ><!-- The RESTful Pulsar client sends a request to Pulsar
diff -r 4aca849f229f538770376d091fac30e4a76854a8 -r db93990f8def9e20c979337dbca0ef1e7e06f400 lib/galaxy/tools/deps/containers.py
--- a/lib/galaxy/tools/deps/containers.py
+++ b/lib/galaxy/tools/deps/containers.py
@@ -208,6 +208,7 @@
env_directives=env_directives,
working_directory=working_directory,
net=prop("net", "none"), # By default, docker instance has networking disabled
+ auto_rm=prop("auto_rm", docker_util.DEFAULT_AUTO_REMOVE),
**docker_host_props
)
return "%s\n%s" % (cache_command, run_command)
diff -r 4aca849f229f538770376d091fac30e4a76854a8 -r db93990f8def9e20c979337dbca0ef1e7e06f400 lib/galaxy/tools/deps/docker_util.py
--- a/lib/galaxy/tools/deps/docker_util.py
+++ b/lib/galaxy/tools/deps/docker_util.py
@@ -8,6 +8,7 @@
DEFAULT_NET = None
DEFAULT_MEMORY = None
DEFAULT_VOLUMES_FROM = None
+DEFAULT_AUTO_REMOVE = True
class DockerVolume(object):
@@ -82,6 +83,7 @@
docker_cmd=DEFAULT_DOCKER_COMMAND,
sudo=DEFAULT_SUDO,
sudo_cmd=DEFAULT_SUDO_COMMAND,
+ auto_rm=DEFAULT_AUTO_REMOVE,
host=DEFAULT_HOST,
):
command_parts = __docker_prefix(docker_cmd, sudo, sudo_cmd, host)
@@ -100,6 +102,8 @@
command_parts.extend(["-w", working_directory])
if net:
command_parts.extend(["--net", net])
+ if auto_rm:
+ command_parts.append("--rm")
full_image = image
if tag:
full_image = "%s:%s" % (full_image, tag)
https://bitbucket.org/galaxy/galaxy-central/commits/d252ac015734/
Changeset: d252ac015734
User: jmchilton
Date: 2014-10-06 01:45:08+00:00
Summary: Merged in kellrott/galaxy-farm/docker-work (pull request #516)
Running docker with 'auto-remove' be default
Affected #: 3 files
diff -r 37cf5505992bcccfc54f133d04b857076e7164ac -r d252ac015734d6e382ff07a0497a84ac575059e2 config/job_conf.xml.sample_advanced
--- a/config/job_conf.xml.sample_advanced
+++ b/config/job_conf.xml.sample_advanced
@@ -77,7 +77,7 @@
of old LWR job runner. If your Pulsar server is running on a
Windows machine for instance this runner should still be used.
- These destinations still needs to target a Pulsar server,
+ These destinations still needs to target a Pulsar server,
older LWR plugins and destinations still work in Galaxy can
target LWR servers, but this support should be considered
deprecated and will disappear with a future release of Galaxy.
@@ -110,7 +110,7 @@
<destination id="local" runner="local"/><destination id="multicore_local" runner="local"><param id="local_slots">4</param><!-- Specify GALAXY_SLOTS for local jobs. -->
- <!-- Warning: Local slot count doesn't tie up additional worker threads, to prevent over
+ <!-- Warning: Local slot count doesn't tie up additional worker threads, to prevent over
allocating machine define a second local runner with different name and fewer workers
to run this destination. --><param id="embed_metadata_in_job">True</param>
@@ -119,7 +119,7 @@
try it early - it will slightly speed up local jobs by
embedding metadata calculation in job script itself.
-->
- <job_metrics />
+ <job_metrics /><!-- Above element demonstrates embedded job metrics definition - see
job_metrics_conf.xml.sample for full documentation on possible nested
elements. This empty block will simply disable job metrics for the
@@ -134,12 +134,12 @@
destination - but be sure to add any library paths or data incides
that may be needed read-only.
-->
- <!--
+ <!--
<param id="docker_volumes">$defaults,/mnt/galaxyData/libraries:ro,/mnt/galaxyData/indices:ro</param>
--><!-- For a stock Galaxy instance and traditional job runner $defaults will
expand out as:
-
+
$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$default_file_path:rw
This assumes most of what is needed is available under Galaxy's root directory,
@@ -153,7 +153,7 @@
$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$default_file_path:ro
- If using the Pulsar, defaults will be even further restricted because the
+ If using the Pulsar, defaults will be even further restricted because the
Pulsar will (by default) stage all needed inputs into the job's job_directory
(so there is not need to allow the docker container to read all the
files - let alone write over them). Defaults in this case becomes:
@@ -173,15 +173,15 @@
<!-- Control memory allocatable by docker container with following option:
--><!-- <param id="docker_memory">24G</param> -->
- <!-- By default Docker will need to runnable by Galaxy using
+ <!-- By default Docker will need to runnable by Galaxy using
password-less sudo - this can be configured by adding the
following line to the sudoers file of all compute nodes
with docker enabled:
-
+
galaxy ALL = (root) NOPASSWD: SETENV: /usr/bin/docker
- The follow option is set to false to disable sudo (docker
- must likewise be configured to allow this).
+ The follow option is set to false to disable sudo (docker
+ must likewise be configured to allow this).
--><!-- <param id="docker_sudo">false</param> --><!-- Following option can be used to tweak sudo command used by
@@ -192,6 +192,11 @@
http://docs.docker.io/reference/run/#network-settings
--><!-- <param id="docker_net">bridge</param> -->
+ <!-- By default, a container will live on past its run. By
+ adding the '--rm' flag to the command line, the container
+ will be removed automatically after the program is complete.
+ -->
+ <!-- <param id="docker_auto_rm">false</param> --><!-- Following command can be used to tweak docker command. --><!-- <param id="docker_cmd">/usr/local/custom_docker/docker</param> --><!-- Following can be used to connect to docke server in different
@@ -265,7 +270,7 @@
<!-- Burst out from static destination local_cluster_8_core to
static destination shared_cluster_8_core when there are about
50 Galaxy jobs assigned to any of the local_cluster_XXX
- destinations (either running or queued). If there are fewer
+ destinations (either running or queued). If there are fewer
than 50 jobs, just use local_cluster_8_core destination.
Uncomment job_state parameter to make this bursting happen when
@@ -294,8 +299,8 @@
configuration. --><param id="private_token">123456789changeme</param><!-- Uncomment the following statement to disable file staging (e.g.
- if there is a shared file system between Galaxy and the Pulsar
- server). Alternatively action can be set to 'copy' - to replace
+ if there is a shared file system between Galaxy and the Pulsar
+ server). Alternatively action can be set to 'copy' - to replace
http transfers with file system copies, 'remote_transfer' to cause
the Pulsar to initiate HTTP transfers instead of Galaxy, or
'remote_copy' to cause Pulsar to initiate file system copies.
@@ -337,7 +342,7 @@
instead. This may be required if remote host is Windows machine
but probably not otherwise.
-->
- <!-- <param id="rewrite_parameters">false</params> -->
+ <!-- <param id="rewrite_parameters">false</params> --></destination><destination id="pulsar_mq_dest" runner="amqp_pulsar" ><!-- The RESTful Pulsar client sends a request to Pulsar
diff -r 37cf5505992bcccfc54f133d04b857076e7164ac -r d252ac015734d6e382ff07a0497a84ac575059e2 lib/galaxy/tools/deps/containers.py
--- a/lib/galaxy/tools/deps/containers.py
+++ b/lib/galaxy/tools/deps/containers.py
@@ -208,6 +208,7 @@
env_directives=env_directives,
working_directory=working_directory,
net=prop("net", "none"), # By default, docker instance has networking disabled
+ auto_rm=prop("auto_rm", docker_util.DEFAULT_AUTO_REMOVE),
**docker_host_props
)
return "%s\n%s" % (cache_command, run_command)
diff -r 37cf5505992bcccfc54f133d04b857076e7164ac -r d252ac015734d6e382ff07a0497a84ac575059e2 lib/galaxy/tools/deps/docker_util.py
--- a/lib/galaxy/tools/deps/docker_util.py
+++ b/lib/galaxy/tools/deps/docker_util.py
@@ -8,6 +8,7 @@
DEFAULT_NET = None
DEFAULT_MEMORY = None
DEFAULT_VOLUMES_FROM = None
+DEFAULT_AUTO_REMOVE = True
class DockerVolume(object):
@@ -82,6 +83,7 @@
docker_cmd=DEFAULT_DOCKER_COMMAND,
sudo=DEFAULT_SUDO,
sudo_cmd=DEFAULT_SUDO_COMMAND,
+ auto_rm=DEFAULT_AUTO_REMOVE,
host=DEFAULT_HOST,
):
command_parts = __docker_prefix(docker_cmd, sudo, sudo_cmd, host)
@@ -100,6 +102,8 @@
command_parts.extend(["-w", working_directory])
if net:
command_parts.extend(["--net", net])
+ if auto_rm:
+ command_parts.append("--rm")
full_image = image
if tag:
full_image = "%s:%s" % (full_image, tag)
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/054d8af08f09/
Changeset: 054d8af08f09
Branch: next-stable
User: jmchilton
Date: 2014-10-06 01:36:27+00:00
Summary: Backport Kyle's fix to docker's host argument from default.
See https://bitbucket.org/galaxy/galaxy-central/pull-request/515/fixing-how-doc….
Affected #: 1 file
diff -r 12497a97f7d22d08c6fdafe0c544b4f7a906da98 -r 054d8af08f098c76b9b64eb5d60835956abc8ae1 lib/galaxy/tools/deps/docker_util.py
--- a/lib/galaxy/tools/deps/docker_util.py
+++ b/lib/galaxy/tools/deps/docker_util.py
@@ -116,5 +116,5 @@
command_parts.append(sudo_cmd)
command_parts.append(docker_cmd)
if host:
- command_parts.append(["-H", host])
+ command_parts.extend(["-H", host])
return command_parts
https://bitbucket.org/galaxy/galaxy-central/commits/37cf5505992b/
Changeset: 37cf5505992b
User: jmchilton
Date: 2014-10-06 01:36:43+00:00
Summary: Merge next-stable.
Affected #: 1 file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b42fee58bc40/
Changeset: b42fee58bc40
User: jmchilton
Date: 2014-10-06 01:35:01+00:00
Summary: Merged in kellrott/galaxy-farm (pull request #515)
Fixing how docker_utils.__docker_prefix adds host info to command line
Affected #: 1 file
diff -r 3aa7288f5a97970df22fd38c400237028fe33e4b -r b42fee58bc402de82fb4667baa575cb81ab55f4b lib/galaxy/tools/deps/docker_util.py
--- a/lib/galaxy/tools/deps/docker_util.py
+++ b/lib/galaxy/tools/deps/docker_util.py
@@ -116,5 +116,5 @@
command_parts.append(sudo_cmd)
command_parts.append(docker_cmd)
if host:
- command_parts.append(["-H", host])
+ command_parts.extend(["-H", host])
return command_parts
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/12497a97f7d2/
Changeset: 12497a97f7d2
Branch: next-stable
User: jmchilton
Date: 2014-10-06 01:20:05+00:00
Summary: Back port Kyle's tool download fixes from default.
Affected #: 1 file
diff -r 105a53b01211993297b7ee64251cf3c1677883f7 -r 12497a97f7d22d08c6fdafe0c544b4f7a906da98 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -742,20 +742,21 @@
tool_xml = file( os.path.abspath( tool.config_file ), 'r' ).read()
# Retrieve tool help images and rewrite the tool's xml into a temporary file with the path
# modified to be relative to the repository root.
- tool_help = tool.help._source
image_found = False
- # Check each line of the rendered tool help for an image tag that points to a location under static/
- for help_line in tool_help.split( '\n' ):
- image_regex = re.compile( 'img alt="[^"]+" src="\${static_path}/([^"]+)"' )
- matches = re.search( image_regex, help_line )
- if matches is not None:
- tool_help_image = matches.group(1)
- tarball_path = tool_help_image
- filesystem_path = os.path.abspath( os.path.join( trans.app.config.root, 'static', tool_help_image ) )
- if os.path.exists( filesystem_path ):
- tarball_files.append( ( filesystem_path, tarball_path ) )
- image_found = True
- tool_xml = tool_xml.replace( '${static_path}/%s' % tarball_path, tarball_path )
+ if tool.help is not None:
+ tool_help = tool.help._source
+ # Check each line of the rendered tool help for an image tag that points to a location under static/
+ for help_line in tool_help.split( '\n' ):
+ image_regex = re.compile( 'img alt="[^"]+" src="\${static_path}/([^"]+)"' )
+ matches = re.search( image_regex, help_line )
+ if matches is not None:
+ tool_help_image = matches.group(1)
+ tarball_path = tool_help_image
+ filesystem_path = os.path.abspath( os.path.join( trans.app.config.root, 'static', tool_help_image ) )
+ if os.path.exists( filesystem_path ):
+ tarball_files.append( ( filesystem_path, tarball_path ) )
+ image_found = True
+ tool_xml = tool_xml.replace( '${static_path}/%s' % tarball_path, tarball_path )
# If one or more tool help images were found, add the modified tool XML to the tarball instead of the original.
if image_found:
fd, new_tool_config = tempfile.mkstemp( suffix='.xml' )
@@ -767,7 +768,7 @@
tool_tup = ( os.path.abspath( tool.config_file ), os.path.split( tool.config_file )[-1] )
tarball_files.append( tool_tup )
# TODO: This feels hacky.
- tool_command = tool.command.split( ' ' )[0]
+ tool_command = tool.command.strip().split( ' ' )[0]
tool_path = os.path.dirname( os.path.abspath( tool.config_file ) )
# Add the tool XML to the tuple that will be used to populate the tarball.
if os.path.exists( os.path.join( tool_path, tool_command ) ):
https://bitbucket.org/galaxy/galaxy-central/commits/342ee791fe55/
Changeset: 342ee791fe55
User: jmchilton
Date: 2014-10-06 01:25:01+00:00
Summary: Merge next-stable fixes to tool downloader.
Affected #: 1 file
diff -r 1daa729f4e72be6e6b3670b78bc652f857bbe933 -r 342ee791fe55b3bca0bbbe86c2e58509a9f96df6 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -789,9 +789,9 @@
tool_xml = file( os.path.abspath( tool.config_file ), 'r' ).read()
# Retrieve tool help images and rewrite the tool's xml into a temporary file with the path
# modified to be relative to the repository root.
+ image_found = False
if tool.help is not None:
tool_help = tool.help._source
- image_found = False
# Check each line of the rendered tool help for an image tag that points to a location under static/
for help_line in tool_help.split( '\n' ):
image_regex = re.compile( 'img alt="[^"]+" src="\${static_path}/([^"]+)"' )
@@ -804,16 +804,16 @@
tarball_files.append( ( filesystem_path, tarball_path ) )
image_found = True
tool_xml = tool_xml.replace( '${static_path}/%s' % tarball_path, tarball_path )
- # If one or more tool help images were found, add the modified tool XML to the tarball instead of the original.
- if image_found:
- fd, new_tool_config = tempfile.mkstemp( suffix='.xml' )
- os.close( fd )
- file( new_tool_config, 'w' ).write( tool_xml )
- tool_tup = ( os.path.abspath( new_tool_config ), os.path.split( tool.config_file )[-1] )
- temp_files.append( os.path.abspath( new_tool_config ) )
- else:
- tool_tup = ( os.path.abspath( tool.config_file ), os.path.split( tool.config_file )[-1] )
- tarball_files.append( tool_tup )
+ # If one or more tool help images were found, add the modified tool XML to the tarball instead of the original.
+ if image_found:
+ fd, new_tool_config = tempfile.mkstemp( suffix='.xml' )
+ os.close( fd )
+ file( new_tool_config, 'w' ).write( tool_xml )
+ tool_tup = ( os.path.abspath( new_tool_config ), os.path.split( tool.config_file )[-1] )
+ temp_files.append( os.path.abspath( new_tool_config ) )
+ else:
+ tool_tup = ( os.path.abspath( tool.config_file ), os.path.split( tool.config_file )[-1] )
+ tarball_files.append( tool_tup )
# TODO: This feels hacky.
tool_command = tool.command.strip().split( ' ' )[0]
tool_path = os.path.dirname( os.path.abspath( tool.config_file ) )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.