feat: migrate command for all agents
This PR adds a keria migrate command that will fetch all of the agents from the agency DB and kick off the migrate doer used in kli migrate. Slightly weird to mimic a kli command from keria but it works, and means we will pick up changes to kli migrate.
I also pinned the keripy version again - this got unpinned by mistake it seems. But as mentioned before we need it for determinism of builds.
Here is a screenshot example of incepting 2-of-2 multi-sig on an old version, trying to connect without migrating and successfully migrating:
Note: SignifyGroupHabs are not correctly migrated on keripy - but this is separate for now and has been raised in #257 - I gave some details on why in that issue yesterday.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 93.10%. Comparing base (18d3ad7) to head (d8e65cc).
:warning: Report is 71 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #272 +/- ##
==========================================
+ Coverage 93.06% 93.10% +0.04%
==========================================
Files 36 36
Lines 7121 7221 +100
==========================================
+ Hits 6627 6723 +96
- Misses 494 498 +4
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Looks good to me @iFergal. I suppose this is more of an administrative feature, hence the command line tool. Do you have any thoughts how we can test a command like this in case migrate changes?
Also @iFergal could you post a screenshot(s) showing the command being successfully used on this PR?
Thanks @2byrds I added a screenshot and note to the description.
Yeah based on recommendations from Phil, migrations should be manual, hence the cli.
Regarding testing - I think we would need a minimal agent and set the migration version to the lowest, run keria migrate and then the basic check could be that the version is up to date. I'm not sure if creating an agent would conflict with any schemas that are assumed to be not migrated already (so far, maybe not, but maybe in the future) - but I could look into it.
On the other hand it's probably unlikely that the kli migrate command will be subject to much change since it just opens the DB and calls db.migrate().
Based on discussions yesterday and https://github.com/WebOfTrust/keripy/issues/824 more thought should be put into this.
If SignifyGroupHab and other files move to KERIA, we may need a separate set of migrations for KERIA on top of calling db.migrate() from keripy.
@iFergal Is this ready to merge? Looks like there are merge conflicts that need to be resolved.
If this migrate command works, let's get it in.
@kentbull I hadn't had the time to revisit this since we had the discussion that parts of keripy need to be moved here, in which case this migration needs to be handled differently. I would be in favour of closing it until someone has capacity to handle it properly.
Okay, I'll close this for now.