-
Notifications
You must be signed in to change notification settings - Fork 136
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
API: /namespace set-label
on a directory works, but rm-label
doesn't
#7726
Comments
Onno ,
Happy 2025!
Yes you are right we cannot set label on a directory, this should be fixed.
Thank you
Marina
From: "Onno Zweers" ***@***.***>
To: "dCache" ***@***.***>
Cc: "Subscribed" ***@***.***>
Sent: Tuesday, 31 December, 2024 11:12:33
Subject: [dCache/dcache] API: /namespace `set-label` on a directory works, but `rm-label` doesn't (Issue #7726)
Dear dCache devs,
I'm testing with labels in the API. For files, it seems to work as expected. But for directories there is something strange: I can set a label on a directory, but I can't remove it.
***@***.*** SpiderScripts]$ curl --config /home/onno/.ada/headers/authorization_header_EAfsrGnaEBc7 --fail --show-error -H 'content-type: application/json' -X POST https://dcachetest.grid.surfsara.nl:20443/api/v1/namespace/%2Fgroups%2Fdteam%2Fonno-tests -d '{"action":"set-label","label":"mylabel"}'
{"status":"success"}
***@***.*** SpiderScripts]$ curl --config /home/onno/.ada/headers/authorization_header_EAfsrGnaEBc7 --fail --show-error -H 'content-type: application/json' -X POST https://dcachetest.grid.surfsara.nl:20443/api/v1/namespace/%2Fgroups%2Fdteam%2Fonno-tests -d '{"action":"rm-label","label":"mylabel"}'
curl: (22) The requested URL returned error: 400 Bad Request
In the frontend log:
level=WARN ts=2024-12-31T10:52:25.181+0100 event=org.dcache.frontend.request request.method=POST request.url= [ https://dcachetest.grid.surfsara.nl:20443/api/v1/namespace//groups/dteam/onno-tests | https://dcachetest.grid.surfsara.nl:20443/api/v1/namespace//groups/dteam/onno-tests ] response.code=400 response.reason="Bad Request" socket.remote=[2001:610:108:203a::2:28]:41748 user-agent=curl/7.61.1 ***@***.*** ***@***.*** user.mapped=36490:31631 request.entity="{"action":"rm-lab[...]l":"mytestlabel"}" response.entity="{"detail":"Directory object cannot [...]" duration=12
So, my guess is that labels are not implemented for directories. This is perfectly fine, I can't think of any use case for that. But wouldn't it be nice if a set-label on a dir also failed?
Please give this a low priority, it's not urgent, once you know how it works you can live with it.
Thanks, and happy new year!
—
Reply to this email directly, [ #7726 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ADR34RARA5GTMOXJT3EL2LT2IJUZDAVCNFSM6AAAAABUNI5JTSVHI2DSMVQWIX3LMV43ASLTON2WKOZSG43DIMRQGIZTCMQ | unsubscribe ] .
You are receiving this because you are subscribed to this thread. Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear dCache devs,
I'm testing with labels in the API. For files, it seems to work as expected. But for directories there is something strange: I can set a label on a directory, but I can't remove it.
In the frontend log:
So, my guess is that labels are not implemented for directories. This is perfectly fine, I can't think of any use case for that. But wouldn't it be nice if a
set-label
on a dir also failed?Please give this a low priority, it's not urgent, once you know how it works you can live with it.
Thanks, and happy new year!
The text was updated successfully, but these errors were encountered: