Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clients: allow upload without configuring the account
Motivation: Commit 0032693 updated the client so that it was no longer necessary for the client to specify the account; the support for this already existed in the server. Unfortunately, this patch was incomplete: it is still required that the user configures the desired account when uploading data, even when the user's identity maps to a single identity. Moreover, failure to configure the account leads to an obscure error message: can only concatenate str (not "NoneType") to str This provides the user with no useful information on how to correct the problem. Enabling verbose output leads to the client providing arguably incorrect information: This means the parameter you passed has a wrong type. Modification: The UploadClient class now discovers an account for the user's identity if no account was specified. It does this by making a whoami query against the Rucio server, and using the supplied account. If the server is unable to provide the account information for this user then the operation will fail with a clear error message that provides information on how to correct the situation. Functional tests have been added to verify correct behaviour. Note that, due to issue rucio#7394, the tests are skipped for the M-VO deployment scenarios; however, manual testing with a real-life M-VO deployment (interTwin) show that this patch also works for that Rucio instance. Result: It is now possible to upload data without the client configuring the desired account. Under these circumstances, the default account for that user identity is used. Closes: rucio#7349 Signed-off-by: Paul Millar <paul.millar@desy.de>
- Loading branch information