details: http://www.bx.psu.edu/hg/galaxy/rev/53aa8d34c20a
changeset: 1608:53aa8d34c20a
user: Dan Blankenberg <dan(a)bx.psu.edu>
date: Wed Nov 05 11:43:22 2008 -0500
description:
Possible fix for the infinite metadata recursion issue.
1 file(s) affected in this change:
lib/galaxy/model/__init__.py
diffs (12 lines):
diff -r 4e2ad77de095 -r 53aa8d34c20a lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py Wed Nov 05 10:35:06 2008 -0500
+++ b/lib/galaxy/model/__init__.py Wed Nov 05 11:43:22 2008 -0500
@@ -188,7 +188,7 @@
return datatypes_registry.get_datatype_by_extension( self.extension )
def get_metadata( self ):
- if not hasattr( self, '_metadata_collection' ):
+ if not hasattr( self, '_metadata_collection' ) or self._metadata_collection.parent is None: #using weakref to store parent (to prevent circ ref), does a Session.clear() cause parent to be invalidated, while still copying over this non-database attribute?
self._metadata_collection = MetadataCollection( self )
return self._metadata_collection
def set_metadata( self, bunch ):
details: http://www.bx.psu.edu/hg/galaxy/rev/52e504c91cbc
changeset: 1601:52e504c91cbc
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Tue Nov 04 09:27:49 2008 -0500
description:
Apply James' faster_random patch from Nov 1.
1 file(s) affected in this change:
lib/galaxy/web/security/__init__.py
diffs (34 lines):
diff -r 7ae75e6d9d6a -r 52e504c91cbc lib/galaxy/web/security/__init__.py
--- a/lib/galaxy/web/security/__init__.py Mon Nov 03 15:31:38 2008 -0500
+++ b/lib/galaxy/web/security/__init__.py Tue Nov 04 09:27:49 2008 -0500
@@ -10,18 +10,17 @@
log = logging.getLogger( __name__ )
if os.path.exists( "/dev/urandom" ):
- log.debug("###using /dev/urandom....")
# We have urandom, use it as the source of random data
random_fd = os.open( "/dev/urandom", os.O_RDONLY )
def get_random_bytes( nbytes ):
value = os.read( random_fd, nbytes )
# Normally we should get as much as we need
if len( value ) == nbytes:
- return value
+ return value.encode( "hex" )
# If we don't, keep reading (this is slow and should never happen)
while len( value ) < nbytes:
value += os.read( random_fd, nbytes - len( value ) )
- return value
+ return value.encode( "hex" )
else:
def get_random_bytes( nbytes ):
nbits = nbytes * 8
@@ -29,7 +28,8 @@
while random_pool.entropy < nbits:
random_pool.add_event()
random_pool.stir()
- return( str( number.getRandomNumber( nbits, random_pool.get_bytes ) ) )
+ return str( number.getRandomNumber( nbits, random_pool.get_bytes ) )
+
class SecurityHelper( object ):
# TODO: checking if histories/datasets are owned by the current user) will be moved here.
details: http://www.bx.psu.edu/hg/galaxy/rev/13cbdd1bbd19
changeset: 1599:13cbdd1bbd19
user: Dan Blankenberg <dan(a)bx.psu.edu>
date: Mon Nov 03 15:21:03 2008 -0500
description:
A fix for the metadata reverting issue seen with PBS job runner.
1 file(s) affected in this change:
lib/galaxy/jobs/__init__.py
diffs (18 lines):
diff -r ca640ce1abcf -r 13cbdd1bbd19 lib/galaxy/jobs/__init__.py
--- a/lib/galaxy/jobs/__init__.py Mon Nov 03 15:15:22 2008 -0500
+++ b/lib/galaxy/jobs/__init__.py Mon Nov 03 15:21:03 2008 -0500
@@ -274,6 +274,7 @@
Prepare the job to run by creating the working directory and the
config files.
"""
+ mapping.context.current.clear() #this prevents the metadata reverting that has been seen in conjunction with the PBS job runner
# Create the working directory
self.working_directory = \
os.path.join( self.app.config.job_working_directory, str( self.job_id ) )
@@ -643,4 +644,4 @@
def put( self, *args ):
return
def shutdown( self ):
- return
\ No newline at end of file
+ return