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

Qualify did exch connection lookup by role #1670

Merged
merged 3 commits into from
Mar 17, 2022

Conversation

ianco
Copy link
Contributor

@ianco ianco commented Mar 17, 2022

Signed-off-by: Ian Costanzo [email protected]

Fixes issue #1541

Signed-off-by: Ian Costanzo <[email protected]>
try:
conn_rec = await ConnRecord.retrieve_by_request_id(
session, response._thread_id,
their_role=ConnRecord.Role.RESPONDER.rfc160,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like the rfc23 roles should be used, but the created connection records are using the rfc160 roles ... so I included checks for both

Signed-off-by: Ian Costanzo <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Mar 17, 2022

Codecov Report

Merging #1670 (6f8644e) into main (d4c60ff) will decrease coverage by 0.00%.
The diff coverage is 95.23%.

@@            Coverage Diff             @@
##             main    #1670      +/-   ##
==========================================
- Coverage   95.50%   95.50%   -0.01%     
==========================================
  Files         528      528              
  Lines       32752    32766      +14     
==========================================
+ Hits        31280    31293      +13     
- Misses       1472     1473       +1     

Copy link
Contributor

@TimoGlastra TimoGlastra left a comment

Choose a reason for hiding this comment

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

Great! Thanks @ianco

Adding their_role to the TAG_NAMES means this will prevent old exchanges from finishing after PR has been released. This is not an issue for completed or new exchanges so I guest it's not really an issue?

Good to keep track somehow of later added tags, as now it may look you can query record by the their_role property, but this is only the case for records saved after this PR has been merged.

@swcurran
Copy link
Contributor

We do have the "migrate" mechanism to update stored data on deployment of a new version, but given the tight scope of this change, I don't think we need to use it. Agreed?

We used the mechanism with 0.73 to update connection records.

@swcurran swcurran merged commit 3774e85 into openwallet-foundation:main Mar 17, 2022
@ianco
Copy link
Contributor Author

ianco commented Mar 17, 2022

I don't think we need to "migrate" for this function because it's only used during the process of establishing a connection.

Once the connection is established we don't use the "request_id" to lookup the connection.

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