This (draft) PR targets the bug reported here.
As explained in this other issue, the call to truncate is not supported in EOS, and the file has to exist before calling truncate.
This can be done by using the File interface, as suggested here.
As the problem was spotted in uproot5, one solution could be to implement the wrapper there, but not having access to a XRootD.client.File object (since now uproot depends on fsspec) prevents this.
This PR attempts to fix the problem by extending the behavior of the _touch function on the fsspec-xrootd side: the idea is to implement the necessary behavior only if we are trying to write a file on EOS.
Since I'm not familiar with the code, feedback is more than welcome, especially in case there are less invasive ways to do this and possible caveats of this procedure that I might not be considering.
It should also be noted that, for this to work, I think other changes would be needed either on the uproot or fsspec side: as in FileSink, the fsspec.open function is called with mode w+b (see here), the error in here is raised.
This (draft) PR targets the bug reported here. As explained in this other issue, the call to
truncate
is not supported in EOS, and the file has to exist before callingtruncate
. This can be done by using theFile
interface, as suggested here.As the problem was spotted in uproot5, one solution could be to implement the wrapper there, but not having access to a
XRootD.client.File
object (since now uproot depends onfsspec
) prevents this. This PR attempts to fix the problem by extending the behavior of the_touch
function on thefsspec-xrootd
side: the idea is to implement the necessary behavior only if we are trying to write a file on EOS. Since I'm not familiar with the code, feedback is more than welcome, especially in case there are less invasive ways to do this and possible caveats of this procedure that I might not be considering.It should also be noted that, for this to work, I think other changes would be needed either on the uproot or fsspec side: as in
FileSink
, thefsspec.open
function is called with modew+b
(see here), the error in here is raised.