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: multiuse invites with did peer 4 #3112

Merged
merged 6 commits into from
Jul 22, 2024

Conversation

dbluhm
Copy link
Contributor

@dbluhm dbluhm commented Jul 21, 2024

This corrects an issue where did:peer:4 connection records were failing to be resolved on inbound message, resulting in the multiuse invitation that created the connection being resolved instead.

Fixes #3111.

@dbluhm dbluhm requested review from ianco and jamshale July 21, 2024 19:51
This corrects an issue where did:peer:4 connection records were failing
to be resolved on inbound message, resulting in the multiuse invitation
that created the connection being resolved instead.

Fixes openwallet-foundation#3111.

Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
@dbluhm dbluhm force-pushed the fix/did-peer-4-conn-lookup branch from 3404e69 to bdc7ccf Compare July 21, 2024 19:51
jamshale
jamshale previously approved these changes Jul 22, 2024
Copy link
Contributor

@jamshale jamshale left a comment

Choose a reason for hiding this comment

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

Manually tested with the scenario that was failing for me and this fixed it 👍

@swcurran
Copy link
Contributor

OK to merge with the SonarCloud state? @dbluhm what do you think?

@dbluhm
Copy link
Contributor Author

dbluhm commented Jul 22, 2024

I'm okay with it being merged as is but I am also happy to get a quick unit test written. Would not take a lot to cover the changes since it wasn't a lot of changes.

@jamshale
Copy link
Contributor

Sometimes reformatted code will make sonarcloud report areas that didn't have any logic changes. I think that happened a bit here. Could think about a couple tests for the new code.

Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
@dbluhm
Copy link
Contributor Author

dbluhm commented Jul 22, 2024

Sonar cloud is still unhappy but I'd say the new unit tests + integration tests will be adequate to cover these changes.

jamshale
jamshale previously approved these changes Jul 22, 2024
@dbluhm
Copy link
Contributor Author

dbluhm commented Jul 22, 2024

@jamshale https://github.com/hyperledger/aries-cloudagent-python/actions/runs/10045120793/job/27761704780?pr=3112#step:4:18060
Odds of this being a false-negative? Seems unrelated to my changes at first glance at least

@jamshale
Copy link
Contributor

jamshale commented Jul 22, 2024

@jamshale https://github.com/hyperledger/aries-cloudagent-python/actions/runs/10045120793/job/27761704780?pr=3112#step:4:18060 Odds of this being a false-negative? Seems unrelated to my changes at first glance at least

This test does have false negatives quite often, and it doesn't look very related. I think it's probably the case, as other tests would have failed as well. Let's see if it passes a new run.

@jamshale
Copy link
Contributor

@dbluhm This test is actually failing locally. I think it must be related to the changes. I'm not sure why the retrieve_by_tag_filter query would have been affected for this test.

@dbluhm
Copy link
Contributor Author

dbluhm commented Jul 22, 2024

Interesting -- I'll dig in! Thanks for checking locally

Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
@swcurran
Copy link
Contributor

@dbluhm — sorry to bug you, but another failed test in the PR Tests. Looks to be in the same area as the most recent commit.

Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
@dbluhm
Copy link
Contributor Author

dbluhm commented Jul 22, 2024

@dbluhm — sorry to bug you, but another failed test in the PR Tests. Looks to be in the same area as the most recent commit.

Yeah, pushed while my tests were running locally still 🙂 PR tests should be good now. I think int tests are too but they take a while to run locally even when narrowed to just the endorser scenarios.

Copy link

sonarcloud bot commented Jul 22, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
78.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@@ -772,20 +767,17 @@ async def set_transaction_my_job(self, record: ConnRecord, transaction_my_job: s
return tx_job_to_send

async def set_transaction_their_job(
self, tx_job_received: TransactionJobToSend, receipt: MessageReceipt
self, tx_job_received: TransactionJobToSend, connection: ConnRecord
Copy link
Contributor

Choose a reason for hiding this comment

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

I was looking at this for a bit and didn't understand why it used MessageReceipt here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed; my impression is that it was just a question of the implementer being unfamiliar with the request context or something along those lines.

@dbluhm dbluhm merged commit e07066c into openwallet-foundation:main Jul 22, 2024
7 of 8 checks passed
@dbluhm dbluhm deleted the fix/did-peer-4-conn-lookup branch July 22, 2024 21:16
@jamshale jamshale mentioned this pull request Jul 23, 2024
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.

Multiuse invitations and Qualified DIDs
3 participants