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

Fix gen3-middleware ci_hsc SConscript

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: ci_hsc
    • Labels:
    • Templates:
    • Story Points:
      1
    • Sprint:
      BG3_F18_07
    • Team:
      Data Release Production

      Description

      From Andy Salnikov on Slack:

      OK, I think I know what is happening. If I do `rm DATA/gen3.sqlite3 DATA/butler.yaml; makeButlerRepo.py DATA; bin/gen3.py` then it runs successfully (or it fails with different exception). If I do `rm DATA/gen3.sqlite3 DATA/butler.yaml; scons gen3repo` then it fails with the above exception (no such table: Camera). I watched DATA directory and I see that `gen3.sqlite3` is removed between execution of `makeButlerRepo.py` and `gen3.py`. Looking at SConscript I think this happens because scons believes that `gen3.sqlite3` is produced by `gen3.py` when in reality it is produced by `makeButlerRepo.py` and updated by `gen3.py`. Scons by default removes target file before rebuilding it, so it does that before executing `gen3.py`.
      I'm not sure what is the best way to fix this but scons has `Precious` function to prevent removal of target before rebuilding (https://scons.org/doc/3.0.1/HTML/scons-user.html#chap-file-removal), maybe we should use that

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jbosch Jim Bosch
                Reporter:
                jbosch Jim Bosch
                Reviewers:
                Andy Salnikov
                Watchers:
                Andy Salnikov, Jim Bosch
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel