-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Pelican Service:
- Client
- Plugin
- Registry
- Director
- Origin
- Cache
- Other (please give the detail)
Is your feature request related to a problem? Please describe.
When uploading (put-ing) to an existing namespace, users have built up the intuition that the object name at the destination is inferred by the object name at the source. That is, users expect
pelican object put ./aowen-uwmad_test.txt osdf:///<existing_namespace>
to have the same outcome as
pelican object put ./aowen-uwmad_test.txt osdf:///<existing_namespace>/aowen-uwmad_test.txt
This arises from such behavior of common unix commands such as mv, cp, and scp when an existing directory is provided as the destination.
Instead, the user receives an error like this:
ERROR[2026-01-05T12:31:53-06:00] Error when attempting to transfer object osdf:///<existing_namespace> for client 019b8f6e-0f40-711d-a992-3ab2693ab191: remote object already exists, upload aborted
The intuition built up by the user further confuses the point - they interpret the error to mean that the object they are trying to upload (aowen-uwmad_test.txt) already exists in the namespace (osdf:///<existing_namespace>/aowen-uwmad_test.txt), but any subsequent queries (pelican object ls, pelican object get) against that supposed object will fail.
Describe the solution you'd like
The command
pelican object put ./aowen-uwmad_test.txt osdf:///<existing_namespace>
has the same outcome as
pelican object put ./aowen-uwmad_test.txt osdf:///<existing_namespace>/aowen-uwmad_test.txt
Additional context
-
For downloads, the client already infers the object name if not provided at the destination. That is,
pelican object get osdf:///<existing_namespace>/aowen-uwmad_test.txt ./behaves the same as
pelican object get osdf:///<existing_namespace>/aowen-uwmad_test.txt ./aowen-uwmad_test.txtas expected.
-
If the current behavior is a policy decision (e.g., "users should not upload objects without being explicit about the name"), I'll counter that implicit naming is already used for
--recursiveorsyncuploads anyways, so implementing this feature will not break a fundamental premise. -
If there is no desire to implement this feature, then I recommend that, at the very least, the client handles the existing error and suggests to the user something like
Did you mean to run "pelican object put aowen-uwmad_test.txt osdf:///<existing_namespace>/aowen-uwmad_test.txt"?.