-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: connection type #994
feat: connection type #994
Conversation
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
We went with putting the connection type in as a tag so that you can query a specific connection type, as was discussed in a previous working group call. |
Codecov Report
@@ Coverage Diff @@
## main #994 +/- ##
=======================================
Coverage 88.70% 88.71%
=======================================
Files 521 522 +1
Lines 12130 12156 +26
Branches 2003 1913 -90
=======================================
+ Hits 10760 10784 +24
- Misses 1308 1368 +60
+ Partials 62 4 -58
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: KolbyRKunz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we should add this, but open to be convinced otherwise.
There is already a way to know if a connection is a mediator connection. You can check if there is a mediaton record assoaciated with the connection id.
Adding the tag means it can get out of sync. What if we remove the mediation record? Then the tag should also be removed. What if the connection is also used for other purposes than just mediation? To me this feels like something that should be handled on the application level.
I agree with @TimoGlastra in that this seems a bit application-specific. We are also using in our app this concept of 'connection type' but use other roles than the 'Mediator' used in this case, and I guess others might use it differently as well. That being said, I think it will be nice to improve in AFJ the access to setting and querying tags from outside the framework. Currently, in order to set a tag to a record we have to set the new tag in the record, then resolve the associated service or repository and call update(), etc. And also a similar procedure to find by tag (using findByQuery or findSingleByQuery). I won't say that this is impossible or very hard currently, but tags are a good feature to classify and efficiently search for records and it would be nice to leverage its usage in a general-purpose manner. |
Agreed @genaris, we should probably expose the findByQuery and update methods on the public api of all modules. |
What we are thinking we are wanting to do is go and change the connectionType tag to be of [ConnectionType | string] so that the end application developer can add their own custom tags while supporting our own defined tags. The other goal we have is to create methods within the module that will allow for the getting and setting of these tags from the application level along with methods to generically handle the accessing of tags at the application level. The Idea behind making a specific method for updating the connectionType is to make is obvious for the developer using AFJ to see that it is a value for them to use instead of having every developer have to learn what every tag on a connection record is, while at the same time still allowing those who know what is going on internally in AFJ to have access to the other tags on the record. In the future if more tags are added then we can create more specific methods for those tags at that time or for other existing tags. @TimoGlastra @genaris |
Well, if this solves the problem for you I think it's fine to add this convenient @TimoGlastra suggested today to use string array for this tag, which might be even more useful as we could be more specific when searching for connections (e.g. a connection could be a Mediator and also an Issuer or a Verifier or whatever the application uses). I have not used arrays for tags so I don't know about the complexity of using it, but I think it's worth to take a look at this possibility. To make this really usable besides this particular case, I think it will be important to add a module-level method in Connections that allows to search for connection type. For instance something like |
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
@TimoGlastra @genaris Made some updates to this, the main thing being that connectionType is now an array accepting strings or values from the connectionType enum. I also added some methods to the connectionModule that allows you to give a connectionId and view the Tags on that record along with methods to modify the connectionType array from the module. Currently I figured the only Tag we want to expose to direct modification is the connectionType tag, the other two methods added are purely for viewing the tags on the record by either getting all of them or just one specified. Let me know if there is any feedback you have. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice and useful. I left a few comments regarding getTagFromRecord
and getAllTagsFromRecord
that IMHO are not necessary.
If possible, I would like to add the request of adding a method called findAllByConnectionType
that allow us to query all connections that match the specified type/s. This would be useful for classifying the connections and querying in an efficient way. For instance, suppose that we want to retrieve only the mediators or the connections that the user tagged as 'friends': this query will do a direct request on the wallet backend instead of retrieving all the records and then filtering in the frontend.
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Hey @TimoGlastra, the CI appears to be failing on this PR, in particular though the Postgres wallet is failing to get setup, so it appears to be unrelated to changes made in this PR. Is this related to the same CI issues w/the BBS signatures branch(es)? |
Seems to be something different, as this is on the main branch and the issue with BBS signatures was in 0.3.0-pre branch. I noticed that yesterday there were other weird issues in CI with other PR as well. Looking at the logs I see that it is getting a new version of rust:
Probably it has to do with that? There is a related issue here which apparently has to do with some new dependencies. Dependency hell not only present in JavaScript 😄
|
@JamesKEbert @genaris @TimoGlastra this is the issue with the rust dependencies in 1.64.0 but it works fine with 1.63.0 Can I create a PR to by default use rust version 1.63.0 I ran the tests here https://github.com/sairanjit/aries-framework-javascript/actions/runs/3115296783/jobs/5052043298 it is working fine changes are here #1036 |
@KolbyRKunz could you update the branch so CI is relaunched? It should work now with the fix done by @sairanjit. Also I have my last suggestion: to add |
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
* feat: OOB public did (#930) Signed-off-by: Pavel Zarecky <[email protected]> * feat(routing): manual mediator pickup lifecycle management (#989) Signed-off-by: Ariel Gentile <[email protected]> * docs(demo): faber creates invitation (#995) Signed-off-by: conanoc <[email protected]> * chore(release): v0.2.3 (#999) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(question-answer): question answer protocol state/role check (#1001) Signed-off-by: Ariel Gentile <[email protected]> * feat: Action Menu protocol (Aries RFC 0509) implementation (#974) Signed-off-by: Ariel Gentile <[email protected]> * fix(ledger): remove poolConnected on pool close (#1011) Signed-off-by: Niall Shaw <[email protected]> * fix(ledger): check taa version instad of aml version (#1013) Signed-off-by: Jakub Koci <[email protected]> * chore: add @janrtvld to maintainers (#1016) Signed-off-by: Timo Glastra <[email protected]> * feat(routing): add settings to control back off strategy on mediator reconnection (#1017) Signed-off-by: Sergi Garreta <[email protected]> * fix: avoid crash when an unexpected message arrives (#1019) Signed-off-by: Pavel Zarecky <[email protected]> * chore(release): v0.2.4 (#1024) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * style: fix some lint errors Signed-off-by: Ariel Gentile <[email protected]> * feat: use did:key flag (#1029) Signed-off-by: Ariel Gentile <[email protected]> * ci: set default rust version (#1036) Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * fix(oob): allow encoding in content type header (#1037) Signed-off-by: Timo Glastra <[email protected]> * feat: connection type (#994) Signed-off-by: KolbyRKunz <[email protected]> * chore(module-tenants): match package versions Signed-off-by: Ariel Gentile <[email protected]> * feat: improve sending error handling (#1045) Signed-off-by: Ariel Gentile <[email protected]> * feat: expose findAllByQuery method in modules and services (#1044) Signed-off-by: Jim Ezesinachi <[email protected]> * feat: possibility to set masterSecretId inside of WalletConfig (#1043) Signed-off-by: Andrii Uhryn <[email protected]> * fix(oob): set connection alias when creating invitation (#1047) Signed-off-by: Jakub Koci <[email protected]> * build: fix missing parameter Signed-off-by: Ariel Gentile <[email protected]> Signed-off-by: Pavel Zarecky <[email protected]> Signed-off-by: Ariel Gentile <[email protected]> Signed-off-by: conanoc <[email protected]> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Niall Shaw <[email protected]> Signed-off-by: Jakub Koci <[email protected]> Signed-off-by: Timo Glastra <[email protected]> Signed-off-by: Sergi Garreta <[email protected]> Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> Signed-off-by: KolbyRKunz <[email protected]> Signed-off-by: Jim Ezesinachi <[email protected]> Signed-off-by: Andrii Uhryn <[email protected]> Co-authored-by: Iskander508 <[email protected]> Co-authored-by: conanoc <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Niall Shaw <[email protected]> Co-authored-by: jakubkoci <[email protected]> Co-authored-by: Timo Glastra <[email protected]> Co-authored-by: Sergi Garreta Serra <[email protected]> Co-authored-by: Sai Ranjit Tummalapalli <[email protected]> Co-authored-by: KolbyRKunz <[email protected]> Co-authored-by: Jim Ezesinachi <[email protected]> Co-authored-by: an-uhryn <[email protected]>
* feat: OOB public did (openwallet-foundation#930) Signed-off-by: Pavel Zarecky <[email protected]> * feat(routing): manual mediator pickup lifecycle management (openwallet-foundation#989) Signed-off-by: Ariel Gentile <[email protected]> * docs(demo): faber creates invitation (openwallet-foundation#995) Signed-off-by: conanoc <[email protected]> * chore(release): v0.2.3 (openwallet-foundation#999) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(question-answer): question answer protocol state/role check (openwallet-foundation#1001) Signed-off-by: Ariel Gentile <[email protected]> * feat: Action Menu protocol (Aries RFC 0509) implementation (openwallet-foundation#974) Signed-off-by: Ariel Gentile <[email protected]> * fix(ledger): remove poolConnected on pool close (openwallet-foundation#1011) Signed-off-by: Niall Shaw <[email protected]> * fix(ledger): check taa version instad of aml version (openwallet-foundation#1013) Signed-off-by: Jakub Koci <[email protected]> * chore: add @janrtvld to maintainers (openwallet-foundation#1016) Signed-off-by: Timo Glastra <[email protected]> * feat(routing): add settings to control back off strategy on mediator reconnection (openwallet-foundation#1017) Signed-off-by: Sergi Garreta <[email protected]> * fix: avoid crash when an unexpected message arrives (openwallet-foundation#1019) Signed-off-by: Pavel Zarecky <[email protected]> * chore(release): v0.2.4 (openwallet-foundation#1024) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * style: fix some lint errors Signed-off-by: Ariel Gentile <[email protected]> * feat: use did:key flag (openwallet-foundation#1029) Signed-off-by: Ariel Gentile <[email protected]> * ci: set default rust version (openwallet-foundation#1036) Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * fix(oob): allow encoding in content type header (openwallet-foundation#1037) Signed-off-by: Timo Glastra <[email protected]> * feat: connection type (openwallet-foundation#994) Signed-off-by: KolbyRKunz <[email protected]> * chore(module-tenants): match package versions Signed-off-by: Ariel Gentile <[email protected]> * feat: improve sending error handling (openwallet-foundation#1045) Signed-off-by: Ariel Gentile <[email protected]> * feat: expose findAllByQuery method in modules and services (openwallet-foundation#1044) Signed-off-by: Jim Ezesinachi <[email protected]> * feat: possibility to set masterSecretId inside of WalletConfig (openwallet-foundation#1043) Signed-off-by: Andrii Uhryn <[email protected]> * fix(oob): set connection alias when creating invitation (openwallet-foundation#1047) Signed-off-by: Jakub Koci <[email protected]> * build: fix missing parameter Signed-off-by: Ariel Gentile <[email protected]> Signed-off-by: Pavel Zarecky <[email protected]> Signed-off-by: Ariel Gentile <[email protected]> Signed-off-by: conanoc <[email protected]> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Niall Shaw <[email protected]> Signed-off-by: Jakub Koci <[email protected]> Signed-off-by: Timo Glastra <[email protected]> Signed-off-by: Sergi Garreta <[email protected]> Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> Signed-off-by: KolbyRKunz <[email protected]> Signed-off-by: Jim Ezesinachi <[email protected]> Signed-off-by: Andrii Uhryn <[email protected]> Co-authored-by: Iskander508 <[email protected]> Co-authored-by: conanoc <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Niall Shaw <[email protected]> Co-authored-by: jakubkoci <[email protected]> Co-authored-by: Timo Glastra <[email protected]> Co-authored-by: Sergi Garreta Serra <[email protected]> Co-authored-by: Sai Ranjit Tummalapalli <[email protected]> Co-authored-by: KolbyRKunz <[email protected]> Co-authored-by: Jim Ezesinachi <[email protected]> Co-authored-by: an-uhryn <[email protected]>
Added a connection type enum to the connection record so that you can filter the connections based on type.