Testing obscore migration on a copy of embargo repo on my test server.
Starting from a clean state:
$ butler migrate show-current $REPO
|
c5ae3a2cd7c2 (head)
|
f22a777cf382 (head)
|
035dcf13ef18 (head)
|
77e5b803ad3f (head)
|
a07b3b60e369 (head)
|
2101fbf51ad3 (head)
|
8c57494cabcc (head)
|
|
$ butler migrate show-current --butler $REPO
|
attributes: lsst.daf.butler.registry.attributes.DefaultButlerAttributeManager 1.0.0 -> f22a777cf382
|
collections: lsst.daf.butler.registry.collections.synthIntKey.SynthIntKeyCollectionManager 2.0.0 -> 8c57494cabcc
|
datasets: lsst.daf.butler.registry.datasets.byDimensions._manager.ByDimensionsDatasetRecordStorageManagerUUID 1.0.0 -> 2101fbf51ad3
|
datastores: lsst.daf.butler.registry.bridge.monolithic.MonolithicDatastoreRegistryBridgeManager 0.2.0 -> a07b3b60e369
|
dimensions: lsst.daf.butler.registry.dimensions.static.StaticDimensionRecordStorageManager 6.0.2 -> 035dcf13ef18
|
dimensions-config: daf_butler 3 -> c5ae3a2cd7c2
|
opaque: lsst.daf.butler.registry.opaque.ByNameOpaqueTableStorageManager 0.2.0 -> 77e5b803ad3f
|
So need to apply migration for both obscore and obscore-config managers. Start with obscore:
$ butler migrate show-history obscore
|
8b8e030aba2b -> a0d766f99876 (obscore-ObsCoreLiveTableManager, obscore) (head), Migration script for ObsCoreLiveTableManager 0.0.1.
|
<base> -> 8b8e030aba2b (obscore-ObsCoreLiveTableManager, obscore), This is an initial pseudo-revision of the 'obscore' tree.
|
Add it to alembic:
$ butler migrate stamp $REPO obscore
|
And migrate (this only updates butler_attributes):
$ butler migrate upgrade $REPO a0d766f99876
|
*** Do not forget to add this line to butler.yaml file (registry.managers):
|
*** obscore: lsst.daf.butler.registry.obscore._manager.ObsCoreLiveTableManager
|
Edit butler.yaml and add above line.
Add butler-config to alembic:
$ butler migrate stamp $REPO obscore-config
|
And migrate (add obscore table), this needs an option for config file location:
$ butler migrate upgrade --options obscore_config=../dax_obscore/configs/usdf-embargo-live.yaml $REPO/butler.yaml 4fe28ef5030f
|
*** Before anything can be written the upgraded Registry you need to run
|
*** `butler obscore update-table` command (defined in dax_obscore package).
|
$ butler migrate show-current $REPO
|
a0d766f99876 (head)
|
035dcf13ef18 (head)
|
f22a777cf382 (head)
|
77e5b803ad3f (head)
|
a07b3b60e369 (head)
|
2101fbf51ad3 (head)
|
8c57494cabcc (head)
|
4fe28ef5030f (head)
|
c5ae3a2cd7c2 (head)
|
Now populate it with the existing data:
$ time butler obscore update-table $REPO
|
lsst.dax.obscore.script.obscore_update_table INFO: Found these dataset types in registry: ['raw', 'calexp', 'quickLookExp']
|
lsst.dax.obscore.script.obscore_update_table INFO: Added 34442 records for dataset type 'raw' and collection 'LATISS/raw/all' in 45 seconds
|
lsst.dax.obscore.script.obscore_update_table INFO: Added 26807 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20221202T163114Z' in 35 seconds
|
lsst.dax.obscore.script.obscore_update_table INFO: Added 62 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20221208T010235Z' in 0 seconds
|
lsst.dax.obscore.script.obscore_update_table INFO: Added 97 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20221209T014939Z' in 0 seconds
|
lsst.dax.obscore.script.obscore_update_table INFO: Added 6 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20221209T015505Z' in 0 seconds
|
lsst.dax.obscore.script.obscore_update_table INFO: Added 3342 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20230110T184842Z' in 5 seconds
|
lsst.dax.obscore.script.obscore_update_table INFO: Added 2364 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20230122T121549Z' in 3 seconds
|
lsst.dax.obscore.script.obscore_update_table INFO: Added 40 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20230201T130220Z' in 0 seconds
|
lsst.dax.obscore.script.obscore_update_table INFO: Added 1156 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20230201T131634Z' in 2 seconds
|
lsst.dax.obscore.script.obscore_update_table INFO: Added 93 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20230201T163949Z' in 0 seconds
|
real 1m30.454s
|
user 1m11.914s
|
sys 0m2.183s
|
Testing obscore migration on a copy of embargo repo on my test server.
Starting from a clean state:
$ butler migrate show-current $REPO
c5ae3a2cd7c2 (head)
f22a777cf382 (head)
035dcf13ef18 (head)
77e5b803ad3f (head)
a07b3b60e369 (head)
2101fbf51ad3 (head)
8c57494cabcc (head)
$ butler migrate show-current --butler $REPO
attributes: lsst.daf.butler.registry.attributes.DefaultButlerAttributeManager 1.0.0 -> f22a777cf382
collections: lsst.daf.butler.registry.collections.synthIntKey.SynthIntKeyCollectionManager 2.0.0 -> 8c57494cabcc
datasets: lsst.daf.butler.registry.datasets.byDimensions._manager.ByDimensionsDatasetRecordStorageManagerUUID 1.0.0 -> 2101fbf51ad3
datastores: lsst.daf.butler.registry.bridge.monolithic.MonolithicDatastoreRegistryBridgeManager 0.2.0 -> a07b3b60e369
dimensions: lsst.daf.butler.registry.dimensions.static.StaticDimensionRecordStorageManager 6.0.2 -> 035dcf13ef18
dimensions-config: daf_butler 3 -> c5ae3a2cd7c2
opaque: lsst.daf.butler.registry.opaque.ByNameOpaqueTableStorageManager 0.2.0 -> 77e5b803ad3f
So need to apply migration for both obscore and obscore-config managers. Start with obscore:
$ butler migrate show-history obscore
8b8e030aba2b -> a0d766f99876 (obscore-ObsCoreLiveTableManager, obscore) (head), Migration script for ObsCoreLiveTableManager 0.0.1.
<base> -> 8b8e030aba2b (obscore-ObsCoreLiveTableManager, obscore), This is an initial pseudo-revision of the 'obscore' tree.
Add it to alembic:
$ butler migrate stamp $REPO obscore
And migrate (this only updates butler_attributes):
$ butler migrate upgrade $REPO a0d766f99876
*** Do not forget to add this line to butler.yaml file (registry.managers):
*** obscore: lsst.daf.butler.registry.obscore._manager.ObsCoreLiveTableManager
Edit butler.yaml and add above line.
Add butler-config to alembic:
$ butler migrate stamp $REPO obscore-config
And migrate (add obscore table), this needs an option for config file location:
$ butler migrate upgrade --options obscore_config=../dax_obscore/configs/usdf-embargo-live.yaml $REPO/butler.yaml 4fe28ef5030f
*** Before anything can be written the upgraded Registry you need to run
*** `butler obscore update-table` command (defined in dax_obscore package).
$ butler migrate show-current $REPO
a0d766f99876 (head)
035dcf13ef18 (head)
f22a777cf382 (head)
77e5b803ad3f (head)
a07b3b60e369 (head)
2101fbf51ad3 (head)
8c57494cabcc (head)
4fe28ef5030f (head)
c5ae3a2cd7c2 (head)
Now populate it with the existing data:
$ time butler obscore update-table $REPO
lsst.dax.obscore.script.obscore_update_table INFO: Found these dataset types in registry: ['raw', 'calexp', 'quickLookExp']
lsst.dax.obscore.script.obscore_update_table INFO: Added 34442 records for dataset type 'raw' and collection 'LATISS/raw/all' in 45 seconds
lsst.dax.obscore.script.obscore_update_table INFO: Added 26807 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20221202T163114Z' in 35 seconds
lsst.dax.obscore.script.obscore_update_table INFO: Added 62 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20221208T010235Z' in 0 seconds
lsst.dax.obscore.script.obscore_update_table INFO: Added 97 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20221209T014939Z' in 0 seconds
lsst.dax.obscore.script.obscore_update_table INFO: Added 6 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20221209T015505Z' in 0 seconds
lsst.dax.obscore.script.obscore_update_table INFO: Added 3342 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20230110T184842Z' in 5 seconds
lsst.dax.obscore.script.obscore_update_table INFO: Added 2364 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20230122T121549Z' in 3 seconds
lsst.dax.obscore.script.obscore_update_table INFO: Added 40 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20230201T130220Z' in 0 seconds
lsst.dax.obscore.script.obscore_update_table INFO: Added 1156 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20230201T131634Z' in 2 seconds
lsst.dax.obscore.script.obscore_update_table INFO: Added 93 records for dataset type 'quickLookExp' and collection 'LATISS/runs/quickLook/20230201T163949Z' in 0 seconds
real 1m30.454s
user 1m11.914s
sys 0m2.183s