1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/1e7fd56c683c/
Changeset: 1e7fd56c683c
User: jmchilton
Date: 2013-11-12 18:56:54
Summary: Fix bug preventing use of data tools inside of conditionals via API.
Affected #: 1 file
diff -r b419cadc12831a2071912d40d1d10413801bf64c -r 1e7fd56c683c9d59784d62e642b1d430edf7e989 lib/galaxy/tools/parameters/grouping.py
--- a/lib/galaxy/tools/parameters/grouping.py
+++ b/lib/galaxy/tools/parameters/grouping.py
@@ -493,7 +493,7 @@
rval = {}
# Get the default value for the 'test element' and use it
# to determine the current case
- test_value = self.test_param.get_initial_value( trans, context, history=None )
+ test_value = self.test_param.get_initial_value( trans, context, history=history )
current_case = self.get_current_case( test_value, trans )
# Store the current case in a special value
rval['__current_case__'] = current_case
@@ -502,7 +502,7 @@
# Fill in state for selected case
child_context = ExpressionContext( rval, context )
for child_input in self.cases[current_case].inputs.itervalues():
- rval[ child_input.name ] = child_input.get_initial_value( trans, child_context, history=None )
+ rval[ child_input.name ] = child_input.get_initial_value( trans, child_context, history=history )
return rval
class ConditionalWhen( object ):
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.
3 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/98a10ba60640/
Changeset: 98a10ba60640
Branch: stable
User: jmchilton
Date: 2013-11-12 17:51:35
Summary: "Fix" GALAXY_SLOTS for SLURM.
Your results with slurm may vary and depending how you allocate things you may want to modify this statement.
Affected #: 1 file
diff -r 00d8ec60fdc02d3918b6896cf4a8d0cee27f350c -r 98a10ba60640eabb7604778a87937aa17e30f73b lib/galaxy/jobs/runners/util/job_script/CLUSTER_SLOTS_STATEMENT.sh
--- a/lib/galaxy/jobs/runners/util/job_script/CLUSTER_SLOTS_STATEMENT.sh
+++ b/lib/galaxy/jobs/runners/util/job_script/CLUSTER_SLOTS_STATEMENT.sh
@@ -1,6 +1,9 @@
export GALAXY_SLOTS_CONFIGURED="1"
-if [ -n "$SLURM_JOB_NUM_NODES" ]; then
- GALAXY_SLOTS="$SLURM_JOB_NUM_NODES"
+if [ -n "$SLURM_NTASKS" ]; then
+ # May want to multiply this by ${SLURM_CPUS_PER_TASK:-1}.
+ # SLURM_NTASKS is total tasks over all nodes so this is
+ # shouldn't be used for multi-node requests.
+ GALAXY_SLOTS="$SLURM_NTASKS"
elif [ -n "$NSLOTS" ]; then
GALAXY_SLOTS="$NSLOTS"
elif [ -f "$PBS_NODEFILE" ]; then
https://bitbucket.org/galaxy/galaxy-central/commits/4dbb6209fe78/
Changeset: 4dbb6209fe78
User: jmchilton
Date: 2013-11-12 17:54:26
Summary: Merge latest stable.
Affected #: 1 file
diff -r 5e4174bee7de7e29eb6021b2097568a4c8f597b9 -r 4dbb6209fe789752bf0bb587350b024fe8d74e6c lib/galaxy/jobs/runners/util/job_script/CLUSTER_SLOTS_STATEMENT.sh
--- a/lib/galaxy/jobs/runners/util/job_script/CLUSTER_SLOTS_STATEMENT.sh
+++ b/lib/galaxy/jobs/runners/util/job_script/CLUSTER_SLOTS_STATEMENT.sh
@@ -1,6 +1,9 @@
export GALAXY_SLOTS_CONFIGURED="1"
-if [ -n "$SLURM_JOB_NUM_NODES" ]; then
- GALAXY_SLOTS="$SLURM_JOB_NUM_NODES"
+if [ -n "$SLURM_NTASKS" ]; then
+ # May want to multiply this by ${SLURM_CPUS_PER_TASK:-1}.
+ # SLURM_NTASKS is total tasks over all nodes so this is
+ # shouldn't be used for multi-node requests.
+ GALAXY_SLOTS="$SLURM_NTASKS"
elif [ -n "$NSLOTS" ]; then
GALAXY_SLOTS="$NSLOTS"
elif [ -f "$PBS_NODEFILE" ]; then
https://bitbucket.org/galaxy/galaxy-central/commits/b419cadc1283/
Changeset: b419cadc1283
User: jmchilton
Date: 2013-11-12 17:55:56
Summary: Automated merge.
Affected #: 1 file
diff -r 4dbb6209fe789752bf0bb587350b024fe8d74e6c -r b419cadc12831a2071912d40d1d10413801bf64c templates/webapps/galaxy/galaxy.masthead.mako
--- a/templates/webapps/galaxy/galaxy.masthead.mako
+++ b/templates/webapps/galaxy/galaxy.masthead.mako
@@ -72,38 +72,40 @@
$('<link href="' + galaxy_config.root + 'static/style/galaxy.frame.masthead.css" rel="stylesheet">').appendTo('head');
## load galaxy js-modules
- require(['galaxy.masthead', 'galaxy.menu', 'galaxy.modal', 'galaxy.frame', 'galaxy.upload'],
- function(mod_masthead, mod_menu, mod_modal, mod_frame, mod_upload)
- {
- ## check if masthead is available
- if (Galaxy.masthead)
- return;
+ $(function() {
+ require(['galaxy.masthead', 'galaxy.menu', 'galaxy.modal', 'galaxy.frame', 'galaxy.upload'],
+ function(mod_masthead, mod_menu, mod_modal, mod_frame, mod_upload)
+ {
+ ## check if masthead is available
+ if (Galaxy.masthead)
+ return;
- ## get configuration
- var masthead_config = ${ h.to_json_string( masthead_config ) };
+ ## get configuration
+ var masthead_config = ${ h.to_json_string( masthead_config ) };
- ## set up the quota meter (And fetch the current user data from trans)
- Galaxy.currUser = new User(masthead_config.user.json);
+ ## set up the quota meter (And fetch the current user data from trans)
+ Galaxy.currUser = new User(masthead_config.user.json);
- ## load global galaxy objects
- Galaxy.masthead = new mod_masthead.GalaxyMasthead(masthead_config);
- Galaxy.modal = new mod_modal.GalaxyModal();
- Galaxy.frame = new mod_frame.GalaxyFrame();
+ ## load global galaxy objects
+ Galaxy.masthead = new mod_masthead.GalaxyMasthead(masthead_config);
+ Galaxy.modal = new mod_modal.GalaxyModal();
+ Galaxy.frame = new mod_frame.GalaxyFrame();
- ## construct default menu options
- Galaxy.menu = new mod_menu.GalaxyMenu({
- masthead: Galaxy.masthead,
- config: masthead_config
+ ## construct default menu options
+ Galaxy.menu = new mod_menu.GalaxyMenu({
+ masthead: Galaxy.masthead,
+ config: masthead_config
+ });
+
+ ## add upload plugin
+ ##Galaxy.upload = new mod_upload.GalaxyUpload();
+
+ ## add quota meter to masthead
+ Galaxy.quotaMeter = new UserQuotaMeter({
+ model : Galaxy.currUser,
+ el : $(Galaxy.masthead.el).find('.quota-meter-container')
+ }).render();
});
-
- ## add upload plugin
- ##Galaxy.upload = new mod_upload.GalaxyUpload();
-
- ## add quota meter to masthead
- Galaxy.quotaMeter = new UserQuotaMeter({
- model : Galaxy.currUser,
- el : $(Galaxy.masthead.el).find('.quota-meter-container')
- }).render();
});
</script></%def>
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/efe68bbfec73/
Changeset: efe68bbfec73
User: guerler
Date: 2013-11-12 17:51:36
Summary: UI: Fix load order of masthead
Affected #: 1 file
diff -r 5e4174bee7de7e29eb6021b2097568a4c8f597b9 -r efe68bbfec73e8367314c7751cfe24d8c515b778 templates/webapps/galaxy/galaxy.masthead.mako
--- a/templates/webapps/galaxy/galaxy.masthead.mako
+++ b/templates/webapps/galaxy/galaxy.masthead.mako
@@ -72,38 +72,40 @@
$('<link href="' + galaxy_config.root + 'static/style/galaxy.frame.masthead.css" rel="stylesheet">').appendTo('head');
## load galaxy js-modules
- require(['galaxy.masthead', 'galaxy.menu', 'galaxy.modal', 'galaxy.frame', 'galaxy.upload'],
- function(mod_masthead, mod_menu, mod_modal, mod_frame, mod_upload)
- {
- ## check if masthead is available
- if (Galaxy.masthead)
- return;
+ $(function() {
+ require(['galaxy.masthead', 'galaxy.menu', 'galaxy.modal', 'galaxy.frame', 'galaxy.upload'],
+ function(mod_masthead, mod_menu, mod_modal, mod_frame, mod_upload)
+ {
+ ## check if masthead is available
+ if (Galaxy.masthead)
+ return;
- ## get configuration
- var masthead_config = ${ h.to_json_string( masthead_config ) };
+ ## get configuration
+ var masthead_config = ${ h.to_json_string( masthead_config ) };
- ## set up the quota meter (And fetch the current user data from trans)
- Galaxy.currUser = new User(masthead_config.user.json);
+ ## set up the quota meter (And fetch the current user data from trans)
+ Galaxy.currUser = new User(masthead_config.user.json);
- ## load global galaxy objects
- Galaxy.masthead = new mod_masthead.GalaxyMasthead(masthead_config);
- Galaxy.modal = new mod_modal.GalaxyModal();
- Galaxy.frame = new mod_frame.GalaxyFrame();
+ ## load global galaxy objects
+ Galaxy.masthead = new mod_masthead.GalaxyMasthead(masthead_config);
+ Galaxy.modal = new mod_modal.GalaxyModal();
+ Galaxy.frame = new mod_frame.GalaxyFrame();
- ## construct default menu options
- Galaxy.menu = new mod_menu.GalaxyMenu({
- masthead: Galaxy.masthead,
- config: masthead_config
+ ## construct default menu options
+ Galaxy.menu = new mod_menu.GalaxyMenu({
+ masthead: Galaxy.masthead,
+ config: masthead_config
+ });
+
+ ## add upload plugin
+ ##Galaxy.upload = new mod_upload.GalaxyUpload();
+
+ ## add quota meter to masthead
+ Galaxy.quotaMeter = new UserQuotaMeter({
+ model : Galaxy.currUser,
+ el : $(Galaxy.masthead.el).find('.quota-meter-container')
+ }).render();
});
-
- ## add upload plugin
- ##Galaxy.upload = new mod_upload.GalaxyUpload();
-
- ## add quota meter to masthead
- Galaxy.quotaMeter = new UserQuotaMeter({
- model : Galaxy.currUser,
- el : $(Galaxy.masthead.el).find('.quota-meter-container')
- }).render();
});
</script></%def>
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/00d8ec60fdc0/
Changeset: 00d8ec60fdc0
Branch: stable
User: carlfeberhard
Date: 2013-11-12 17:10:04
Summary: History grid: fix logic to prevent deleting/purging a shared history
Affected #: 1 file
diff -r 56b077b51694fba1dcb37044dc8f2c0ea8d8b9bf -r 00d8ec60fdc02d3918b6896cf4a8d0cee27f350c lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py
@@ -17,10 +17,12 @@
log = logging.getLogger( __name__ )
+
class NameColumn( grids.TextColumn ):
def get_value( self, trans, grid, history ):
return history.get_display_name()
+
class HistoryListGrid( grids.Grid ):
# Custom column types
@@ -303,32 +305,33 @@
if history.users_shared_with:
message_parts.append( "History (%s) has been shared with others, unshare it before deleting it. " % history.name )
status = ERROR
- elif not history.deleted:
- # We'll not eliminate any DefaultHistoryPermissions in case we undelete the history later
- history.deleted = True
- # If deleting the current history, make a new current.
- if history == trans.get_history():
- deleted_current = True
- trans.log_event( "History (%s) marked as deleted" % history.name )
- n_deleted += 1
- if purge and trans.app.config.allow_user_dataset_purge:
- for hda in history.datasets:
- if trans.user:
- trans.user.total_disk_usage -= hda.quota_amount( trans.user )
- hda.purged = True
- trans.sa_session.add( hda )
- trans.log_event( "HDA id %s has been purged" % hda.id )
- trans.sa_session.flush()
- if hda.dataset.user_can_purge:
- try:
- hda.dataset.full_delete()
- trans.log_event( "Dataset id %s has been purged upon the the purge of HDA id %s" % ( hda.dataset.id, hda.id ) )
- trans.sa_session.add( hda.dataset )
- except:
- log.exception( 'Unable to purge dataset (%s) on purge of hda (%s):' % ( hda.dataset.id, hda.id ) )
- history.purged = True
- self.sa_session.add( history )
- self.sa_session.flush()
+ else:
+ if not history.deleted:
+ # We'll not eliminate any DefaultHistoryPermissions in case we undelete the history later
+ history.deleted = True
+ # If deleting the current history, make a new current.
+ if history == trans.get_history():
+ deleted_current = True
+ trans.log_event( "History (%s) marked as deleted" % history.name )
+ n_deleted += 1
+ if purge and trans.app.config.allow_user_dataset_purge:
+ for hda in history.datasets:
+ if trans.user:
+ trans.user.total_disk_usage -= hda.quota_amount( trans.user )
+ hda.purged = True
+ trans.sa_session.add( hda )
+ trans.log_event( "HDA id %s has been purged" % hda.id )
+ trans.sa_session.flush()
+ if hda.dataset.user_can_purge:
+ try:
+ hda.dataset.full_delete()
+ trans.log_event( "Dataset id %s has been purged upon the the purge of HDA id %s" % ( hda.dataset.id, hda.id ) )
+ trans.sa_session.add( hda.dataset )
+ except:
+ log.exception( 'Unable to purge dataset (%s) on purge of hda (%s):' % ( hda.dataset.id, hda.id ) )
+ history.purged = True
+ self.sa_session.add( history )
+ self.sa_session.flush()
trans.sa_session.flush()
if n_deleted:
part = "Deleted %d %s" % ( n_deleted, iff( n_deleted != 1, "histories", "history" ) )
https://bitbucket.org/galaxy/galaxy-central/commits/5e4174bee7de/
Changeset: 5e4174bee7de
User: carlfeberhard
Date: 2013-11-12 17:11:01
Summary: Merge stable
Affected #: 1 file
diff -r 1479c52c26e2bbc1fa4b367d1e718be966f5eb63 -r 5e4174bee7de7e29eb6021b2097568a4c8f597b9 lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py
@@ -17,10 +17,12 @@
log = logging.getLogger( __name__ )
+
class NameColumn( grids.TextColumn ):
def get_value( self, trans, grid, history ):
return history.get_display_name()
+
class HistoryListGrid( grids.Grid ):
# Custom column types
@@ -303,32 +305,33 @@
if history.users_shared_with:
message_parts.append( "History (%s) has been shared with others, unshare it before deleting it. " % history.name )
status = ERROR
- elif not history.deleted:
- # We'll not eliminate any DefaultHistoryPermissions in case we undelete the history later
- history.deleted = True
- # If deleting the current history, make a new current.
- if history == trans.get_history():
- deleted_current = True
- trans.log_event( "History (%s) marked as deleted" % history.name )
- n_deleted += 1
- if purge and trans.app.config.allow_user_dataset_purge:
- for hda in history.datasets:
- if trans.user:
- trans.user.total_disk_usage -= hda.quota_amount( trans.user )
- hda.purged = True
- trans.sa_session.add( hda )
- trans.log_event( "HDA id %s has been purged" % hda.id )
- trans.sa_session.flush()
- if hda.dataset.user_can_purge:
- try:
- hda.dataset.full_delete()
- trans.log_event( "Dataset id %s has been purged upon the the purge of HDA id %s" % ( hda.dataset.id, hda.id ) )
- trans.sa_session.add( hda.dataset )
- except:
- log.exception( 'Unable to purge dataset (%s) on purge of hda (%s):' % ( hda.dataset.id, hda.id ) )
- history.purged = True
- self.sa_session.add( history )
- self.sa_session.flush()
+ else:
+ if not history.deleted:
+ # We'll not eliminate any DefaultHistoryPermissions in case we undelete the history later
+ history.deleted = True
+ # If deleting the current history, make a new current.
+ if history == trans.get_history():
+ deleted_current = True
+ trans.log_event( "History (%s) marked as deleted" % history.name )
+ n_deleted += 1
+ if purge and trans.app.config.allow_user_dataset_purge:
+ for hda in history.datasets:
+ if trans.user:
+ trans.user.total_disk_usage -= hda.quota_amount( trans.user )
+ hda.purged = True
+ trans.sa_session.add( hda )
+ trans.log_event( "HDA id %s has been purged" % hda.id )
+ trans.sa_session.flush()
+ if hda.dataset.user_can_purge:
+ try:
+ hda.dataset.full_delete()
+ trans.log_event( "Dataset id %s has been purged upon the the purge of HDA id %s" % ( hda.dataset.id, hda.id ) )
+ trans.sa_session.add( hda.dataset )
+ except:
+ log.exception( 'Unable to purge dataset (%s) on purge of hda (%s):' % ( hda.dataset.id, hda.id ) )
+ history.purged = True
+ self.sa_session.add( history )
+ self.sa_session.flush()
trans.sa_session.flush()
if n_deleted:
part = "Deleted %d %s" % ( n_deleted, iff( n_deleted != 1, "histories", "history" ) )
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/cd12bf2ed547/
Changeset: cd12bf2ed547
User: Dave Bouvier
Date: 2013-11-12 15:25:32
Summary: Add more informative logging for repository installation errors when installing and testing repositories. Limit uninstallation of tool dependencies in an error state to those that are displayed on the "Uninstall tool dependencies" page.
Affected #: 2 files
diff -r e12a10e5418d53c9440982ddc935e1b7d647bd07 -r cd12bf2ed5475c8c6ab72321e5865441c0805bd2 test/install_and_test_tool_shed_repositories/base/twilltestcase.py
--- a/test/install_and_test_tool_shed_repositories/base/twilltestcase.py
+++ b/test/install_and_test_tool_shed_repositories/base/twilltestcase.py
@@ -163,6 +163,8 @@
url = '/admin_toolshed/uninstall_tool_dependencies?repository_id=%s&inst_td_ids=%s&operation=uninstall' % \
( encoded_repository_id, tool_dependency_ids )
self.visit_url( url )
- tc.fv( 'uninstall_tool_dependencies', 'tool_dependency_ids', tool_dependency_ids )
- tc.submit( 'uninstall_tool_dependencies_button' )
+ html = self.last_page()
+ if 'uninstall_tool_dependencies' in html:
+ tc.fv( 'uninstall_tool_dependencies', 'tool_dependency_ids', tool_dependency_ids )
+ tc.submit( 'uninstall_tool_dependencies_button' )
\ No newline at end of file
diff -r e12a10e5418d53c9440982ddc935e1b7d647bd07 -r cd12bf2ed5475c8c6ab72321e5865441c0805bd2 test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -1037,16 +1037,20 @@
# If a tool dependency fails to install correctly, this should be considered an installation error,
# and functional tests should be skipped, since the tool dependency needs to be correctly installed
# for the test to be considered reliable.
- log.error( 'One or more tool dependencies of this repository are marked as missing.' )
+ log.error( 'One or more dependencies of this repository are marked as missing.' )
log.error( 'Updating repository and skipping functional tests.' )
# In keeping with the standard display layout, add the error message to the dict for each tool individually.
for dependency in failed_tool_dependencies:
+ log.error( 'Missing tool dependency %s of type %s version %s: %s' % \
+ ( str( dependency.name ), str( dependency.type ), str( dependency.version ), str( dependency.error_message ) ) )
test_result = dict( type=dependency.type,
name=dependency.name,
version=dependency.version,
error_message=dependency.error_message )
repository_status[ 'installation_errors' ][ 'tool_dependencies' ].append( test_result )
for dependency in repository.repository_dependencies_with_installation_errors:
+ log.error( 'Missing repository dependency %s changeset revision %s owned by %s: %s' % \
+ ( str( dependency.name ), str( dependency.changeset_revision ), str( dependency.owner ), str( dependency.error_message ) ) )
test_result = dict( tool_shed=dependency.tool_shed,
name=dependency.name,
owner=dependency.owner,
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/e12a10e5418d/
Changeset: e12a10e5418d
User: guerler
Date: 2013-11-11 22:00:10
Summary: UI: Fix tooltip placement for masthead icons
Affected #: 1 file
diff -r 28469a503b56c374f8ec4730e276a89a6323cef9 -r e12a10e5418d53c9440982ddc935e1b7d647bd07 static/scripts/galaxy.masthead.js
--- a/static/scripts/galaxy.masthead.js
+++ b/static/scripts/galaxy.masthead.js
@@ -226,7 +226,7 @@
// configure icon
var self = this;
- $(this.el).find('.icon').tooltip({title: this.options.tooltip})
+ $(this.el).find('.icon').tooltip({title: this.options.tooltip, placement: 'bottom'})
.on('mouseup', self.options.on_click);
// visiblity
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/56b077b51694/
Changeset: 56b077b51694
Branch: stable
User: jmchilton
Date: 2013-11-11 21:17:25
Summary: Revert original and documented handling of condor submission parameters.
I modified the behavior unknowingly in 126d5c5b9a49. I am not sure what I was thinking when I redid the runner, perhaps I had seen an open Trello card and thought this was not implemented at all. My fault, this was implemented and looks like it was working. These should now work as documented again.
Affected #: 2 files
diff -r 4bd31fc8c523950dd2f6e96ef361cb7410021fdd -r 56b077b51694fba1dcb37044dc8f2c0ea8d8b9bf lib/galaxy/jobs/runners/condor.py
--- a/lib/galaxy/jobs/runners/condor.py
+++ b/lib/galaxy/jobs/runners/condor.py
@@ -57,7 +57,7 @@
galaxy_id_tag = job_wrapper.get_id_tag()
# get destination params
- query_params = submission_params(**job_destination.params)
+ query_params = submission_params(prefix="", **job_destination.params)
galaxy_slots = query_params.get('request_cpus', None)
if galaxy_slots:
galaxy_slots_statement = 'GALAXY_SLOTS="%s"; export GALAXY_SLOTS_CONFIGURED="1"' % galaxy_slots
diff -r 4bd31fc8c523950dd2f6e96ef361cb7410021fdd -r 56b077b51694fba1dcb37044dc8f2c0ea8d8b9bf lib/galaxy/jobs/runners/util/condor/__init__.py
--- a/lib/galaxy/jobs/runners/util/condor/__init__.py
+++ b/lib/galaxy/jobs/runners/util/condor/__init__.py
@@ -18,12 +18,12 @@
SUBMIT_PARAM_PREFIX = "submit_"
-def submission_params(**kwds):
+def submission_params(prefix=SUBMIT_PARAM_PREFIX, **kwds):
submission_params = {}
for key, value in kwds.iteritems():
key = key.lower()
- if key.startswith(SUBMIT_PARAM_PREFIX):
- condor_key = key[len(SUBMIT_PARAM_PREFIX):]
+ if key.startswith(prefix):
+ condor_key = key[len(prefix):]
submission_params[condor_key] = value
return submission_params
https://bitbucket.org/galaxy/galaxy-central/commits/28469a503b56/
Changeset: 28469a503b56
User: jmchilton
Date: 2013-11-11 21:17:55
Summary: Merge latest stable.
Affected #: 2 files
diff -r 43b42520bd5b89f5b0f281efcbc5513e501326cd -r 28469a503b56c374f8ec4730e276a89a6323cef9 lib/galaxy/jobs/runners/condor.py
--- a/lib/galaxy/jobs/runners/condor.py
+++ b/lib/galaxy/jobs/runners/condor.py
@@ -57,7 +57,7 @@
galaxy_id_tag = job_wrapper.get_id_tag()
# get destination params
- query_params = submission_params(**job_destination.params)
+ query_params = submission_params(prefix="", **job_destination.params)
galaxy_slots = query_params.get('request_cpus', None)
if galaxy_slots:
galaxy_slots_statement = 'GALAXY_SLOTS="%s"; export GALAXY_SLOTS_CONFIGURED="1"' % galaxy_slots
diff -r 43b42520bd5b89f5b0f281efcbc5513e501326cd -r 28469a503b56c374f8ec4730e276a89a6323cef9 lib/galaxy/jobs/runners/util/condor/__init__.py
--- a/lib/galaxy/jobs/runners/util/condor/__init__.py
+++ b/lib/galaxy/jobs/runners/util/condor/__init__.py
@@ -18,12 +18,12 @@
SUBMIT_PARAM_PREFIX = "submit_"
-def submission_params(**kwds):
+def submission_params(prefix=SUBMIT_PARAM_PREFIX, **kwds):
submission_params = {}
for key, value in kwds.iteritems():
key = key.lower()
- if key.startswith(SUBMIT_PARAM_PREFIX):
- condor_key = key[len(SUBMIT_PARAM_PREFIX):]
+ if key.startswith(prefix):
+ condor_key = key[len(prefix):]
submission_params[condor_key] = value
return submission_params
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/43b42520bd5b/
Changeset: 43b42520bd5b
User: Dave Bouvier
Date: 2013-11-11 21:06:58
Summary: Handle cases where the installation path for a new tool dependency already exists, but is empty. This may occur when an error has been encountered, but the database has been dropped and recreated, or the Galaxy process was restarted after the installation path was created, but before any files were installed to that path.
Affected #: 4 files
diff -r 15767ea0e9f064345d35769e2d5b34608fa8877a -r 43b42520bd5b89f5b0f281efcbc5513e501326cd lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
@@ -1,8 +1,9 @@
import logging
import os
-import sys
+import shutil
import stat
import subprocess
+import sys
import tempfile
from string import Template
import fabric_util
@@ -77,23 +78,6 @@
return tool_shed_repository
return None
-def get_tool_dependency_install_dir( app, repository_name, repository_owner, repository_changeset_revision, tool_dependency_type, tool_dependency_name,
- tool_dependency_version ):
- if tool_dependency_type == 'package':
- return os.path.abspath( os.path.join( app.config.tool_dependency_dir,
- tool_dependency_name,
- tool_dependency_version,
- repository_owner,
- repository_name,
- repository_changeset_revision ) )
- if tool_dependency_type == 'set_environment':
- return os.path.abspath( os.path.join( app.config.tool_dependency_dir,
- 'environment_settings',
- tool_dependency_name,
- repository_owner,
- repository_name,
- repository_changeset_revision ) )
-
def get_tool_shed_repository_install_dir( app, tool_shed_repository ):
return os.path.abspath( tool_shed_repository.repo_files_directory( app ) )
@@ -123,22 +107,22 @@
required_repository_changeset_revision = required_repository.installed_changeset_revision
# Define the installation directory for the required tool dependency package in the required repository.
required_repository_package_install_dir = \
- get_tool_dependency_install_dir( app=app,
- repository_name=required_repository_name,
- repository_owner=required_repository_owner,
- repository_changeset_revision=required_repository_changeset_revision,
- tool_dependency_type='package',
- tool_dependency_name=package_name,
- tool_dependency_version=package_version )
+ tool_dependency_util.get_tool_dependency_install_dir( app=app,
+ repository_name=required_repository_name,
+ repository_owner=required_repository_owner,
+ repository_changeset_revision=required_repository_changeset_revision,
+ tool_dependency_type='package',
+ tool_dependency_name=package_name,
+ tool_dependency_version=package_version )
# Define the this dependent repository's tool dependency installation directory that will contain the env.sh file with a path to the
# required repository's installed tool dependency package.
- dependent_install_dir = get_tool_dependency_install_dir( app=app,
- repository_name=tool_shed_repository.name,
- repository_owner=tool_shed_repository.owner,
- repository_changeset_revision=tool_shed_repository.installed_changeset_revision,
- tool_dependency_type='package',
- tool_dependency_name=package_name,
- tool_dependency_version=package_version )
+ dependent_install_dir = tool_dependency_util.get_tool_dependency_install_dir( app=app,
+ repository_name=tool_shed_repository.name,
+ repository_owner=tool_shed_repository.owner,
+ repository_changeset_revision=tool_shed_repository.installed_changeset_revision,
+ tool_dependency_type='package',
+ tool_dependency_name=package_name,
+ tool_dependency_version=package_version )
# Set this dependent repository's tool dependency env.sh file with a path to the required repository's installed tool dependency package.
# We can get everything we need from the discovered installed required_repository.
if required_repository.status in [ app.model.ToolShedRepository.installation_status.DEACTIVATED,
@@ -253,13 +237,13 @@
# We'll read the contents of the received required_repository's env.sh file and replace the 'value' entry of each env_var_dict
# with the associated value in the env.sh file.
new_env_var_dicts = []
- env_sh_file_dir = get_tool_dependency_install_dir( app=app,
- repository_name=required_repository.name,
- repository_owner=required_repository.owner,
- repository_changeset_revision=required_repository.installed_changeset_revision,
- tool_dependency_type='package',
- tool_dependency_name=package_name,
- tool_dependency_version=package_version )
+ env_sh_file_dir = tool_dependency_util.get_tool_dependency_install_dir( app=app,
+ repository_name=required_repository.name,
+ repository_owner=required_repository.owner,
+ repository_changeset_revision=required_repository.installed_changeset_revision,
+ tool_dependency_type='package',
+ tool_dependency_name=package_name,
+ tool_dependency_version=package_version )
env_sh_file_path = os.path.join( env_sh_file_dir, 'env.sh' )
if os.path.exists( env_sh_file_path ):
for i, line in enumerate( open( env_sh_file_path, 'r' ) ):
@@ -272,12 +256,11 @@
env_var_dict[ 'value' ] = new_value
new_env_var_dicts.append( env_var_dict )
else:
- tool_dependency.status = app.model.ToolShedRepository.installation_status.ERROR
- error_message = 'Invalid file %s specified, ignoring set_environment_for_install action.', env_sh_file_path
- tool_dependency.error_message = error_message
- sa_session = app.model.context.current
- sa_session.add( tool_dependency )
- sa_session.flush()
+ error_message = 'Invalid file %s specified, ignoring set_environment_for_install action.' % str( env_sh_file_path )
+ tool_dependency = tool_dependency_util.handle_tool_dependency_installation_error( app,
+ tool_dependency,
+ error_message,
+ remove_installation_path=False )
action_dict[ 'environment_variable' ] = new_env_var_dicts
else:
action_dict[ 'environment_variable' ] = env_var_dicts
@@ -294,10 +277,13 @@
fabric_util.install_and_build_package( app, tool_dependency, actions_dict )
except Exception, e:
log.exception( 'Error installing tool dependency %s version %s.', str( tool_dependency.name ), str( tool_dependency.version ) )
- tool_dependency.status = app.model.ToolDependency.installation_status.ERROR
- tool_dependency.error_message = '%s\n%s' % ( td_common_util.format_traceback(), str( e ) )
- sa_session.add( tool_dependency )
- sa_session.flush()
+ # Since there was an installation error, update the tool dependency status to Error. The remove_installation_path option must
+ # be left False here.
+ error_message = '%s\n%s' % ( td_common_util.format_traceback(), str( e ) )
+ tool_dependency = tool_dependency_util.handle_tool_dependency_installation_error( app,
+ tool_dependency,
+ error_message,
+ remove_installation_path=False )
if tool_dependency.status != app.model.ToolDependency.installation_status.ERROR:
tool_dependency.status = app.model.ToolDependency.installation_status.INSTALLED
sa_session.add( tool_dependency )
@@ -320,24 +306,54 @@
elif package_elem.tag == 'install':
# <install version="1.0">
# Get the installation directory for tool dependencies that will be installed for the received tool_shed_repository.
- install_dir = get_tool_dependency_install_dir( app=app,
- repository_name=tool_shed_repository.name,
- repository_owner=tool_shed_repository.owner,
- repository_changeset_revision=tool_shed_repository.installed_changeset_revision,
- tool_dependency_type='package',
- tool_dependency_name=package_name,
- tool_dependency_version=package_version )
+ install_dir = tool_dependency_util.get_tool_dependency_install_dir( app=app,
+ repository_name=tool_shed_repository.name,
+ repository_owner=tool_shed_repository.owner,
+ repository_changeset_revision=tool_shed_repository.installed_changeset_revision,
+ tool_dependency_type='package',
+ tool_dependency_name=package_name,
+ tool_dependency_version=package_version )
+ can_install_tool_dependency = True
if os.path.exists( install_dir ):
- print '\nSkipping installation of tool dependency', package_name, 'version', package_version, 'since it is installed in', install_dir, '\n'
+ # The tool dependency installation directory exists, check for the presence of fabric_util.INSTALLATION_LOG,
+ # which indicates a successful installation. This currently assumes that the tool dependency record will
+ # always exist in the database.
tool_dependency = tool_dependency_util.get_tool_dependency_by_name_version_type_repository( app,
tool_shed_repository,
package_name,
package_version,
'package' )
- tool_dependency.status = app.model.ToolDependency.installation_status.INSTALLED
- sa_session.add( tool_dependency )
- sa_session.flush()
+ if tool_dependency.status == app.model.ToolDependency.installation_status.INSTALLING:
+ # The tool dependency is in an Installing state, so we don't want to do anything to it.
+ log.debug( 'Skipping installation of tool dependency %s version %s because it has a status of %s' % \
+ ( tool_dependency.name, tool_dependency.version, tool_dependency.status ) )
+ can_install_tool_dependency = False
+ else:
+ # If the tool dependency is being installed by someone else, we don't want to interfere with that.
+ # This assumes the installation by "someone else" is not hung in an Installing state, which is a
+ # weakness if "someone else" never repaired it.
+ tool_dependency_installation_directory_contents = os.listdir( install_dir )
+ if fabric_util.INSTALLATION_LOG in tool_dependency_installation_directory_contents:
+ print '\nSkipping installation of tool dependency', package_name, 'version', package_version, \
+ 'since it is installed in', install_dir, '\n'
+ can_install_tool_dependency = False
+ else:
+ error_message = '\nInstallation path %s for tool dependency %s version %s exists, but the expected file %s' % \
+ ( install_dir, package_name, package_version, fabric_util.INSTALLATION_LOG )
+ error_message += ' is missing. This indicates an installation error, so the tool dependency is being'
+ error_message += ' prepared for reinstallation.'
+ print error_message
+ tool_dependency.status = app.model.ToolDependency.installation_status.NEVER_INSTALLED
+ try:
+ shutil.rmtree( install_dir )
+ except Exception, e:
+ log.exception( 'Unable to remove installation path %s.', install_dir )
+ can_install_tool_dependency = True
+ sa_session.add( tool_dependency )
+ sa_session.flush()
else:
+ can_install_tool_dependency = True
+ if can_install_tool_dependency:
package_install_version = package_elem.get( 'version', '1.0' )
tool_dependency = tool_dependency_util.create_or_update_tool_dependency( app=app,
tool_shed_repository=tool_shed_repository,
@@ -436,10 +452,12 @@
error_message = 'Version %s of the %s package cannot be installed because ' % ( str( package_version ), str( package_name ) )
error_message += 'the recipe for installing the package is missing either an <actions> tag set or an <actions_group> '
error_message += 'tag set.'
- tool_dependency.status = app.model.ToolDependency.installation_status.ERROR
- tool_dependency.error_message = error_message
- sa_session.add( tool_dependency )
- sa_session.flush()
+ # Since there was an installation error, update the tool dependency status to Error. The remove_installation_path option must
+ # be left False here.
+ tool_dependency = tool_dependency_util.handle_tool_dependency_installation_error( app,
+ tool_dependency,
+ error_message,
+ remove_installation_path=False )
return tool_dependency
else:
raise NotImplementedError( 'Only install version 1.0 is currently supported (i.e., change your tag to be <install version="1.0">).' )
@@ -878,13 +896,13 @@
# Tool dependencies of type "set_environmnet" always have the version attribute set to None.
attr_tup = ( env_var_name, None, 'set_environment' )
if attr_tup in attr_tups_of_dependencies_for_install:
- install_dir = get_tool_dependency_install_dir( app=app,
- repository_name=tool_shed_repository.name,
- repository_owner=tool_shed_repository.owner,
- repository_changeset_revision=tool_shed_repository.installed_changeset_revision,
- tool_dependency_type='set_environment',
- tool_dependency_name=env_var_name,
- tool_dependency_version=None )
+ install_dir = tool_dependency_util.get_tool_dependency_install_dir( app=app,
+ repository_name=tool_shed_repository.name,
+ repository_owner=tool_shed_repository.owner,
+ repository_changeset_revision=tool_shed_repository.installed_changeset_revision,
+ tool_dependency_type='set_environment',
+ tool_dependency_name=env_var_name,
+ tool_dependency_version=None )
tool_shed_repository_install_dir = get_tool_shed_repository_install_dir( app, tool_shed_repository )
env_var_dict = td_common_util.create_env_var_dict( env_var_elem, tool_shed_repository_install_dir=tool_shed_repository_install_dir )
if env_var_dict:
diff -r 15767ea0e9f064345d35769e2d5b34608fa8877a -r 43b42520bd5b89f5b0f281efcbc5513e501326cd 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
@@ -475,10 +475,12 @@
error_message = "Error installing tool dependency %s version %s: %s" % ( str( package_name ), str( package_version ), str( e ) )
log.exception( error_message )
if tool_dependency:
- tool_dependency.status = app.model.ToolDependency.installation_status.ERROR
- tool_dependency.error_message = error_message
- sa_session.add( tool_dependency )
- sa_session.flush()
+ # Since there was an installation error, update the tool dependency status to Error. The remove_installation_path option must
+ # be left False here.
+ tool_dependency = tool_dependency_util.handle_tool_dependency_installation_error( app,
+ tool_dependency,
+ error_message,
+ remove_installation_path=False )
if tool_dependency and tool_dependency.status in [ app.model.ToolDependency.installation_status.INSTALLED,
app.model.ToolDependency.installation_status.ERROR ]:
installed_tool_dependencies.append( tool_dependency )
@@ -492,10 +494,12 @@
error_message = "Error setting environment for tool dependency: %s" % str( e )
log.debug( error_message )
if tool_dependency:
- tool_dependency.status = app.model.ToolDependency.installation_status.ERROR
- tool_dependency.error_message = error_message
- sa_session.add( tool_dependency )
- sa_session.flush()
+ # Since there was an installation error, update the tool dependency status to Error. The remove_installation_path option must
+ # be left False here.
+ tool_dependency = tool_dependency_util.handle_tool_dependency_installation_error( app,
+ tool_dependency,
+ error_message,
+ remove_installation_path=False )
if tool_dependency and tool_dependency.status in [ app.model.ToolDependency.installation_status.INSTALLED,
app.model.ToolDependency.installation_status.ERROR ]:
installed_tool_dependencies.append( tool_dependency )
diff -r 15767ea0e9f064345d35769e2d5b34608fa8877a -r 43b42520bd5b89f5b0f281efcbc5513e501326cd lib/tool_shed/util/shed_util_common.py
--- a/lib/tool_shed/util/shed_util_common.py
+++ b/lib/tool_shed/util/shed_util_common.py
@@ -235,7 +235,6 @@
"""
# The received value for dist_to_shed will be True if the InstallManager is installing a repository that contains tools or datatypes that used
# to be in the Galaxy distribution, but have been moved to the main Galaxy tool shed.
- log.debug( "Adding new row (or updating an existing row) for repository '%s' in the tool_shed_repository table, status set to '%s'." % ( str( name ), str( status ) ) )
if current_changeset_revision is None:
# The current_changeset_revision is not passed if a repository is being installed for the first time. If a previously installed repository
# was later uninstalled, this value should be received as the value of that change set to which the repository had been updated just prior
@@ -261,6 +260,7 @@
owner,
installed_changeset_revision )
if tool_shed_repository:
+ log.debug( "Updating an existing row for repository '%s' in the tool_shed_repository table, status set to '%s'." % ( str( name ), str( status ) ) )
tool_shed_repository.description = description
tool_shed_repository.changeset_revision = current_changeset_revision
tool_shed_repository.ctx_rev = ctx_rev
@@ -270,6 +270,7 @@
tool_shed_repository.uninstalled = uninstalled
tool_shed_repository.status = status
else:
+ log.debug( "Adding new row for repository '%s' in the tool_shed_repository table, status set to '%s'." % ( str( name ), str( status ) ) )
tool_shed_repository = app.model.ToolShedRepository( tool_shed=tool_shed,
name=name,
description=description,
diff -r 15767ea0e9f064345d35769e2d5b34608fa8877a -r 43b42520bd5b89f5b0f281efcbc5513e501326cd lib/tool_shed/util/tool_dependency_util.py
--- a/lib/tool_shed/util/tool_dependency_util.py
+++ b/lib/tool_shed/util/tool_dependency_util.py
@@ -48,11 +48,15 @@
else:
tool_dependency = get_tool_dependency_by_name_type_repository( app, tool_shed_repository, name, type )
if tool_dependency:
+ log.debug( 'Updating an existing record for tool dependency %s version %s for tool shed repository %s with changeset revision %s.' %
+ ( str( name ), str( version ), str( tool_shed_repository.name ), str( tool_shed_repository.changeset_revision ) ) )
# In some cases we should not override the current status of an existing tool_dependency, so do so only if set_status is True.
if set_status:
tool_dependency.status = status
else:
# Create a new tool_dependency record for the tool_shed_repository.
+ log.debug( 'Creating a new record for tool dependency %s version %s for tool shed repository %s with changeset revision %s.' %
+ ( str( name ), str( version ), str( tool_shed_repository.name ), str( tool_shed_repository.changeset_revision ) ) )
tool_dependency = app.model.ToolDependency( tool_shed_repository.id, name, version, type, status )
sa_session.add( tool_dependency )
sa_session.flush()
@@ -318,6 +322,51 @@
return ','.join( tool_dependency_ids )
return tool_dependency_ids
+def get_tool_dependency_install_dir( app, repository_name, repository_owner, repository_changeset_revision, tool_dependency_type,
+ tool_dependency_name, tool_dependency_version ):
+ if tool_dependency_type == 'package':
+ return os.path.abspath( os.path.join( app.config.tool_dependency_dir,
+ tool_dependency_name,
+ tool_dependency_version,
+ repository_owner,
+ repository_name,
+ repository_changeset_revision ) )
+ if tool_dependency_type == 'set_environment':
+ return os.path.abspath( os.path.join( app.config.tool_dependency_dir,
+ 'environment_settings',
+ tool_dependency_name,
+ repository_owner,
+ repository_name,
+ repository_changeset_revision ) )
+
+def handle_tool_dependency_installation_error( app, tool_dependency, error_message, remove_installation_path=False ):
+ # Since there was an installation error, remove the installation directory because the install_package method uses
+ # this: "if os.path.exists( install_dir ):". Setting remove_installation_path to True should rarely occur. It is
+ # currently set to True only to handle issues with installing tool dependencies into an Amazon S3 bucket.
+ sa_session = app.model.context.current
+ tool_shed_repository = tool_dependency.tool_shed_repository
+ install_dir = get_tool_dependency_install_dir( app=app,
+ repository_name=tool_shed_repository.name,
+ repository_owner=tool_shed_repository.owner,
+ repository_changeset_revision=tool_shed_repository.installed_changeset_revision,
+ tool_dependency_type=tool_dependency.type,
+ tool_dependency_name=tool_dependency.name,
+ tool_dependency_version=tool_dependency.version )
+ if remove_installation_path:
+ # This will be True only in the case where an exception was encountered during the installation process after the installation
+ # path was created, but before any information was written to the installation log, and the tool dependency status was not
+ # set to "Installed" or "Error".
+ if os.path.exists( install_dir ):
+ try:
+ shutil.rmtree( install_dir )
+ except Exception, e:
+ log.exception( 'Error removing existing installation directory %s.', install_dir )
+ tool_dependency.status = app.model.ToolDependency.installation_status.ERROR
+ tool_dependency.error_message = error_message
+ sa_session.add( tool_dependency )
+ sa_session.flush()
+ return tool_dependency
+
def merge_missing_tool_dependencies_to_installed_container( containers_dict ):
""" Merge the list of missing tool dependencies into the list of installed tool dependencies."""
missing_td_container_root = containers_dict.get( 'missing_tool_dependencies', None )
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.