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

Remove in memory wallet #3311

Merged
merged 7 commits into from
Nov 5, 2024

Conversation

jamshale
Copy link
Contributor

@jamshale jamshale commented Oct 24, 2024

  • Removes the in-memory wallet and updates tests to use an in-memory sqlite askar wallet.
  • Doesn't flatten the wallet abstraction in this PR. Will do this in an additional PR.
  • Runs the tests in parallel to speed up execution time.
  • Updates all tests that created an in-memory (non-async) profile (wallet) to use the async askar wallet.
  • test_dispatcher had a few tests that are skipped. It seems like there might be bug in this code preventing them from working.
  • there was one problematic test in test_conductor that I skipped. It has a bad mock somewhere and was causing other tests to fail when run sequentially.

@jamshale jamshale closed this Oct 24, 2024
@jamshale jamshale reopened this Oct 24, 2024
@jamshale jamshale force-pushed the remove-in-mem-wallet branch 4 times, most recently from d1ef4be to f9f1c41 Compare October 29, 2024 20:23
@jamshale jamshale changed the title [WIP] Remove in memory wallet Remove in memory wallet Oct 29, 2024
@jamshale jamshale force-pushed the remove-in-mem-wallet branch from f9f1c41 to 7dc00b9 Compare November 5, 2024 19:19
Signed-off-by: jamshale <[email protected]>
Copy link

sonarqubecloud bot commented Nov 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
4 Security Hotspots

See analysis details on SonarCloud

@jamshale
Copy link
Contributor Author

jamshale commented Nov 5, 2024

Switching to a raw key dramatically sped up the tests. Whole PR Tests take less than 3 minutes now.

@jamshale
Copy link
Contributor Author

jamshale commented Nov 5, 2024

This should be ready. It is a breaking change for external plugins that use the old in_memory_profile for testing.

@swcurran swcurran requested review from dbluhm and ff137 November 5, 2024 21:05
@swcurran
Copy link
Contributor

swcurran commented Nov 5, 2024

Wow that is a big change. I hope you had some editor automation to help with that! LGTM, but will defer to @dbluhm @ff137 (or other maintainers) for an approval.

@dbluhm
Copy link
Contributor

dbluhm commented Nov 5, 2024

@jamshale if a wallet type is not specified on startup, do we spin up with an in-memory askar wallet? (if so, this should also probably be using raw key method and Store.generate_key)

@dbluhm
Copy link
Contributor

dbluhm commented Nov 5, 2024

This is great! I'm interested in taking this one step further after this PR is merged and flattening some of the wallet related abstractions now that there is just Askar.

Copy link
Contributor

@dbluhm dbluhm left a comment

Choose a reason for hiding this comment

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

I reviewed every non-test file in depth and skimmed the test updates. Nice work!

@swcurran swcurran merged commit 13e4d66 into openwallet-foundation:main Nov 5, 2024
9 of 10 checks passed
Comment on lines -115 to -119
async def test_ready_middleware_http_unauthorized(self):
"""Test handling of web.HTTPUnauthorized and related exceptions."""
with mock.patch.object(test_module, "LOGGER", mock.MagicMock()) as mock_logger:
mock_logger.info = mock.MagicMock()

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems that the rebase dropped some of the unit tests I added :-) from #3327
I'll re-add in follow-up PR 👍

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