Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xrootdpyfs: fix extended attributes fetch #127

Open
alejandromumo opened this issue Oct 18, 2024 · 0 comments
Open

xrootdpyfs: fix extended attributes fetch #127

alejandromumo opened this issue Oct 18, 2024 · 0 comments

Comments

@alejandromumo
Copy link
Member

alejandromumo commented Oct 18, 2024

Problem

After an upload fails we try to delete the file(s) from the FS. This operation eventually checks whether the file is a directory (using the fs getinfo method). In turn, this executes fs._query(QueryCode.XATTR, path) which is not a valid query for XATTR (it seems it's an unsupported operation).


Possible fix

From what I see, the client supports extended attributes listing which I believe would be what we need. I ran some tests in the CLI and seems to be OK:

from xrootdpyfs.fs import XRootDPyFS

url = '...'
fs = XRootDPyFS(url)
path = '...'

# Current code that fails
fs._query(QueryCode.XATTR, path)

# Alternative code
extended_attr = fs._client.list_xattr(path)

In the example above, I realised that we have another issue when raising the fs exceptions (e.g. Unsupported). We must use raise Unsupported(msg=status.message). This is also being tracked by #122

If this is fixed, we could potentially have more visibility on why the upload failed on the first place (to be tested)

@alejandromumo alejandromumo converted this from a draft issue Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog 😴
Development

No branches or pull requests

1 participant