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

Trying to set is_new on dataset crashes #4192

Closed
ericvaandering opened this issue Dec 8, 2020 · 1 comment
Closed

Trying to set is_new on dataset crashes #4192

ericvaandering opened this issue Dec 8, 2020 · 1 comment

Comments

@ericvaandering
Copy link
Contributor

Motivation

Making the following client call:

client.set_metadata(scope='cms', name=did, key='is_new', value=True)

results in a crash of the server:

Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/rucio/web/rest/did.py", line 703, in POST
     issuer=ctx.env.get('issuer'), recursive=recursive, vo=ctx.env.get('vo'))
   File "/usr/lib/python2.7/site-packages/rucio/api/did.py", line 421, in set_metadata
     return did.set_metadata(scope=scope, name=name, key=key, value=value, recursive=recursive)
   File "/usr/lib/python2.7/site-packages/rucio/db/sqla/session.py", line 377, in new_funct
     result = function(*args, **kwargs)
   File "/usr/lib/python2.7/site-packages/rucio/core/did.py", line 1241, in set_metadata
     did_meta_plugins.set_metadata(scope=scope, name=name, key=key, value=value, recursive=recursive, session=session)
   File "/usr/lib/python2.7/site-packages/rucio/core/did_meta_plugins/__init__.py", line 103, in set_metadata
     meta_handler.set_metadata(scope, name, key, value, recursive, session=session)
   File "/usr/lib/python2.7/site-packages/rucio/db/sqla/session.py", line 393, in new_funct
     result = function(*args, **kwargs)
   File "/usr/lib/python2.7/site-packages/rucio/core/did_meta_plugins/json_meta.py", line 85, in set_metadata
     raise NotImplementedError

This seems to be a regression since this definitely worked before. It seems as if an exception is being thrown because we're not supporting JSON metadata even though this is not JSON metadata.

The CLI command set-metadata fails with the same error

Modification

@bari12
Copy link
Member

bari12 commented Dec 9, 2020

As mentioned on Slack, I think it should be sufficient to add this here


Should be added to 1.24.0 (rc2?) and a hotfix 1.23.11.post3 release.

bari12 added a commit to bari12/rucio that referenced this issue Dec 9, 2020
bari12 added a commit to bari12/rucio that referenced this issue Dec 9, 2020
@bari12 bari12 closed this as completed in 21353ef Dec 11, 2020
bari12 added a commit that referenced this issue Dec 11, 2020
…r_is_new_key_fails

Core: set_metadata of is_new fails; Fix #4192
@bari12 bari12 added this to the 1.23.11.post3 milestone Dec 11, 2020
maany pushed a commit to maany/rucio that referenced this issue Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants