WebOfTrust / keria

KERI Agent in the cloud
https://keria.readthedocs.io/en/latest/
Apache License 2.0
20 stars 31 forks source link

keripy 1.1.x -> 1.2.x migration SignifyGroupHab fix #284

Closed m00sey closed 3 months ago

m00sey commented 3 months ago

In conjunction with @lenkan 's original test repo, cc @iFergal .

https://github.com/m00sey/keria-upgrade-test/tree/sig-fix

Hby EEFCS78eJySGGx9Nl7r-eHRSDZ4xbisWwkqrwEWft-bG

     group1 - EC6hdfWAszbItZN9AMHF3hRqt5PDAaGsIK8858D9jT2a - <class 'keri.app.habbing.SignifyGroupHab'>

     Proposed smids and rmids updates for group1 - EC6hdfWAszbItZN9AMHF3hRqt5PDAaGsIK8858D9jT2a:
         smids: {'EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l', 'EGuzYjhz3tKQFhrh3HsdP2ys2v5WrXUTA3agsq-3RtS4'}
             -> EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l qar1
             -> EGuzYjhz3tKQFhrh3HsdP2ys2v5WrXUTA3agsq-3RtS4 qar3
         rmids: {'EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l', 'EGuzYjhz3tKQFhrh3HsdP2ys2v5WrXUTA3agsq-3RtS4'}
             -> EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l qar1
             -> EGuzYjhz3tKQFhrh3HsdP2ys2v5WrXUTA3agsq-3RtS4 qar3
     Updating HabitatRecord(hid='EC6hdfWAszbItZN9AMHF3hRqt5PDAaGsIK8858D9jT2a', name='group1', domain=None, mid='EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l', smids=None, rmids=None, sid='EC6hdfWAszbItZN9AMHF3hRqt5PDAaGsIK8858D9jT2a', watchers=[])

     skipping ED4AQf_aVbauZvO79AGHucq5gArqbYmmbQ-lEu9mMjNz - <class 'keri.app.habbing.Hab'>
     skipping EEFCS78eJySGGx9Nl7r-eHRSDZ4xbisWwkqrwEWft-bG - <class 'keri.app.habbing.SignifyHab'>
     skipping EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l - <class 'keri.app.habbing.SignifyHab'>

     group0 - EK2gkA-gSASwgCnr7hHAha_3krLxLSqmsbS-YH40qRdi - <class 'keri.app.habbing.SignifyGroupHab'>

     Proposed smids and rmids updates for group0 - EK2gkA-gSASwgCnr7hHAha_3krLxLSqmsbS-YH40qRdi:
         smids: {'EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l', 'ELhW9hbFlL6J46i6ScWZuSYBzEVpa36O62c4BCSVC0o7'}
             -> EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l qar1
             -> ELhW9hbFlL6J46i6ScWZuSYBzEVpa36O62c4BCSVC0o7 qar2
         rmids: {'EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l', 'ELhW9hbFlL6J46i6ScWZuSYBzEVpa36O62c4BCSVC0o7'}
             -> EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l qar1
             -> ELhW9hbFlL6J46i6ScWZuSYBzEVpa36O62c4BCSVC0o7 qar2
     Updating HabitatRecord(hid='EK2gkA-gSASwgCnr7hHAha_3krLxLSqmsbS-YH40qRdi', name='group0', domain=None, mid='EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l', smids=None, rmids=None, sid='EK2gkA-gSASwgCnr7hHAha_3krLxLSqmsbS-YH40qRdi', watchers=[])

Hby EKg4HKlaKDbTAhpFFTYVmiLCFSqjCHg6xBQa8xUMx4Se
     skipping EJcnFAOIO087C-lq2CMxyQsWm8qy8v6_OplUhst2pb0U - <class 'keri.app.habbing.Hab'>

     group0 - EK2gkA-gSASwgCnr7hHAha_3krLxLSqmsbS-YH40qRdi - <class 'keri.app.habbing.SignifyGroupHab'>

     Proposed smids and rmids updates for group0 - EK2gkA-gSASwgCnr7hHAha_3krLxLSqmsbS-YH40qRdi:
         smids: {'EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l', 'ELhW9hbFlL6J46i6ScWZuSYBzEVpa36O62c4BCSVC0o7'}
             -> EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l qar1
             -> ELhW9hbFlL6J46i6ScWZuSYBzEVpa36O62c4BCSVC0o7 qar2
         rmids: {'EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l', 'ELhW9hbFlL6J46i6ScWZuSYBzEVpa36O62c4BCSVC0o7'}
             -> EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l qar1
             -> ELhW9hbFlL6J46i6ScWZuSYBzEVpa36O62c4BCSVC0o7 qar2
     Updating HabitatRecord(hid='EK2gkA-gSASwgCnr7hHAha_3krLxLSqmsbS-YH40qRdi', name='group0', domain=None, mid='ELhW9hbFlL6J46i6ScWZuSYBzEVpa36O62c4BCSVC0o7', smids=None, rmids=None, sid='EK2gkA-gSASwgCnr7hHAha_3krLxLSqmsbS-YH40qRdi', watchers=[])

     skipping EKg4HKlaKDbTAhpFFTYVmiLCFSqjCHg6xBQa8xUMx4Se - <class 'keri.app.habbing.SignifyHab'>
     skipping ELhW9hbFlL6J46i6ScWZuSYBzEVpa36O62c4BCSVC0o7 - <class 'keri.app.habbing.SignifyHab'>

Hby ELkJ8zmKQePs6Vi7If3SGSUKH84LGs0I8Ef-QV94A_9O

     group1 - EC6hdfWAszbItZN9AMHF3hRqt5PDAaGsIK8858D9jT2a - <class 'keri.app.habbing.SignifyGroupHab'>

     Proposed smids and rmids updates for group1 - EC6hdfWAszbItZN9AMHF3hRqt5PDAaGsIK8858D9jT2a:
         smids: {'EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l', 'EGuzYjhz3tKQFhrh3HsdP2ys2v5WrXUTA3agsq-3RtS4'}
             -> EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l qar1
             -> EGuzYjhz3tKQFhrh3HsdP2ys2v5WrXUTA3agsq-3RtS4 qar3
         rmids: {'EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l', 'EGuzYjhz3tKQFhrh3HsdP2ys2v5WrXUTA3agsq-3RtS4'}
             -> EIJjVcJInX-ELwoQ9ZGQRKpuCEzmuqYa6Aq5zU5RqA8l qar1
             -> EGuzYjhz3tKQFhrh3HsdP2ys2v5WrXUTA3agsq-3RtS4 qar3
     Updating HabitatRecord(hid='EC6hdfWAszbItZN9AMHF3hRqt5PDAaGsIK8858D9jT2a', name='group1', domain=None, mid='EGuzYjhz3tKQFhrh3HsdP2ys2v5WrXUTA3agsq-3RtS4', smids=None, rmids=None, sid='EC6hdfWAszbItZN9AMHF3hRqt5PDAaGsIK8858D9jT2a', watchers=[])

     skipping EGuzYjhz3tKQFhrh3HsdP2ys2v5WrXUTA3agsq-3RtS4 - <class 'keri.app.habbing.SignifyHab'>
     skipping ELkJ8zmKQePs6Vi7If3SGSUKH84LGs0I8Ef-QV94A_9O - <class 'keri.app.habbing.SignifyHab'>
     skipping EPCzcq3dBwrf7WPqOSBNfZq5qqPYsrv2Hp8cKuyHWHhz - <class 'keri.app.habbing.Hab'>
keria-1  | The Agency is loaded and waiting for requests...
keria-1  |   Agent: ED4AQf_aVbauZvO79AGHucq5gArqbYmmbQ-lEu9mMjNz   Controller: EEFCS78eJySGGx9Nl7r-eHRSDZ4xbisWwkqrwEWft-bG

Closes #257

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.17%. Comparing base (18d3ad7) to head (1dd60bb). Report is 14 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #284 +/- ## ========================================== + Coverage 93.06% 93.17% +0.11% ========================================== Files 36 36 Lines 7121 7741 +620 ========================================== + Hits 6627 7213 +586 - Misses 494 528 +34 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

iFergal commented 3 months ago

Nice, thank you! Works on my machine too.

I would say this works for the given issue and long term we should have a proper migration strategy on KERIA too for when SignifyGroupHab etc have moved (based on https://github.com/WebOfTrust/keripy/issues/824). Otherwise it's not clear to those upgrading which cli migrate/fix scripts need to be called when - ideally a keria migrate would migrate keripy and KERIA in a deterministic way.

2byrds commented 3 months ago

Nice, thank you! Works on my machine too.

I would say this works for the given issue and long term we should have a proper migration strategy on KERIA too for when SignifyGroupHab etc have moved (based on WebOfTrust/keripy#824). Otherwise it's not clear to those upgrading which cli migrate/fix scripts need to be called when - ideally a keria migrate would migrate keripy and KERIA in a deterministic way.

Good stuff @m00sey! Per Fergal comment should this PR be renamed to be similar to the branch name that is being merged, to avoid confusion? Something like "keripy 1.1.x -> 1.2.x migration SignifyGroupHab fix"?

We are collecting a good set of tools/fixes/guidance to help community members decide when they are ready to migrate.

lenkan commented 3 months ago

🚀

@m00sey or @2byrds are you OK with pushing a new 0.2.0-devX docker tag with this fix? Thank you!

lenkan commented 2 months ago

FYI - I have update the upgrade test repo with these changes and simplified it a little bit: https://github.com/lenkan/keria-upgrade-test

When do you think you can push the new docker tag?

2byrds commented 2 months ago

@lenkan I don't think I can push an image to WebOfTrust docker. Perhaps @m00sey can? I would support a keria github action that will push a new dev image on every PR merged to main. Similar to: