bk
Details
Diff Detail
- Repository
- R1 dagster
- Branch
- prha/reset_migration
- Lint
Lint Passed - Unit
No Test Coverage
Event Timeline
is this safe? are all of our migrations idempotent? I faintly remember doing this manually and was getting errors on various migrations so I had to find the actual version right version to start from
well we should at least test for sqlite and PG reseting various snapshots back to base and then doing an instance migrate.
It just seems odd to me that if create my DBs at 0.10.0 and then do this reset the instance migrate, I will play like the 0.6.0 migration. I guess we can update all the migration code to ensure they do some check before running forward
An option that lets you pass in a custom rev does seem like a good idea too (in the case before, we could have set them to the pre-0.10.0 rev that we expected them to be at)
would be nice to have a mapping alembic version to dagster version
when i had to find it I was using git tag --contains and looking at blame, it sucked
The specific migration revision is a bit tricky, because you could have three different physical dbs for the different storages, all with a different alembic version.
You could also technically be using sqlite for one and postgres for the other, which would have a different set of valid revisions. It'd be way easier if we just had a single storage concept with a single version id.
Not sure how much complexity we want to expose here, and if it's worth going through (the current state is that we manually tell people to drop the appropriate table).
This isn't the cleanest solution, because it requires a bunch of manual resolving, but I don't think there's a better way of building up this mapping.
impressive spelunking. This seems like an improvement overall, sorry it took so long for me to get back to it
python_modules/dagster/dagster/core/storage/event_log/sqlite/migration.py | ||
---|---|---|
1 | did you update the quip to reflect this / will a test break if you create a new migration and don't update this? check out test_alembic_up_to_date in the internal repo for a way you might accomplish that | |
1 | consider naming these differently (runs/schedules/event_logs) the module helps but it seems easy to accidentally swap in the wrong one |