Closed tvolk131 closed 3 months ago
I know we discuss on the dev call awhile back that this might be a good candidate to do a database migration for. Any thoughts?
Some tests likely need to change as well
I know we discuss on the dev call awhile back that this might be a good candidate to do a database migration for. Any thoughts?
Ahh yes, I forgot about that! Thanks for the reminder, I'll give that a shot.
Attention: 13 lines
in your changes are missing coverage. Please review.
Comparison is base (
c83d7a9
) 60.16% compared to head (12566d7
) 60.10%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This is ready for review, except I'm not sure what strategy we want to use to test the migration. The V0 data uses the same pubkey for node_pub_key
and gateway_id
:
...
So asserting that gateways are keyed by gateway_id
in the migration test passes even if the migration doesn't run. I think it would be worth rewriting create_db_with_v0_data()
to generate more realistic data. Does this seem reasonable?
So asserting that gateways are keyed by gateway_id in the migration test passes even if the migration doesn't run. I think it would be worth rewriting create_db_with_v0_data() to generate more realistic data. Does this seem reasonable?
When adding a migration, you should create a new test, called create_db_with_v1_data
that tests the migration from a "v1 backup", where the V1 backup contains a db backup of the new data.
That said, this is a bit weird, since the database change here is actually backwards compatible, since they're both the same kind of key. Usually the database change would cause the v0 db backup to be invalid, which is not the case for this change. So I would agree that we should change the v0 test to use different keys for node_pub_key
and gateway_id
.
Do you want to backport to 0.1? Otherwise don't worry about DB migrations.
This PR currently only consists of DB migration code it seems, what's the status here?
v0.1
branchI think we decided we don't want to backport, so we're going to skip the migration. Apologies for the delay on this one - I've been busy and simply haven't gotten around to removing the migration.
@tvolk131 What is the status of this?
Since we stabilized Fedimint since then we'll need migrations now :see_no_evil:
Yes but this should be pretty straight forward, might be a good candidate if we want to ship a simple migration
@tvolk131 What is the status of this?
No update, haven't touched this in a while but I can circle back to it this week!
Since we stabilized Fedimint since then we'll need migrations now 🙈
Ope! Sorry I didn't get around to this sooner! But as Justin mentioned, could be a great test for a simple migration.
Fixes #3290