Skip to content
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

fix: listen to incoming messages on agent initialize not constructor #1542

Conversation

niall-shaw
Copy link
Contributor

No description provided.

@niall-shaw niall-shaw requested a review from a team as a code owner August 8, 2023 10:07
Signed-off-by: Niall Shaw <niall.shaw@absa.africa>
@niall-shaw niall-shaw force-pushed the fix/message-subscribe-on-initialize branch from 96ba3b6 to e530692 Compare August 8, 2023 10:08
Signed-off-by: Niall Shaw <niall.shaw@absa.africa>
@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2023

Codecov Report

Merging #1542 (5f3f8fc) into main (0f528ba) will not change coverage.
The diff coverage is 60.00%.

@@           Coverage Diff           @@
##             main    #1542   +/-   ##
=======================================
  Coverage   79.81%   79.81%           
=======================================
  Files         917      917           
  Lines       22150    22150           
  Branches     3888     3888           
=======================================
  Hits        17679    17679           
  Misses       4160     4160           
  Partials      311      311           
Files Changed Coverage Δ
packages/core/src/agent/Agent.ts 93.22% <60.00%> (ø)

Copy link
Contributor

@genaris genaris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @niall-shaw ! I don't think it was done on purpose. Agent objects are usually initialized only once during their lifecycle. With this fix were you able to make several shutdown / initialize sequences?

My only concern to merge it right now is about the fact that messageSubscription is for some reason a public field, so making it optional could be considered a breaking change. However, I don't know in which use-cases this field is actually accessed from outside. What do you think @TimoGlastra (Git blames you 😛)?

@niall-shaw
Copy link
Contributor Author

@genaris

With this fix were you able to make several shutdown / initialize sequences?

Yes I was :)

@niall-shaw
Copy link
Contributor Author

@TimoGlastra @genaris - any updates?

@TimoGlastra
Copy link
Contributor

However, I don't know in which use-cases this field is actually accessed from outside. What do you think @TimoGlastra (Git blames you 😛)?

Yeah not sure why this is public. I think we can merge without it being a breaking change and see this as a fix.

@niall-shaw
Copy link
Contributor Author

FYI @TimoGlastra - on AFJ WG call, it was mentioned by both @genaris and @berendsliedrecht that this may be considered breaking change. I was going to look into a different solution. What do you think?

@TimoGlastra
Copy link
Contributor

Yeah it's definitely a breaking change, but I'm not sure why anyone would use this property, and thus I'm okay with merging it as is, as it should never have been exposed.

But other solutions also fine for me

@genaris
Copy link
Contributor

genaris commented Aug 17, 2023

Yeah it's definitely a breaking change, but I'm not sure why anyone would use this property, and thus I'm okay with merging it as is, as it should never have been exposed.

But other solutions also fine for me

Yeah @niall-shaw I think it'd be better to make this field private and treat it as a fix to not overcomplicate things. Then we merge it for 0.4.1.

Co-authored-by: Timo Glastra <timo@animo.id>
Signed-off-by: Ariel Gentile <gentilester@gmail.com>
@genaris genaris enabled auto-merge (squash) August 17, 2023 22:32
@genaris genaris merged commit 8f2d593 into openwallet-foundation:main Aug 17, 2023
auer-martin pushed a commit to auer-martin/aries-framework-javascript that referenced this pull request Nov 15, 2023
…penwallet-foundation#1542)

Signed-off-by: Niall Shaw <niall.shaw@absa.africa>
Signed-off-by: Martin Auer <martin.auer97@gmail.com>
auer-martin pushed a commit to auer-martin/aries-framework-javascript that referenced this pull request Dec 4, 2023
…penwallet-foundation#1542)

Signed-off-by: Niall Shaw <niall.shaw@absa.africa>
Signed-off-by: Martin Auer <martin.auer97@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants