aries-cloudagent-python icon indicating copy to clipboard operation
aries-cloudagent-python copied to clipboard

:recycle: Refactor EventBus notify method

Open ff137 opened this issue 8 months ago • 1 comments

:construction:


Relates to #3659

ff137 avatar Apr 29 '25 12:04 ff137

Shoot — sorry, didn’t see that this was draft. Should have waited for the tests to complete before merging in main. Doh...

swcurran avatar Apr 29 '25 14:04 swcurran

Note: the PR tests in acapy_agent/protocols/present_proof/dif/tests/* are taking exceptionally long to complete. (Not related to these changes.)

Full pytest run usually takes ~3 minutes, and it currently takes around 25 minutes, since about 2 hours ago. Not sure why, but presumably there's some network load. And it's probably good at some point to mock the network calls for these unit tests, so the network is not a blocker for PRs

ff137 avatar Sep 09 '25 18:09 ff137

The problem with scenario tests is that now the revocation registries are not guaranteed to be ready by the time the tests tries to use them.

I'll see what can be done about this. I presume that creating a revocable cred def would previously wait for events associated with rev-reg-def's to be complete before returning. So that behaviour can maybe be preserved somehow.

ff137 avatar Sep 09 '25 18:09 ff137

EventBus.notify can now be made synchronous, but it would require updates to plugins that call it (would be breaking change if async is removed, since it shouldn't be awaited). So, I just added a todo

ff137 avatar Sep 09 '25 21:09 ff137

Finally, took a long time to fix the tests, but now it's actually ready for review!

ff137 avatar Sep 19 '25 19:09 ff137

I also think we should change it to not be asynchronous in a separate task later. Maybe as a targeted release. Just to make the plugin updates more isolated and if there is any potential problems with the work around this it will be easier to find.

We also want to get the Kanon profile stuff completed. I'm not sure how many merge conflicts this will cause with it, but if it's ready now, it might be better to merge that first.

Agreed on both 👍 Good to narrow the scope and do async def -> def change separately And I think good to merge the Kanon stuff first. It'll be a smaller headache for me to fix merge conflicts here, than yet again making them fix merge conflicts there. So I'm happy to wait for that merge first.

ff137 avatar Sep 22 '25 17:09 ff137

Rebased post-Kanon and ready to review again

ff137 avatar Oct 08 '25 10:10 ff137