2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ccfb1805efd0/
Changeset: ccfb1805efd0
Branch: stable
User: natefoo
Date: 2014-03-05 19:59:41
Summary: Correctly handle Slurm jobs that are not caught by the job monitor until after MinJobAge (and thus appear to be "invalid jobs").
Affected #: 1 file
diff -r f1a13b9f2c3eb89dd28a8bbcc20fd929d39dcb65 -r ccfb1805efd075ebb2ab56f4b75509e7d6d99ebb lib/galaxy/jobs/runners/slurm.py
--- a/lib/galaxy/jobs/runners/slurm.py
+++ b/lib/galaxy/jobs/runners/slurm.py
@@ -19,8 +19,14 @@
def _complete_terminal_job( self, ajs, drmaa_state, **kwargs ):
def __get_jobinfo():
- scontrol_out = subprocess.check_output( ( 'scontrol', '-o', 'show', 'job', ajs.job_id ) )
- return dict( [ out_param.split( '=', 1 ) for out_param in scontrol_out.split() ] )
+ p = subprocess.Popen( ( 'scontrol', '-o', 'show', 'job', ajs.job_id ), stdout=subprocess.PIPE, stderr=subprocess.PIPE )
+ stdout, stderr = p.communicate()
+ if p.returncode != 0:
+ # Will need to be more clever here if this message is not consistent
+ if stderr == 'slurm_load_jobs error: Invalid job id specified\n':
+ return dict( JobState='NOT_FOUND' )
+ raise Exception( '`scontrol -o show job %s` returned %s, stderr: %s' % ( ajs.job_id, p.returncode, stderr ) )
+ return dict( [ out_param.split( '=', 1 ) for out_param in stdout.split() ] )
if drmaa_state == self.drmaa_job_states.FAILED:
try:
job_info = __get_jobinfo()
@@ -33,7 +39,10 @@
ajs.fail_message = "This job failed and the system timed out while trying to determine the cause of the failure."
break
job_info = __get_jobinfo()
- if job_info['JobState'] == 'TIMEOUT':
+ if job_info['JobState'] == 'NOT_FOUND':
+ log.warning( '(%s/%s) Job not found, assuming job check exceeded MinJobAge and completing as successful', ajs.job_wrapper.get_id_tag(), ajs.job_id )
+ drmaa_state = self.drmaa_job_states.DONE
+ elif job_info['JobState'] == 'TIMEOUT':
ajs.fail_message = "This job was terminated because it ran longer than the maximum allowed job run time."
elif job_info['JobState'] == 'NODE_FAIL':
log.warning( '(%s/%s) Job failed due to node failure, attempting resubmission', ajs.job_wrapper.get_id_tag(), ajs.job_id )
@@ -47,11 +56,12 @@
ajs.fail_message = "This job failed because it was cancelled by an administrator."
else:
ajs.fail_message = "This job failed for reasons that could not be determined."
- ajs.fail_message += '\nPlease click the bug icon to report this problem if you need help.'
- ajs.stop_job = False
- self.work_queue.put( ( self.fail_job, ajs ) )
+ if drmaa_state == self.drmaa_job_states.FAILED:
+ ajs.fail_message += '\nPlease click the bug icon to report this problem if you need help.'
+ ajs.stop_job = False
+ self.work_queue.put( ( self.fail_job, ajs ) )
except Exception, e:
log.exception( '(%s/%s) Unable to inspect failed slurm job using scontrol, job will be unconditionally failed: %s', ajs.job_wrapper.get_id_tag(), ajs.job_id, e )
super( SlurmJobRunner, self )._complete_terminal_job( ajs, drmaa_state = drmaa_state )
- elif drmaa_state == self.drmaa_job_states.DONE:
- super( SlurmJobRunner, self )._complete_terminal_job( ajs, drmaa_state = drmaa_state )
+ # by default, finish as if the job was successful.
+ super( SlurmJobRunner, self )._complete_terminal_job( ajs, drmaa_state = drmaa_state )
https://bitbucket.org/galaxy/galaxy-central/commits/4cad859d0325/
Changeset: 4cad859d0325
User: natefoo
Date: 2014-03-05 20:00:27
Summary: merge stable.
Affected #: 1 file
diff -r 8bb60a2538f6d2c4525ea50e3c37e3e78063814b -r 4cad859d032560a123f57eac78a81f852dc7531e lib/galaxy/jobs/runners/slurm.py
--- a/lib/galaxy/jobs/runners/slurm.py
+++ b/lib/galaxy/jobs/runners/slurm.py
@@ -19,8 +19,14 @@
def _complete_terminal_job( self, ajs, drmaa_state, **kwargs ):
def __get_jobinfo():
- scontrol_out = subprocess.check_output( ( 'scontrol', '-o', 'show', 'job', ajs.job_id ) )
- return dict( [ out_param.split( '=', 1 ) for out_param in scontrol_out.split() ] )
+ p = subprocess.Popen( ( 'scontrol', '-o', 'show', 'job', ajs.job_id ), stdout=subprocess.PIPE, stderr=subprocess.PIPE )
+ stdout, stderr = p.communicate()
+ if p.returncode != 0:
+ # Will need to be more clever here if this message is not consistent
+ if stderr == 'slurm_load_jobs error: Invalid job id specified\n':
+ return dict( JobState='NOT_FOUND' )
+ raise Exception( '`scontrol -o show job %s` returned %s, stderr: %s' % ( ajs.job_id, p.returncode, stderr ) )
+ return dict( [ out_param.split( '=', 1 ) for out_param in stdout.split() ] )
if drmaa_state == self.drmaa_job_states.FAILED:
try:
job_info = __get_jobinfo()
@@ -33,7 +39,10 @@
ajs.fail_message = "This job failed and the system timed out while trying to determine the cause of the failure."
break
job_info = __get_jobinfo()
- if job_info['JobState'] == 'TIMEOUT':
+ if job_info['JobState'] == 'NOT_FOUND':
+ log.warning( '(%s/%s) Job not found, assuming job check exceeded MinJobAge and completing as successful', ajs.job_wrapper.get_id_tag(), ajs.job_id )
+ drmaa_state = self.drmaa_job_states.DONE
+ elif job_info['JobState'] == 'TIMEOUT':
ajs.fail_message = "This job was terminated because it ran longer than the maximum allowed job run time."
elif job_info['JobState'] == 'NODE_FAIL':
log.warning( '(%s/%s) Job failed due to node failure, attempting resubmission', ajs.job_wrapper.get_id_tag(), ajs.job_id )
@@ -47,11 +56,12 @@
ajs.fail_message = "This job failed because it was cancelled by an administrator."
else:
ajs.fail_message = "This job failed for reasons that could not be determined."
- ajs.fail_message += '\nPlease click the bug icon to report this problem if you need help.'
- ajs.stop_job = False
- self.work_queue.put( ( self.fail_job, ajs ) )
+ if drmaa_state == self.drmaa_job_states.FAILED:
+ ajs.fail_message += '\nPlease click the bug icon to report this problem if you need help.'
+ ajs.stop_job = False
+ self.work_queue.put( ( self.fail_job, ajs ) )
except Exception, e:
log.exception( '(%s/%s) Unable to inspect failed slurm job using scontrol, job will be unconditionally failed: %s', ajs.job_wrapper.get_id_tag(), ajs.job_id, e )
super( SlurmJobRunner, self )._complete_terminal_job( ajs, drmaa_state = drmaa_state )
- elif drmaa_state == self.drmaa_job_states.DONE:
- super( SlurmJobRunner, self )._complete_terminal_job( ajs, drmaa_state = drmaa_state )
+ # by default, finish as if the job was successful.
+ super( SlurmJobRunner, self )._complete_terminal_job( ajs, drmaa_state = drmaa_state )
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/f1a13b9f2c3e/
Changeset: f1a13b9f2c3e
Branch: stable
User: greg
Date: 2014-03-04 23:01:51
Summary: Fix for white ghost scenario discovery.
Affected #: 2 files
diff -r b1b8acdf8c7268dfded0a358acfe31308196381a -r f1a13b9f2c3eb89dd28a8bbcc20fd929d39dcb65 lib/tool_shed/util/common_install_util.py
--- a/lib/tool_shed/util/common_install_util.py
+++ b/lib/tool_shed/util/common_install_util.py
@@ -1,3 +1,4 @@
+import copy
import logging
import os
import urllib
@@ -71,8 +72,8 @@
def get_dependencies_for_repository( trans, tool_shed_url, repo_info_dict, includes_tool_dependencies ):
"""
- Return dictionaries containing the sets of installed and missing tool dependencies and repository dependencies associated
- with the repository defined by the received repo_info_dict.
+ Return dictionaries containing the sets of installed and missing tool dependencies and repository
+ dependencies associated with the repository defined by the received repo_info_dict.
"""
repository = None
installed_rd = {}
@@ -86,15 +87,20 @@
if tool_dependencies:
if not includes_tool_dependencies:
includes_tool_dependencies = True
- # Inspect the tool_dependencies dictionary to separate the installed and missing tool dependencies. We don't add to installed_td
- # and missing_td here because at this point they are empty.
- installed_td, missing_td = get_installed_and_missing_tool_dependencies_for_installing_repository( trans, tool_shed_url, tool_dependencies )
- # In cases where a repository dependency is required only for compiling a dependent repository's tool dependency, the value of
- # repository_dependencies will be an empty dictionary here.
+ # Inspect the tool_dependencies dictionary to separate the installed and missing tool dependencies.
+ # We don't add to installed_td and missing_td here because at this point they are empty.
+ installed_td, missing_td = \
+ get_installed_and_missing_tool_dependencies_for_installing_repository( trans, tool_shed_url, tool_dependencies )
+ # In cases where a repository dependency is required only for compiling a dependent repository's
+ # tool dependency, the value of repository_dependencies will be an empty dictionary here.
if repository_dependencies:
# We have a repository with one or more defined repository dependencies.
if not repository:
- repository = suc.get_repository_for_dependency_relationship( trans.app, tool_shed_url, name, repository_owner, changeset_revision )
+ repository = suc.get_repository_for_dependency_relationship( trans.app,
+ tool_shed_url,
+ name,
+ repository_owner,
+ changeset_revision )
if repository and repository.metadata:
installed_rd, missing_rd = get_installed_and_missing_repository_dependencies( trans, repository )
else:
@@ -309,18 +315,26 @@
installed_tool_dependencies = {}
missing_tool_dependencies = {}
if tool_dependencies_dict:
- for td_key, val in tool_dependencies_dict.items():
+ # Make sure not to change anything in the received tool_dependencies_dict as that would be a bad side-effect!
+ tmp_tool_dependencies_dict = copy.deepcopy( tool_dependencies_dict )
+ for td_key, val in tmp_tool_dependencies_dict.items():
# Default the status to NEVER_INSTALLED.
tool_dependency_status = trans.install_model.ToolDependency.installation_status.NEVER_INSTALLED
# Set environment tool dependencies are a list.
if td_key == 'set_environment':
new_val = []
for requirement_dict in val:
- # {'repository_name': 'xx', 'name': 'bwa', 'version': '0.5.9', 'repository_owner': 'yy', 'changeset_revision': 'zz', 'type': 'package'}
- tool_dependency = tool_dependency_util.get_tool_dependency_by_name_version_type( trans.app,
- requirement_dict.get( 'name', None ),
- requirement_dict.get( 'version', None ),
- requirement_dict.get( 'type', 'package' ) )
+ # {'repository_name': 'xx',
+ # 'name': 'bwa',
+ # 'version': '0.5.9',
+ # 'repository_owner': 'yy',
+ # 'changeset_revision': 'zz',
+ # 'type': 'package'}
+ tool_dependency = \
+ tool_dependency_util.get_tool_dependency_by_name_version_type( trans.app,
+ requirement_dict.get( 'name', None ),
+ requirement_dict.get( 'version', None ),
+ requirement_dict.get( 'type', 'package' ) )
if tool_dependency:
tool_dependency_status = tool_dependency.status
requirement_dict[ 'status' ] = tool_dependency_status
@@ -331,7 +345,12 @@
missing_tool_dependencies[ td_key ] = new_val
else:
# The val dictionary looks something like this:
- # {'repository_name': 'xx', 'name': 'bwa', 'version': '0.5.9', 'repository_owner': 'yy', 'changeset_revision': 'zz', 'type': 'package'}
+ # {'repository_name': 'xx',
+ # 'name': 'bwa',
+ # 'version': '0.5.9',
+ # 'repository_owner': 'yy',
+ # 'changeset_revision': 'zz',
+ # 'type': 'package'}
tool_dependency = tool_dependency_util.get_tool_dependency_by_name_version_type( trans.app,
val.get( 'name', None ),
val.get( 'version', None ),
@@ -347,14 +366,16 @@
def get_required_repo_info_dicts( trans, tool_shed_url, repo_info_dicts ):
"""
- Inspect the list of repo_info_dicts for repository dependencies and append a repo_info_dict for each of them to the list. All
- repository_dependencies entries in each of the received repo_info_dicts includes all required repositories, so only one pass through
- this method is required to retrieve all repository dependencies.
+ Inspect the list of repo_info_dicts for repository dependencies and append a repo_info_dict for each of
+ them to the list. All repository_dependencies entries in each of the received repo_info_dicts includes
+ all required repositories, so only one pass through this method is required to retrieve all repository
+ dependencies.
"""
all_required_repo_info_dict = {}
all_repo_info_dicts = []
if repo_info_dicts:
- # We'll send tuples of ( tool_shed, repository_name, repository_owner, changeset_revision ) to the tool shed to discover repository ids.
+ # We'll send tuples of ( tool_shed, repository_name, repository_owner, changeset_revision ) to the tool
+ # shed to discover repository ids.
required_repository_tups = []
for repo_info_dict in repo_info_dicts:
if repo_info_dict not in all_repo_info_dicts:
@@ -368,9 +389,10 @@
continue
repository_components_tuple = container_util.get_components_from_key( key )
components_list = suc.extract_components_from_tuple( repository_components_tuple )
- # Skip listing a repository dependency if it is required only to compile a tool dependency defined for the dependent repository since
- # in this case, the repository dependency is really a dependency of the dependent repository's contained tool dependency, and only if
- # that tool dependency requires compilation.
+ # Skip listing a repository dependency if it is required only to compile a tool dependency
+ # defined for the dependent repository since in this case, the repository dependency is really
+ # a dependency of the dependent repository's contained tool dependency, and only if that
+ # tool dependency requires compilation.
# For backward compatibility to the 12/20/12 Galaxy release.
prior_installation_required = 'False'
only_if_compiling_contained_td = 'False'
@@ -388,8 +410,8 @@
only_if_compiling_contained_td = components_list[ 5 ]
except:
only_if_compiling_contained_td = 'False'
- # Skip listing a repository dependency if it is required only to compile a tool dependency defined for the dependent repository
- # (see above comment).
+ # Skip listing a repository dependency if it is required only to compile a tool dependency
+ # defined for the dependent repository (see above comment).
if not util.asbool( only_if_compiling_contained_td ):
if components_list not in required_repository_tups:
required_repository_tups.append( components_list )
diff -r b1b8acdf8c7268dfded0a358acfe31308196381a -r f1a13b9f2c3eb89dd28a8bbcc20fd929d39dcb65 lib/tool_shed/util/repository_dependency_util.py
--- a/lib/tool_shed/util/repository_dependency_util.py
+++ b/lib/tool_shed/util/repository_dependency_util.py
@@ -99,34 +99,37 @@
def create_repository_dependency_objects( trans, tool_path, tool_shed_url, repo_info_dicts, install_repository_dependencies=False,
no_changes_checked=False, tool_panel_section_id=None, new_tool_panel_section_label=None ):
"""
- Discover all repository dependencies and make sure all tool_shed_repository and associated repository_dependency records exist as well as
- the dependency relationships between installed repositories. This method is called when uninstalled repositories are being reinstalled.
- If the user elected to install repository dependencies, all items in the all_repo_info_dicts list will be processed. However, if repository
- dependencies are not to be installed, only those items contained in the received repo_info_dicts list will be processed.
+ Discover all repository dependencies and make sure all tool_shed_repository and associated repository_dependency
+ records exist as well as the dependency relationships between installed repositories. This method is called when
+ uninstalled repositories are being reinstalled. If the user elected to install repository dependencies, all items
+ in the all_repo_info_dicts list will be processed. However, if repository dependencies are not to be installed,
+ only those items contained in the received repo_info_dicts list will be processed.
"""
log.debug( "Creating repository dependency objects..." )
- # The following list will be maintained within this method to contain all created or updated tool shed repositories, including repository
- # dependencies that may not be installed.
+ # The following list will be maintained within this method to contain all created or updated tool shed repositories,
+ # including repository dependencies that may not be installed.
all_created_or_updated_tool_shed_repositories = []
- # There will be a one-to-one mapping between items in 3 lists: created_or_updated_tool_shed_repositories, tool_panel_section_keys and
- # filtered_repo_info_dicts. The 3 lists will filter out repository dependencies that are not to be installed.
+ # There will be a one-to-one mapping between items in 3 lists: created_or_updated_tool_shed_repositories,
+ # tool_panel_section_keys and filtered_repo_info_dicts. The 3 lists will filter out repository dependencies
+ # that are not to be installed.
created_or_updated_tool_shed_repositories = []
tool_panel_section_keys = []
- # Repositories will be filtered (e.g., if already installed, if elected to not be installed, etc), so filter the associated repo_info_dicts
- # accordingly.
+ # Repositories will be filtered (e.g., if already installed, if elected to not be installed, etc), so filter
+ # the associated repo_info_dicts accordingly.
filtered_repo_info_dicts = []
- # Discover all repository dependencies and retrieve information for installing them. Even if the user elected to not install repository
- # dependencies we have to make sure all repository dependency objects exist so that the appropriate repository dependency relationships can
- # be built.
+ # Discover all repository dependencies and retrieve information for installing them. Even if the user elected
+ # to not install repository dependencies we have to make sure all repository dependency objects exist so that
+ # the appropriate repository dependency relationships can be built.
all_required_repo_info_dict = common_install_util.get_required_repo_info_dicts( trans, tool_shed_url, repo_info_dicts )
all_repo_info_dicts = all_required_repo_info_dict.get( 'all_repo_info_dicts', [] )
if not all_repo_info_dicts:
# No repository dependencies were discovered so process the received repositories.
all_repo_info_dicts = [ rid for rid in repo_info_dicts ]
for repo_info_dict in all_repo_info_dicts:
- # If the user elected to install repository dependencies, all items in the all_repo_info_dicts list will be processed. However, if
- # repository dependencies are not to be installed, only those items contained in the received repo_info_dicts list will be processed
- # but the the all_repo_info_dicts list will be used to create all defined repository dependency relationships.
+ # If the user elected to install repository dependencies, all items in the all_repo_info_dicts list will
+ # be processed. However, if repository dependencies are not to be installed, only those items contained
+ # in the received repo_info_dicts list will be processed but the the all_repo_info_dicts list will be used
+ # to create all defined repository dependency relationships.
if is_in_repo_info_dicts( repo_info_dict, repo_info_dicts ) or install_repository_dependencies:
for name, repo_info_tuple in repo_info_dict.items():
can_update_db_record = False
@@ -196,7 +199,7 @@
suc.create_or_update_tool_shed_repository( app=trans.app,
name=name,
description=description,
- installed_changeset_revision=changeset_revision,
+ installed_changeset_revision=installed_changeset_revision,
ctx_rev=ctx_rev,
repository_clone_url=repository_clone_url,
metadata_dict={},
https://bitbucket.org/galaxy/galaxy-central/commits/27f8a2d9c711/
Changeset: 27f8a2d9c711
User: davebgx
Date: 2014-03-04 23:03:11
Summary: Merge stable.
Affected #: 0 files
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/88778c84ab7b/
Changeset: 88778c84ab7b
User: greg
Date: 2014-03-04 23:01:51
Summary: Fix for white ghost scenario discovery.
Affected #: 2 files
diff -r 36fa1ad1fc17939b68d10339a7cead7d21803a11 -r 88778c84ab7b91e0ed9a78812dafb8bb0958a3e4 lib/tool_shed/util/common_install_util.py
--- a/lib/tool_shed/util/common_install_util.py
+++ b/lib/tool_shed/util/common_install_util.py
@@ -1,3 +1,4 @@
+import copy
import logging
import os
import urllib
@@ -71,8 +72,8 @@
def get_dependencies_for_repository( trans, tool_shed_url, repo_info_dict, includes_tool_dependencies ):
"""
- Return dictionaries containing the sets of installed and missing tool dependencies and repository dependencies associated
- with the repository defined by the received repo_info_dict.
+ Return dictionaries containing the sets of installed and missing tool dependencies and repository
+ dependencies associated with the repository defined by the received repo_info_dict.
"""
repository = None
installed_rd = {}
@@ -86,15 +87,20 @@
if tool_dependencies:
if not includes_tool_dependencies:
includes_tool_dependencies = True
- # Inspect the tool_dependencies dictionary to separate the installed and missing tool dependencies. We don't add to installed_td
- # and missing_td here because at this point they are empty.
- installed_td, missing_td = get_installed_and_missing_tool_dependencies_for_installing_repository( trans, tool_shed_url, tool_dependencies )
- # In cases where a repository dependency is required only for compiling a dependent repository's tool dependency, the value of
- # repository_dependencies will be an empty dictionary here.
+ # Inspect the tool_dependencies dictionary to separate the installed and missing tool dependencies.
+ # We don't add to installed_td and missing_td here because at this point they are empty.
+ installed_td, missing_td = \
+ get_installed_and_missing_tool_dependencies_for_installing_repository( trans, tool_shed_url, tool_dependencies )
+ # In cases where a repository dependency is required only for compiling a dependent repository's
+ # tool dependency, the value of repository_dependencies will be an empty dictionary here.
if repository_dependencies:
# We have a repository with one or more defined repository dependencies.
if not repository:
- repository = suc.get_repository_for_dependency_relationship( trans.app, tool_shed_url, name, repository_owner, changeset_revision )
+ repository = suc.get_repository_for_dependency_relationship( trans.app,
+ tool_shed_url,
+ name,
+ repository_owner,
+ changeset_revision )
if repository and repository.metadata:
installed_rd, missing_rd = get_installed_and_missing_repository_dependencies( trans, repository )
else:
@@ -309,18 +315,26 @@
installed_tool_dependencies = {}
missing_tool_dependencies = {}
if tool_dependencies_dict:
- for td_key, val in tool_dependencies_dict.items():
+ # Make sure not to change anything in the received tool_dependencies_dict as that would be a bad side-effect!
+ tmp_tool_dependencies_dict = copy.deepcopy( tool_dependencies_dict )
+ for td_key, val in tmp_tool_dependencies_dict.items():
# Default the status to NEVER_INSTALLED.
tool_dependency_status = trans.install_model.ToolDependency.installation_status.NEVER_INSTALLED
# Set environment tool dependencies are a list.
if td_key == 'set_environment':
new_val = []
for requirement_dict in val:
- # {'repository_name': 'xx', 'name': 'bwa', 'version': '0.5.9', 'repository_owner': 'yy', 'changeset_revision': 'zz', 'type': 'package'}
- tool_dependency = tool_dependency_util.get_tool_dependency_by_name_version_type( trans.app,
- requirement_dict.get( 'name', None ),
- requirement_dict.get( 'version', None ),
- requirement_dict.get( 'type', 'package' ) )
+ # {'repository_name': 'xx',
+ # 'name': 'bwa',
+ # 'version': '0.5.9',
+ # 'repository_owner': 'yy',
+ # 'changeset_revision': 'zz',
+ # 'type': 'package'}
+ tool_dependency = \
+ tool_dependency_util.get_tool_dependency_by_name_version_type( trans.app,
+ requirement_dict.get( 'name', None ),
+ requirement_dict.get( 'version', None ),
+ requirement_dict.get( 'type', 'package' ) )
if tool_dependency:
tool_dependency_status = tool_dependency.status
requirement_dict[ 'status' ] = tool_dependency_status
@@ -331,7 +345,12 @@
missing_tool_dependencies[ td_key ] = new_val
else:
# The val dictionary looks something like this:
- # {'repository_name': 'xx', 'name': 'bwa', 'version': '0.5.9', 'repository_owner': 'yy', 'changeset_revision': 'zz', 'type': 'package'}
+ # {'repository_name': 'xx',
+ # 'name': 'bwa',
+ # 'version': '0.5.9',
+ # 'repository_owner': 'yy',
+ # 'changeset_revision': 'zz',
+ # 'type': 'package'}
tool_dependency = tool_dependency_util.get_tool_dependency_by_name_version_type( trans.app,
val.get( 'name', None ),
val.get( 'version', None ),
@@ -347,14 +366,16 @@
def get_required_repo_info_dicts( trans, tool_shed_url, repo_info_dicts ):
"""
- Inspect the list of repo_info_dicts for repository dependencies and append a repo_info_dict for each of them to the list. All
- repository_dependencies entries in each of the received repo_info_dicts includes all required repositories, so only one pass through
- this method is required to retrieve all repository dependencies.
+ Inspect the list of repo_info_dicts for repository dependencies and append a repo_info_dict for each of
+ them to the list. All repository_dependencies entries in each of the received repo_info_dicts includes
+ all required repositories, so only one pass through this method is required to retrieve all repository
+ dependencies.
"""
all_required_repo_info_dict = {}
all_repo_info_dicts = []
if repo_info_dicts:
- # We'll send tuples of ( tool_shed, repository_name, repository_owner, changeset_revision ) to the tool shed to discover repository ids.
+ # We'll send tuples of ( tool_shed, repository_name, repository_owner, changeset_revision ) to the tool
+ # shed to discover repository ids.
required_repository_tups = []
for repo_info_dict in repo_info_dicts:
if repo_info_dict not in all_repo_info_dicts:
@@ -368,9 +389,10 @@
continue
repository_components_tuple = container_util.get_components_from_key( key )
components_list = suc.extract_components_from_tuple( repository_components_tuple )
- # Skip listing a repository dependency if it is required only to compile a tool dependency defined for the dependent repository since
- # in this case, the repository dependency is really a dependency of the dependent repository's contained tool dependency, and only if
- # that tool dependency requires compilation.
+ # Skip listing a repository dependency if it is required only to compile a tool dependency
+ # defined for the dependent repository since in this case, the repository dependency is really
+ # a dependency of the dependent repository's contained tool dependency, and only if that
+ # tool dependency requires compilation.
# For backward compatibility to the 12/20/12 Galaxy release.
prior_installation_required = 'False'
only_if_compiling_contained_td = 'False'
@@ -388,8 +410,8 @@
only_if_compiling_contained_td = components_list[ 5 ]
except:
only_if_compiling_contained_td = 'False'
- # Skip listing a repository dependency if it is required only to compile a tool dependency defined for the dependent repository
- # (see above comment).
+ # Skip listing a repository dependency if it is required only to compile a tool dependency
+ # defined for the dependent repository (see above comment).
if not util.asbool( only_if_compiling_contained_td ):
if components_list not in required_repository_tups:
required_repository_tups.append( components_list )
diff -r 36fa1ad1fc17939b68d10339a7cead7d21803a11 -r 88778c84ab7b91e0ed9a78812dafb8bb0958a3e4 lib/tool_shed/util/repository_dependency_util.py
--- a/lib/tool_shed/util/repository_dependency_util.py
+++ b/lib/tool_shed/util/repository_dependency_util.py
@@ -99,34 +99,37 @@
def create_repository_dependency_objects( trans, tool_path, tool_shed_url, repo_info_dicts, install_repository_dependencies=False,
no_changes_checked=False, tool_panel_section_id=None, new_tool_panel_section_label=None ):
"""
- Discover all repository dependencies and make sure all tool_shed_repository and associated repository_dependency records exist as well as
- the dependency relationships between installed repositories. This method is called when uninstalled repositories are being reinstalled.
- If the user elected to install repository dependencies, all items in the all_repo_info_dicts list will be processed. However, if repository
- dependencies are not to be installed, only those items contained in the received repo_info_dicts list will be processed.
+ Discover all repository dependencies and make sure all tool_shed_repository and associated repository_dependency
+ records exist as well as the dependency relationships between installed repositories. This method is called when
+ uninstalled repositories are being reinstalled. If the user elected to install repository dependencies, all items
+ in the all_repo_info_dicts list will be processed. However, if repository dependencies are not to be installed,
+ only those items contained in the received repo_info_dicts list will be processed.
"""
log.debug( "Creating repository dependency objects..." )
- # The following list will be maintained within this method to contain all created or updated tool shed repositories, including repository
- # dependencies that may not be installed.
+ # The following list will be maintained within this method to contain all created or updated tool shed repositories,
+ # including repository dependencies that may not be installed.
all_created_or_updated_tool_shed_repositories = []
- # There will be a one-to-one mapping between items in 3 lists: created_or_updated_tool_shed_repositories, tool_panel_section_keys and
- # filtered_repo_info_dicts. The 3 lists will filter out repository dependencies that are not to be installed.
+ # There will be a one-to-one mapping between items in 3 lists: created_or_updated_tool_shed_repositories,
+ # tool_panel_section_keys and filtered_repo_info_dicts. The 3 lists will filter out repository dependencies
+ # that are not to be installed.
created_or_updated_tool_shed_repositories = []
tool_panel_section_keys = []
- # Repositories will be filtered (e.g., if already installed, if elected to not be installed, etc), so filter the associated repo_info_dicts
- # accordingly.
+ # Repositories will be filtered (e.g., if already installed, if elected to not be installed, etc), so filter
+ # the associated repo_info_dicts accordingly.
filtered_repo_info_dicts = []
- # Discover all repository dependencies and retrieve information for installing them. Even if the user elected to not install repository
- # dependencies we have to make sure all repository dependency objects exist so that the appropriate repository dependency relationships can
- # be built.
+ # Discover all repository dependencies and retrieve information for installing them. Even if the user elected
+ # to not install repository dependencies we have to make sure all repository dependency objects exist so that
+ # the appropriate repository dependency relationships can be built.
all_required_repo_info_dict = common_install_util.get_required_repo_info_dicts( trans, tool_shed_url, repo_info_dicts )
all_repo_info_dicts = all_required_repo_info_dict.get( 'all_repo_info_dicts', [] )
if not all_repo_info_dicts:
# No repository dependencies were discovered so process the received repositories.
all_repo_info_dicts = [ rid for rid in repo_info_dicts ]
for repo_info_dict in all_repo_info_dicts:
- # If the user elected to install repository dependencies, all items in the all_repo_info_dicts list will be processed. However, if
- # repository dependencies are not to be installed, only those items contained in the received repo_info_dicts list will be processed
- # but the the all_repo_info_dicts list will be used to create all defined repository dependency relationships.
+ # If the user elected to install repository dependencies, all items in the all_repo_info_dicts list will
+ # be processed. However, if repository dependencies are not to be installed, only those items contained
+ # in the received repo_info_dicts list will be processed but the the all_repo_info_dicts list will be used
+ # to create all defined repository dependency relationships.
if is_in_repo_info_dicts( repo_info_dict, repo_info_dicts ) or install_repository_dependencies:
for name, repo_info_tuple in repo_info_dict.items():
can_update_db_record = False
@@ -196,7 +199,7 @@
suc.create_or_update_tool_shed_repository( app=trans.app,
name=name,
description=description,
- installed_changeset_revision=changeset_revision,
+ installed_changeset_revision=installed_changeset_revision,
ctx_rev=ctx_rev,
repository_clone_url=repository_clone_url,
metadata_dict={},
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/c8b0a7759ef6/
Changeset: c8b0a7759ef6
User: davebgx
Date: 2014-03-04 17:30:07
Summary: Fix for env.sh files being prematurely truncated in some environments.
Affected #: 1 file
diff -r e826721ef957d2d331331663153a509bb6f0ebed -r c8b0a7759ef65205df26a8b685cbb64d32ce3cc4 lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
@@ -211,7 +211,7 @@
if os.path.exists( file_path ):
try:
new_env_file_contents = []
- env_file_contents = file( file_path, 'a+' ).readlines()
+ env_file_contents = file( file_path, 'r' ).readlines()
# Clean out blank lines from the env.sh file.
for line in env_file_contents:
line = line.rstrip()
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/a59ce5d9dd54/
Changeset: a59ce5d9dd54
User: carlfeberhard
Date: 2014-03-04 17:20:17
Summary: Fix to tag_autocomplete_data when q is default (None)
Affected #: 1 file
diff -r ed9228eb4c05ffba9c4c4dd9b496596c5725d306 -r a59ce5d9dd54eb2e2c7145c149aea7f92cb04d8b lib/galaxy/webapps/galaxy/controllers/tag.py
--- a/lib/galaxy/webapps/galaxy/controllers/tag.py
+++ b/lib/galaxy/webapps/galaxy/controllers/tag.py
@@ -89,6 +89,7 @@
item = self._get_item( trans, item_class, trans.security.decode_id( item_id ) )
user = trans.user
item_class = self.get_class( item_class )
+ q = '' if q is None else q
q = q.encode( 'utf-8' )
if q.find( ":" ) == -1:
return self._get_tag_autocomplete_names( trans, q, limit, timestamp, user, item, item_class )
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.