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

list_content call never raises DataIdentifierNotFound #6231

Closed
bari12 opened this issue Jun 15, 2023 · 0 comments
Closed

list_content call never raises DataIdentifierNotFound #6231

bari12 opened this issue Jun 15, 2023 · 0 comments
Assignees
Milestone

Comments

@bari12
Copy link
Member

bari12 commented Jun 15, 2023

Description

Due to the change to the new SQLAlchemy2 syntax with scalars, this query will never raise the exception.DataIdentifierNotFound, but instead just return an empty scalar.

https://github.com/rucio/rucio/blame/6eac5dcc30cb6dac427cbc5070d46c170ae7fedf/lib/rucio/core/did.py#L2035

Steps to reproduce

-bash-4.2$ rucio list-dids mc23_13p6TeV.601188.PhPy8EG_AZNLOqsdqsdqsd
+--------------+--------------+
| SCOPE:NAME | [DID TYPE] |
|--------------+--------------|
+--------------+--------------+
-bash-4.2$ rucio list-content mc23_13p6TeV.601188.PhPy8EG_AZNLOqsdqsdqsd
+--------------+--------------+
| SCOPE:NAME | [DID TYPE] |
|--------------+--------------|
+--------------+--------------+

Rucio Version

master

Additional Information

Best would probably be to join with did table and check if the did exists in the first place. Another option would be, if no result is found, to check for a dataidentifier then.

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

3 participants