🐛 Rearrange connection record deletion after hangup #3310
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #3306
Originally, the
hangup
method would delete the associated connection record before posting the hangup request. This is evidently a mistake, since the hangup depends on the connection record.Mostly it would work, since there is a delay in the deletion of the connection record reflecting in storage, but rearranging the delete after hangup is a simple fix to avoid the race condition.
Before:
Sample 500 error from our tests (in "Wait for pytest and print logs" step): https://github.com/didx-xyz/aries-cloudapi-python/actions/runs/11387403475/job/31682203816
After:
Our tests now pass when testing this fix: didx-xyz/aries-cloudapi-python#1138