Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ap_verify
-
Labels:None
-
Story Points:4
-
Epic Link:
-
Sprint:AP F20-3 (August)
-
Team:Alert Production
-
Urgent?:No
Description
The Gen 3 version of ap_verify cannot be run on the same workspace more than once, despite being designed for reuse like the Gen 2 version. The problem I've encountered happens at Butler initialization; there may be others downstream:
File "python/lsst/ap/verify/ingestion.py", line 602, in ingestDatasetGen3
|
ingester = Gen3DatasetIngestTask(dataset, workspace, config=_getConfig(Gen3DatasetIngestTask, dataset))
|
File "python/lsst/ap/verify/ingestion.py", line 462, in __init__
|
self.dataset.makeCompatibleRepoGen3(self.workspace.repo)
|
File "python/lsst/ap/verify/dataset.py", line 266, in makeCompatibleRepoGen3
|
repoConfig = dafButler.Butler.makeRepo(repoDir, overwrite=True)
|
File "python/lsst/daf/butler/_butler.py", line 371, in makeRepo
|
Registry.fromConfig(config, create=createRegistry, butlerRoot=root)
|
File "python/lsst/daf/butler/registry/_registry.py", line 147, in fromConfig
|
versions=versions, writeable=writeable, create=create)
|
File "python/lsst/daf/butler/registry/_registry.py", line 161, in __init__
|
with self._db.declareStaticTables(create=create) as context:
|
File "python/lsst/daf/butler/registry/interfaces/_database.py", line 410, in declareStaticTables
|
raise SchemaAlreadyDefinedError(f"Cannot create tables in non-empty database {self}.")
|
Ensure that both ingest_datasets.py and ap_verify.py work when rerun on old workspaces.
Are you mixing registry versions? It should only be creating tables if the tables don't previously exist. How are you deciding to call makeRepo? In butler convert we have:
but you aren't getting FileExistsError indicating that there is no pre-existing butler.yaml but there is a pre-existing registry.