Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: daf_butler
-
Story Points:4
-
Epic Link:
-
Team:Data Release Production
Description
Use the new Database class (DM-22508) as the backend for Registry, with a lot of pragmatism about how much to change. The goal will be to make this as transparent to Butler users as possible (I don't yet see a reason why it can't be completely transparent), and stick to:
- Making Registry a concrete class, basically just merging Registry's docs with SqlRegistry's implementations.
- Using Database instances to create engines and connections for Registry (and connecting RegistryConfig's connectionString logic with Database's).
- Using Database to emit all DDL (this probably means moving schema.yaml content to Python).
At this point, we'll just brazenly steal the (protected) connection object out of the `Database` instance to let most existing SqlRegistry method implementations remain unchanged. That will get fixed later as we port Manager objects over from the u/jbosch/prototyping branch.
This should take care of all of the code duplication that currently exists (core/schema.py and registry/ddl.py, registries/* and registry/databases/*).
Tim Jenness, I'm afraid you're next up on my list of
victimsreviewers. This one is big, but as the PR comment explains it's also a lot smaller than it seems in terms of actual content.I'm still looking for breakage in downstream packages (I don't expect much, but there will probably be a little), but this will be coming your way eventually, and you're welcome to get started now if you like.
I will be disappearing on Thursday for vacation, and while I may work a bit, I may be slow in replying to review comments, and there's no rush to get this done until after the holidays.