-
Notifications
You must be signed in to change notification settings - Fork 176
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
[8.0] Implementation of metadata methods into RucioFileCatalogClient #7383
base: rel-v8r0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a rather lightweight review since I don't have a working multi-VO Rucio server to see what the client actually does. Most of work is delegated to the server so it would be beyond the client review. I think one would need some basic unit tests of the client to follow the logic. This would be especially useful for set
and delete
methods where it is unclear what they are supposed to return.
def getFileUserMetadata(self, path): | ||
"""Get the meta data attached to a file, but also to | ||
all its parents | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Describe method arguments for all methods (and their return objects)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do
self.client.set_dids_metadata_bulk(dids=dids, recursive=False) | ||
except Exception as err: | ||
return S_ERROR(str(err)) | ||
return S_OK(resDict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is resDict
ever updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Will change it. Since we use a bulk method server side, the metadata will be either all registered or all failed
if failedMeta: | ||
metaExample = list(failedMeta)[0] | ||
result = S_ERROR(f"Failed to remove {len(failedMeta)} metadata, e.g. {failedMeta[metaExample]}") | ||
result["FailedMetadata"] = failedMeta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the key be "Failed" ?
result
is never used. This is true for resDict
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's a mistake. It should be
return S_ERROR(f"Failed to remove {len(failedMeta)} metadata, e.g. {failedMeta[metaExample]}")
Any update here? Anything we could do to help? |
Closes #7382
BEGINRELEASENOTES
*Resources
NEW : Introduce a first implementation of metadata methods into RucioFileCatalogClient
ENDRELEASENOTES