-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add canary migration for spike [MRXN23-453] #1508
add canary migration for spike [MRXN23-453] #1508
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@alexeh this is just a stub migration to validate that we can reliably work within the boundaries of TypeORM magic and "just" use an Asking you to review to make sure I'm not forgetting any use case where we may run migrations through other means and we end up not having the configuration of the apidb connection available... |
Thanks @hotzevzl! Magic seems feasible. However, I'd like to clarify the operational bits of this. When we do the scary data migration we expect:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my 2 cents:
#1508 (comment)
@alexeh thanks, and yes, even after discussing yesterday with Kevin these concerns you raised about "syncing" migrations from both services and on both databases, I now realise that I hadn't considered the full picture in general, where we don't (currently) have control over which of the api and geoprocessing service has finished running all their migrations. So the idea of doing all the changes in one single migration in the geoprocessing service goes only to a certain point, if this still relies on earlier schema changes that were part of migrations in the api service.
Alternatives I can see could be:
thoughts? cc @KevSanchez |
Closing this as the purpose was to validate the use of different connections, but in general the setup seems like a Very Bad Idea (tm) because we'd now need to coordinate migrations between different services, and in environments as different as staging/prod, local dev and CI, which seems a recipe for disaster. We'll adjust the approach separately (for example, only run data migrations in controlled environments where we can ensure a specific sequencing of api and geoprocessing migrations). |
not to be merged - this is only a spike to validate the use of an ad-hoc
DataSource
to be able to driveapidb
alongsidegeodb
from within a TypeORM migration for the geoprocessing service, since we haven't used this setup ever so far.This will be needed if porting the proposed Python data migration script for existing projects and scenario-specific cost surfaces (#1501).
What this spike wants to achieve is:
DataSource
forapidb
works as expected at runtime (this was validated in our Compose-based development setup)DataSource
works correctly in CI too (because I got lost in the multitude of ways we may run migrations, as part of standing up services, as steps of a script, etc. as well as the multiple ormconfig instances and flavours)