openwallet-foundation / acapy

ACA-Py is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://aca-py.org
Apache License 2.0
421 stars 515 forks source link

Curious (harmless?) error in the integration tests #2846

Closed swcurran closed 8 months ago

swcurran commented 8 months ago

When reviewing the integration test suite logs, I noticed that messages like this occur 100 times per run:

7hAcme.agent | 2024-03-19 22:25:03,375 aries_cloudagent.connections.base_manager WARNING No corresponding DID found for sender verkey: 4VTidBkgyvgozGoBJSLJFL9o1NaxWTYh3WfSMe7MUpwm

Presumably that is not a concern as the tests passed, but wondered if it would worth a look to see if it is an issue.

A test where this appears is:

@T001-RFC0160 @GHA @UnqualifiedDids
  Scenario Outline: establish a connection between two agents -- @1.1   # features/0160-connection.feature:18
    Given we have "2" agents                                            # features/steps/0160-connection.py:28
      | name | role    | capabilities                | extra             |
      | Acme | inviter | --public-did --did-exchange | --emit-did-peer-2 |
      | Bob  | invitee | --did-exchange              | --emit-did-peer-2 |
jamshale commented 8 months ago

The block of code that logs these warnings is in the base_manager --> resolve_inbound_connection handler. So it happens for all types of connections. However, only did-exchange protocol saves did <--> verkey records. So the warning doesn't apply to any of the other connection protocols. Also, I'm not sure the did is ever saved for the sender so i'm not sure what that block of code is trying to do. I'm not going to remove it in case there's a usecase I'm not understanding.

TLDR: This isn't really a warning. It only applies to did-exchange connections after the did <--> verkey record has be saved for the reciepient.

swcurran commented 8 months ago

@dbluhm — while you are in DID Exchange land, maybe you would be comfortable in removing this. Or not…it’s annoying, but if harmless, not a big deal. Thanks — @jamshale for checking.

jamshale commented 8 months ago

I'm creating a small PR. I'll add @dbluhm as a reviewer.