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

Robustify sqlite use

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: daf_persistence
    • Labels:
      None
    • Templates:
    • Team:
      Data Access and Database

      Description

      Sogo Mineo hit some test failures because of a broken sqlite3 module. He writes:

      At the beginning of
      daf_persistence/13.0-2-g7f7a1db+1/python/lsst/daf/persistence/registries.py ,
      "haveSqlite3" was set to False because "import sqlite3" failed.

      At line 77, the IF block was skipped because "haveSqlite3" is False.
      The execution continued to reach line 89,
      and PosixRegistry(root="filename.sqlite3") was created.

      I think one of the following modifications is desirable:

      1. Raise error when "not haveSqlite3 and re.match(r'.*\.sqlite3', location)"
      before line 77.

      2. Alter os.path.exists(location) to os.path.isdir(location) at line 88.

      Line numbers refer to the HSC master branch, at https://github.com/HyperSuprime-Cam/daf_persistence

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                price Paul Price
                Reporter:
                price Paul Price
                Reviewers:
                Nate Pease
                Watchers:
                Nate Pease, Paul Price
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel