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

Feat: Support subwallet upgradation using the Upgrade command #2529

Merged
merged 6 commits into from
Oct 17, 2023

Conversation

shaangill025
Copy link
Contributor

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
@shaangill025 shaangill025 marked this pull request as ready for review October 4, 2023 21:00
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
@dbluhm
Copy link
Contributor

dbluhm commented Oct 5, 2023

It's not something that was introduced by this PR but I think it's worth calling out nonetheless:

First, I think the whole upgrade method is due for a refactor. It's a beast of a method. When we recently worked through the upgrade process, working out how to potentially do an upgrade for a change we were working on, it took quite some time to parse through the code.

Second, consider this line:

https://github.com/hyperledger/aries-cloudagent-python/blob/9b16660508c3b1e9c70af46e38afbe51f8fcc6d1/aries_cloudagent/commands/upgrade.py#L395

This line is retrieving ALL records of the given type at once. This can result in out-of-memory issues if there are enough records in the wallet of that record type. We should probably be using a BaseStorageSearch to perform this record retrieval so that it can be done in batches: https://github.com/hyperledger/aries-cloudagent-python/blob/9b16660508c3b1e9c70af46e38afbe51f8fcc6d1/aries_cloudagent/storage/askar.py#L203-L235

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@shaangill025
Copy link
Contributor Author

@dbluhm Re the need to refactor, I mentioned it to @swcurran and I think this can be taken up in the future (separate from this PR). Re using BaseStorageSearch -> search_records, I have replaced query in upgrade.py with it.

@swcurran swcurran merged commit ebf1544 into openwallet-foundation:main Oct 17, 2023
8 checks passed
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.

Support updating sub-wallets [Multitenant env] with Upgrade command
3 participants