4 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/ec3b5956130f/
changeset: ec3b5956130f
user: jmchilton
date: 2012-10-31 18:18:55
summary: Fix small bug in exception handler in lib/galaxy/jobs/handler.py. The bug was preventing exceptions in dynamic job runner methods from being percolated up into the logs.
affected #: 1 file
diff -r 4ceab232dc02a5a99eca0b24c0038c490d49a392 -r ec3b5956130f767d6f5d9c07c6a64dafd128351f lib/galaxy/jobs/handler.py
--- a/lib/galaxy/jobs/handler.py
+++ b/lib/galaxy/jobs/handler.py
@@ -397,6 +397,11 @@
def put( self, job_wrapper ):
try:
runner_name = self.__get_runner_name( job_wrapper )
+ except Exception:
+ log.exception( 'Failed to generate job runner name' )
+ job_wrapper.fail( 'Unable to run job due to a misconfiguration of the Galaxy job running system. Please contact a site administrator.' )
+ return
+ try:
if self.app.config.use_tasked_jobs and job_wrapper.tool.parallelism is not None and isinstance(job_wrapper, TaskWrapper):
#DBTODO Refactor
log.debug( "dispatching task %s, of job %d, to %s runner" %( job_wrapper.task_id, job_wrapper.job_id, runner_name ) )
https://bitbucket.org/galaxy/galaxy-central/changeset/0206d3a8a4d0/
changeset: 0206d3a8a4d0
user: jmchilton
date: 2012-10-31 21:04:33
summary: Allow dynamic job runner rules to pass error messages back to users via job failure message. To do this simply raise galaxy.jobs.mapper.JobMappingException(user_messsage) from a rule method where user_message is the desired message.
affected #: 2 files
diff -r ec3b5956130f767d6f5d9c07c6a64dafd128351f -r 0206d3a8a4d03b2447ab1ef09cd2a2015ce4c3ae lib/galaxy/jobs/handler.py
--- a/lib/galaxy/jobs/handler.py
+++ b/lib/galaxy/jobs/handler.py
@@ -17,6 +17,7 @@
# States for running a job. These are NOT the same as data states
JOB_WAIT, JOB_ERROR, JOB_INPUT_ERROR, JOB_INPUT_DELETED, JOB_READY, JOB_DELETED, JOB_ADMIN_DELETED = 'wait', 'error', 'input_error', 'input_deleted', 'ready', 'deleted', 'admin_deleted'
+DEFAULT_JOB_PUT_FAILURE_MESSAGE = 'Unable to run job due to a misconfiguration of the Galaxy job running system. Please contact a site administrator.'
class JobHandler( object ):
"""
@@ -41,6 +42,7 @@
a JobRunner.
"""
STOP_SIGNAL = object()
+
def __init__( self, app, dispatcher ):
"""Start the job manager"""
self.app = app
@@ -397,9 +399,13 @@
def put( self, job_wrapper ):
try:
runner_name = self.__get_runner_name( job_wrapper )
- except Exception:
- log.exception( 'Failed to generate job runner name' )
- job_wrapper.fail( 'Unable to run job due to a misconfiguration of the Galaxy job running system. Please contact a site administrator.' )
+ except Exception, e:
+ failure_message = getattr(e, 'failure_message', DEFAULT_JOB_PUT_FAILURE_MESSAGE )
+ if failure_message == DEFAULT_JOB_PUT_FAILURE_MESSAGE:
+ log.exception( 'Failed to generate job runner name' )
+ else:
+ log.debug( "Intentionally failing job with message (%s)" % failure_message )
+ job_wrapper.fail( failure_message )
return
try:
if self.app.config.use_tasked_jobs and job_wrapper.tool.parallelism is not None and isinstance(job_wrapper, TaskWrapper):
@@ -410,7 +416,7 @@
self.job_runners[runner_name].put( job_wrapper )
except KeyError:
log.error( 'put(): (%s) Invalid job runner: %s' % ( job_wrapper.job_id, runner_name ) )
- job_wrapper.fail( 'Unable to run job due to a misconfiguration of the Galaxy job running system. Please contact a site administrator.' )
+ job_wrapper.fail( DEFAULT_JOB_PUT_FAILURE_MESSAGE )
def stop( self, job ):
"""
@@ -452,7 +458,7 @@
self.job_runners[runner_name].recover( job, job_wrapper )
except KeyError:
log.error( 'recover(): (%s) Invalid job runner: %s' % ( job_wrapper.job_id, runner_name ) )
- job_wrapper.fail( 'Unable to run job due to a misconfiguration of the Galaxy job running system. Please contact a site administrator.' )
+ job_wrapper.fail( DEFAULT_JOB_PUT_FAILURE_MESSAGE )
def shutdown( self ):
for runner in self.job_runners.itervalues():
diff -r ec3b5956130f767d6f5d9c07c6a64dafd128351f -r 0206d3a8a4d03b2447ab1ef09cd2a2015ce4c3ae lib/galaxy/jobs/mapper.py
--- a/lib/galaxy/jobs/mapper.py
+++ b/lib/galaxy/jobs/mapper.py
@@ -8,6 +8,12 @@
DYNAMIC_RUNNER_PREFIX = "dynamic:///"
+class JobMappingException( Exception ):
+
+ def __init__( self, failure_message ):
+ self.failure_message = failure_message
+
+
class JobRunnerMapper( object ):
"""
This class is responsible to managing the mapping of jobs
https://bitbucket.org/galaxy/galaxy-central/changeset/6f3b4e88fc21/
changeset: 6f3b4e88fc21
user: jmchilton
date: 2012-11-15 05:23:19
summary: Merge latest galaxy-central to resolve conflict introdcued with 73e05bc.
affected #: 227 files
Diff too large to display.
https://bitbucket.org/galaxy/galaxy-central/changeset/f03725b8272b/
changeset: f03725b8272b
user: natefoo
date: 2012-11-26 19:36:09
summary: Merged in jmchilton/galaxy-central-dynamic-job-runner-enhancements (pull request #82)
affected #: 2 files
diff -r d0e7bd064cf9a2b991f793c1dc7720430906174f -r f03725b8272bd13aa3fc693b9fcb20d2f0f4c28f lib/galaxy/jobs/handler.py
--- a/lib/galaxy/jobs/handler.py
+++ b/lib/galaxy/jobs/handler.py
@@ -17,6 +17,7 @@
# States for running a job. These are NOT the same as data states
JOB_WAIT, JOB_ERROR, JOB_INPUT_ERROR, JOB_INPUT_DELETED, JOB_READY, JOB_DELETED, JOB_ADMIN_DELETED, JOB_USER_OVER_QUOTA = 'wait', 'error', 'input_error', 'input_deleted', 'ready', 'deleted', 'admin_deleted', 'user_over_quota'
+DEFAULT_JOB_PUT_FAILURE_MESSAGE = 'Unable to run job due to a misconfiguration of the Galaxy job running system. Please contact a site administrator.'
class JobHandler( object ):
"""
@@ -41,6 +42,7 @@
a JobRunner.
"""
STOP_SIGNAL = object()
+
def __init__( self, app, dispatcher ):
"""Start the job manager"""
self.app = app
@@ -462,6 +464,15 @@
def put( self, job_wrapper ):
try:
runner_name = self.__get_runner_name( job_wrapper )
+ except Exception, e:
+ failure_message = getattr(e, 'failure_message', DEFAULT_JOB_PUT_FAILURE_MESSAGE )
+ if failure_message == DEFAULT_JOB_PUT_FAILURE_MESSAGE:
+ log.exception( 'Failed to generate job runner name' )
+ else:
+ log.debug( "Intentionally failing job with message (%s)" % failure_message )
+ job_wrapper.fail( failure_message )
+ return
+ try:
if self.app.config.use_tasked_jobs and job_wrapper.tool.parallelism is not None and isinstance(job_wrapper, TaskWrapper):
#DBTODO Refactor
log.debug( "dispatching task %s, of job %d, to %s runner" %( job_wrapper.task_id, job_wrapper.job_id, runner_name ) )
@@ -470,7 +481,7 @@
self.job_runners[runner_name].put( job_wrapper )
except KeyError:
log.error( 'put(): (%s) Invalid job runner: %s' % ( job_wrapper.job_id, runner_name ) )
- job_wrapper.fail( 'Unable to run job due to a misconfiguration of the Galaxy job running system. Please contact a site administrator.' )
+ job_wrapper.fail( DEFAULT_JOB_PUT_FAILURE_MESSAGE )
def stop( self, job ):
"""
@@ -512,7 +523,7 @@
self.job_runners[runner_name].recover( job, job_wrapper )
except KeyError:
log.error( 'recover(): (%s) Invalid job runner: %s' % ( job_wrapper.job_id, runner_name ) )
- job_wrapper.fail( 'Unable to run job due to a misconfiguration of the Galaxy job running system. Please contact a site administrator.' )
+ job_wrapper.fail( DEFAULT_JOB_PUT_FAILURE_MESSAGE )
def shutdown( self ):
for runner in self.job_runners.itervalues():
diff -r d0e7bd064cf9a2b991f793c1dc7720430906174f -r f03725b8272bd13aa3fc693b9fcb20d2f0f4c28f lib/galaxy/jobs/mapper.py
--- a/lib/galaxy/jobs/mapper.py
+++ b/lib/galaxy/jobs/mapper.py
@@ -8,6 +8,12 @@
DYNAMIC_RUNNER_PREFIX = "dynamic:///"
+class JobMappingException( Exception ):
+
+ def __init__( self, failure_message ):
+ self.failure_message = failure_message
+
+
class JobRunnerMapper( object ):
"""
This class is responsible to managing the mapping of jobs
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/changeset/d0e7bd064cf9/
changeset: d0e7bd064cf9
user: greg
date: 2012-11-26 18:09:23
summary: Don't allow reviewing empty repositories in the tool shed.
affected #: 3 files
diff -r 593c0d6c3d447aaa79c61fea2688b6091b44dda5 -r d0e7bd064cf9a2b991f793c1dc7720430906174f templates/webapps/community/repository/manage_repository.mako
--- a/templates/webapps/community/repository/manage_repository.mako
+++ b/templates/webapps/community/repository/manage_repository.mako
@@ -21,7 +21,7 @@
can_undeprecate = trans.user and ( is_admin or repository.user == trans.user ) and is_deprecated
can_reset_all_metadata = not is_deprecated and is_admin and len( repo ) > 0
has_readme = metadata and 'readme' in metadata
- can_review_repository = not is_deprecated and trans.app.security_agent.user_can_review_repositories( trans.user )
+ can_review_repository = not is_new and not is_deprecated and trans.app.security_agent.user_can_review_repositories( trans.user )
reviewing_repository = cntrller and cntrller == 'repository_review'
if can_push:
diff -r 593c0d6c3d447aaa79c61fea2688b6091b44dda5 -r d0e7bd064cf9a2b991f793c1dc7720430906174f templates/webapps/community/repository/view_repository.mako
--- a/templates/webapps/community/repository/view_repository.mako
+++ b/templates/webapps/community/repository/view_repository.mako
@@ -20,7 +20,7 @@
browse_label = 'Browse repository tip files'
has_readme = metadata and 'readme' in metadata
reviewing_repository = cntrller and cntrller == 'repository_review'
- can_review_repository = not is_deprecated and trans.app.security_agent.user_can_review_repositories( trans.user )
+ can_review_repository = not is_new and not is_deprecated and trans.app.security_agent.user_can_review_repositories( trans.user )
%><%!
diff -r 593c0d6c3d447aaa79c61fea2688b6091b44dda5 -r d0e7bd064cf9a2b991f793c1dc7720430906174f templates/webapps/community/repository/view_tool_metadata.mako
--- a/templates/webapps/community/repository/view_tool_metadata.mako
+++ b/templates/webapps/community/repository/view_tool_metadata.mako
@@ -8,6 +8,7 @@
from urllib import quote_plus
is_admin = trans.user_is_admin()
is_new = repository.is_new( trans.app )
+ is_deprecated = repository.deprecated
can_contact_owner = trans.user and trans.user != repository.user
can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
can_upload = can_push
@@ -21,7 +22,7 @@
else:
browse_label = 'Browse repository tip files'
has_readme = metadata and 'readme' in metadata
- can_review_repository = trans.app.security_agent.user_can_review_repositories( trans.user )
+ can_review_repository = not is_new and not is_deprecated and trans.app.security_agent.user_can_review_repositories( trans.user )
%><%!
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/changeset/a627f341d01a/
changeset: a627f341d01a
user: inithello
date: 2012-11-26 16:20:38
summary: Removed lastz and bowtie from tool_conf.xml.main
affected #: 1 file
diff -r 87828175dfe7475aa846f383a5038e5ca4f1e312 -r a627f341d01ae4a9741164981ff2e5300353354f tool_conf.xml.main
--- a/tool_conf.xml.main
+++ b/tool_conf.xml.main
@@ -259,13 +259,10 @@
</section><section name="NGS: Mapping" id="ngs_mapping"><label text="Illumina" id="illumina"/>
- <tool file="sr_mapping/bowtie_wrapper.xml" /><label text="Roche-454" id="roche_454"/>
- <tool file="sr_mapping/lastz_wrapper.xml" /><tool file="metag_tools/megablast_wrapper.xml" /><tool file="metag_tools/megablast_xml_parser.xml" /><label text="AB-SOLiD" id="ab_solid"/>
- <tool file="sr_mapping/bowtie_color_wrapper.xml" /></section><section name="NGS: SAM Tools" id="samtools"><tool file="samtools/sam_bitwise_flag_filter.xml" />
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/changeset/87828175dfe7/
changeset: 87828175dfe7
user: inithello
date: 2012-11-26 16:18:47
summary: Migrated lastz and bowtie tools to the tool shed. Added a target_file feature to the tool dependency installation process.
affected #: 54 files
Diff too large to display.
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.