Redefine the structure of the CalcInfo.local_copy_list
#2581
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2573
With the upcoming change of the node repository, files within it can no
longer be assumed to necessarily be stored on the local file system. It
is therefore impossible to address files within it through an absolute
file path, however, that is exactly what the
local_copy_list
expectsas the first item of its tuples.
Now, the
Node
class only exposes methods to get either the content ofa repository file or an filelike object. To comply with this change in
design the structure of the
local_copy_list
tuples is changed totuples of length three where each element represents:
The
upload_calculation
function of the execmanager has been updated tothis interface change, but because our
Transport
interface does notyet provide a method to put an object from a filelike object, we have to
create a temporary file on the local file system whose absolute filepath
can be passed to the
Transport.put
call. Once the transport is updatedto provide a
put_object_from_filelike
, this inefficiency can be removed.