Allow 8Knot to be compatible with both legacy and new CollectOSS database schemas#1176
Conversation
MoralCode
left a comment
There was a problem hiding this comment.
Sorry to do this to you, but the new name has changed from collection_data to just data. Can you update this PR?
| env_password = os.getenv("POSTGRES_PASSWORD", "password") | ||
| env_port = os.getenv("CACHE_PORT", "5432") | ||
| env_schema = os.getenv("CACHE_SCHEMA", "augur_data") | ||
| env_schema = os.getenv("CACHE_SCHEMA", "data,augur_data") |
There was a problem hiding this comment.
Is 8knot changing its cache schema names too?
There was a problem hiding this comment.
should we, or should we not? I was just working on changing or adapting everything to it
There was a problem hiding this comment.
This is an internal implementation detail that should only matter within 8knot. Also the cache gets erased regularly, so if this isnt already part of this PR, we can probably address it in a follow-up PR later
This change might be something thats worth doing as part of whatever PR series we do to rename 8knot internal stuff to remove old naming for the CollectOSS db.
MoralCode
left a comment
There was a problem hiding this comment.
Tested this with databases that used each different schema (prod read - old schema, and my local dev - with new schema and the materialized views that are needed)
i was using the stock compose file with minor irrelevant tweaks. No configured cache volume, so nothing that needed to be reset run to run.
Either way, 8Knot seems to function about the same on either database. Id say this is good to merge
This PR adapts 8knot for the new schema from CollectOSS by adding its schema name into the search path, as the first one to be used, and then defaults to augur_data if it doesn't work.
Pull Request Change Description
Generative AI disclosure
Please select one option:
If AI tools were used, please provide details below:
- What tools were used? Claude-Opus -4.8
- How were these tools used? Finding the places to fix for the new schema.
- Did you review these outputs before submitting this PR? Yes.