Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-12390

Butler doesn't raise when failing to write data

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: daf_persistence
    • Labels:
      None

      Description

      If you supply insufficient data in the dataId for a butler to put() the data, it will just pretend to have done it (i.e. it doesn't raise or warn, it just silently returns as if all was fine).

      If one does

      butler.put(img, 'postISRCCD', dataId={'visit':123,'filter':'r'}) 
      

      where the postISRCCD template looks like
      template: "postISRCCD/postISRCCD_v%(visit)d_f%(filter)s.fits"
      then this will work. However, if you provide an empty dataId dict, it will not complain, but nothing will get written (of course).

      This seems like a moderately serious problem, as it is easy to accidentally under-specify or mis-specify a dataId.

      (FWIW, if I change 'postISRCCD' to an undefined dataset type I do get an error).

        Attachments

          Activity

          Hide
          swinbank John Swinbank added a comment -

          Hey Fritz Mueller — as of March it sounded like we might actually get this fixed. Any progress?

          Show
          swinbank John Swinbank added a comment - Hey Fritz Mueller — as of March it sounded like we might actually get this fixed. Any progress?
          Hide
          mfisherlevine Merlin Fisher-Levine added a comment -

          I mean, I really don't want people to waste time on something if it's only going to be replaced by Gen3 and soon, and if this will take any significant time, and I've worked around it for now, of course, but if it's quite easy to make it raise or at least say something, that would be quite nice

          Show
          mfisherlevine Merlin Fisher-Levine added a comment - I mean, I really don't want people to waste time on something if it's only going to be replaced by Gen3 and soon, and if this will take any significant time, and I've worked around it for now, of course, but if it's quite easy to make it raise or at least say something, that would be quite nice
          Hide
          mfisherlevine Merlin Fisher-Levine added a comment -

          Also, as was being said in the butler-room, given the existence of butler.getUri(), it's now trivial to test whether the .put() will be successful, so, although a little ugly, that could just be put as a test-and-raise/warn in the meantime with presumably minimal effort...

          Show
          mfisherlevine Merlin Fisher-Levine added a comment - Also, as was being said in the butler-room, given the existence of butler.getUri(), it's now trivial to test whether the .put() will be successful, so, although a little ugly, that could just be put as a test-and-raise/warn in the meantime with presumably minimal effort...
          Hide
          npease Nate Pease [X] (Inactive) added a comment -

          I'll work on this now...

          Show
          npease Nate Pease [X] (Inactive) added a comment - I'll work on this now...
          Hide
          npease Nate Pease [X] (Inactive) added a comment -
          Show
          npease Nate Pease [X] (Inactive) added a comment - Merlin Fisher-Levine  

            People

            Assignee:
            npease Nate Pease [X] (Inactive)
            Reporter:
            mfisherlevine Merlin Fisher-Levine
            Reviewers:
            Eli Rykoff
            Watchers:
            Eli Rykoff, Fritz Mueller, John Swinbank, Merlin Fisher-Levine, Nate Pease [X] (Inactive), Simon Krughoff
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.