Skip to content

deliver() on a wrong DID does not raise exceptions #585

Open
@ArturU043

Description

@ArturU043

Bug when inputing a Rucio DID with a typo.

The deliver call does not raise any errors, and it is not caught in a try Except.
Instead it returns a dictionary with the correct key (sample name) but with empty values.

A raise should be done on deliver to avoid this and warn the user about an error in the backend.


Example code, on version 3.1.0:

from servicex import deliver, query, dataset

query = query.UprootRaw(
    [
        {
            "treename": "reco",
            "filter_name": [
                "mu_phi",
                "mu_eta",
            ],
        }
    ]
)
spec = {
    "Sample": [
        {
            "Name": "uprootrawquery1",
            "Dataset": dataset.Rucio("user.mtost:NONEXISTING"),
            "NFiles": 1,
            "Query": query,
        },
    ],
}

print(f"Files: {deliver(spec)}")

Output:

uprootrawquery1: Transform ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/0 --:--
                  Download ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/0 --:--
Files: {'uprootrawquery1': []}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions