Skip to content

Commit 83dabfe

Browse files
committed
Initializes params earlier to fix init order issue
Working directory configuration now triggers during initialization and references the params attribute. Initializing it beforehand prevents an AttributeError when resolving the job destination.
1 parent ad12ff6 commit 83dabfe

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/galaxy/jobs/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,11 @@ def __init__(
10181018
# Tool versioning variables
10191019
self.version_string = ""
10201020
self.__galaxy_lib_dir = None
1021+
# params is unused but is referenced by the job_destination property
1022+
# (via job_runner_mapper.get_job_destination(self.params)), which
1023+
# _setup_working_directory -> _set_working_directory -> get_destination_configuration
1024+
# now triggers during __init__. Initialize it before that call.
1025+
self.params = None # unused
10211026
# If the job has an object_store_id ensure working directory is setup, otherwise
10221027
# wait for that to be assigned before configuring it. Either way the working
10231028
# directory does not to be configured on this object before prepare() is called.
@@ -1027,7 +1032,6 @@ def __init__(
10271032
# resolved
10281033
self._job_io: JobIO | None = None
10291034
self.tool_provided_job_metadata = None
1030-
self.params = None # unused
10311035
self.runner_command_line = None
10321036

10331037
# Wrapper holding the info required to restore and clean up from files used for setting metadata externally

0 commit comments

Comments
 (0)