
3 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/7aed3778587e/ Changeset: 7aed3778587e Branch: next-stable User: jmchilton Date: 2014-09-24 19:21:44+00:00 Summary: Allow remotely executed tools to write version files to the temp directory. Like with discovered datasets - such use of this directory should be phased out in favor of the job's working directory of a job relative to it. Affected #: 1 file diff -r 381c547b681aa09fccab1b03963377115d9d7cc4 -r 7aed3778587ed9d8e703721adc0f8e4df656e902 lib/galaxy/webapps/galaxy/api/job_files.py --- a/lib/galaxy/webapps/galaxy/api/job_files.py +++ b/lib/galaxy/webapps/galaxy/api/job_files.py @@ -118,9 +118,16 @@ https://gist.github.com/jmchilton/9103619.) """ in_work_dir = self.__in_working_directory( job, path, trans.app ) - if not in_work_dir and not self.__is_output_dataset_path( job, path ): + allow_temp_dir_file = self.__is_allowed_temp_dir_file( trans.app, job, path ) + if not in_work_dir and not allow_temp_dir_file and not self.__is_output_dataset_path( job, path ): raise exceptions.ItemAccessibilityException("Job is not authorized to write to supplied path.") + def __is_allowed_temp_dir_file( self, app, job, path ): + # grrr.. need to get away from new_file_path - these should be written + # to job working directory like metadata files. + in_temp_dir = util.in_directory( path, app.config.new_file_path ) + return in_temp_dir and os.path.split( path )[ -1 ].startswith( "GALAXY_VERSION_") + def __is_output_dataset_path( self, job, path ): """ Check if is an output path for this job or a file in the an output's extra files path. https://bitbucket.org/galaxy/galaxy-central/commits/5296d69134bd/ Changeset: 5296d69134bd Branch: next-stable User: jmchilton Date: 2014-09-24 19:21:44+00:00 Summary: Rework version command to work with job wrappers that have not had 'prepare' executed. Traditionally all synchronous job wrappers have had 'prepare' called when they are queued up, but prepare isn't called on the more transient job wrappers that are created in response to Pulsar asnchronous status update messages. Affected #: 1 file diff -r 7aed3778587ed9d8e703721adc0f8e4df656e902 -r 5296d69134bddeb11246c70347d83c6073da646f lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -1035,7 +1035,7 @@ else: final_job_state = job.states.ERROR - if self.write_version_cmd: + if self.tool.version_string_cmd: version_filename = self.get_version_string_path() if os.path.exists(version_filename): self.version_string = open(version_filename).read() https://bitbucket.org/galaxy/galaxy-central/commits/583d9ba9c4f9/ Changeset: 583d9ba9c4f9 User: jmchilton Date: 2014-09-24 19:23:08+00:00 Summary: Merge next-stable. Affected #: 2 files diff -r fda2251972f612ded8c3c5cb096795ace194d192 -r 583d9ba9c4f9673c42f4378829b741845e95f1c0 lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -1035,7 +1035,7 @@ else: final_job_state = job.states.ERROR - if self.write_version_cmd: + if self.tool.version_string_cmd: version_filename = self.get_version_string_path() if os.path.exists(version_filename): self.version_string = open(version_filename).read() diff -r fda2251972f612ded8c3c5cb096795ace194d192 -r 583d9ba9c4f9673c42f4378829b741845e95f1c0 lib/galaxy/webapps/galaxy/api/job_files.py --- a/lib/galaxy/webapps/galaxy/api/job_files.py +++ b/lib/galaxy/webapps/galaxy/api/job_files.py @@ -118,9 +118,16 @@ https://gist.github.com/jmchilton/9103619.) """ in_work_dir = self.__in_working_directory( job, path, trans.app ) - if not in_work_dir and not self.__is_output_dataset_path( job, path ): + allow_temp_dir_file = self.__is_allowed_temp_dir_file( trans.app, job, path ) + if not in_work_dir and not allow_temp_dir_file and not self.__is_output_dataset_path( job, path ): raise exceptions.ItemAccessibilityException("Job is not authorized to write to supplied path.") + def __is_allowed_temp_dir_file( self, app, job, path ): + # grrr.. need to get away from new_file_path - these should be written + # to job working directory like metadata files. + in_temp_dir = util.in_directory( path, app.config.new_file_path ) + return in_temp_dir and os.path.split( path )[ -1 ].startswith( "GALAXY_VERSION_") + def __is_output_dataset_path( self, job, path ): """ Check if is an output path for this job or a file in the an output's extra files path. 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.