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

Don't leak wallets from createWalletViaCLI #2854

Merged
merged 1 commit into from
Aug 26, 2021

Conversation

Anviking
Copy link
Member

  • Make createWalletViaCLI run in ResourceT for automatic cleanup

Comments

There has been strange CI failures where the wallet seems overloaded
(balance is 0, and wallet is unsynced even after 90s). They seem CLI
specific.

There may be several reasons for the CLI specific failures. But one is:
It seems createWalletViaCLI does not automatically clean up wallets
using ResourceT. In the CLI.Shelley.Wallets module there are 15 calls to
createWalletViaCLI, but only 5 corresponding deleteWalletViaCLI ones.

The wallet server does not perform well with many wallets. So leaking
wallets might contribute to slowness and failures.

We should simply make createWalletViaCLI use ResourceT.

Running

NO_POOLS=1 NO_CLEANUP=1 stack test cardano-wallet:integration --ta '-j 8 --match "CLI"'
ls $CLUSTER_DIR/wallets/*.sqlite | wc -l

I get 22 remaining files with the fix, compared to 49 without it.

Issue Number

ADP-1090

There has been strange CI failures where the wallet seems overloaded
(balance is 0, and wallet is unsynced even after 90s). They seem CLI
specific.

There may be several reasons for the CLI specific failures. But one is:
It seems createWalletViaCLI does not automatically clean up wallets
using ResourceT. In the CLI.Shelley.Wallets module there are 15 calls to
createWalletViaCLI, but only 5 corresponding deleteWalletViaCLI ones.

The wallet server does not perform well with many wallets. So leaking
wallets might contribute to slowness and failures.

We should simply make createWalletViaCLI use ResourceT.

Running
```
NO_POOLS=1 NO_CLEANUP=1 stack test cardano-wallet:integration --ta '-j 8 --match "CLI"'
ls $CLUSTER_DIR/wallets/*.sqlite | wc -l
```
I get 22 remaining files with the fix, compared to 49 without it.
@Anviking Anviking self-assigned this Aug 26, 2021
@Anviking
Copy link
Member Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 26, 2021

Build succeeded:

@iohk-bors iohk-bors bot merged commit f8cb401 into master Aug 26, 2021
@iohk-bors iohk-bors bot deleted the anviking/ADP-1090/integration-cli-fixes branch August 26, 2021 18:33
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.

2 participants