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 tmp_dir arg from AdbCallParser.__init__() + file leak fix. #228

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

copybara-service[bot]
Copy link

Remove tmp_dir arg from AdbCallParser.__init__() + file leak fix.

This change removes an unnecessary tmp_dir argument from AdbCallParser
which already uses tempfile.NamedTemporaryFile() which works in all
situations we need. This is important because it simplifies the environment
configuration and what needs to be passed to what during AndroidEnv's
loading, and it'll help to make it more modular.

This change also fixes a bug when installing apps (i.e. .apk files) via
blob requests where the .apk files were allocated and written to, but not
deleted. These files lasted until the (successful) termination of the binary,
and would possibly linger around if terminated abruptly.

@copybara-service copybara-service bot force-pushed the test_683411795 branch 3 times, most recently from 10b916e to 7a12351 Compare October 8, 2024 13:46
This change removes an unnecessary `tmp_dir` argument from `AdbCallParser`
which already uses `tempfile.NamedTemporaryFile()` which works in all
situations we need. This is important because it simplifies the environment
configuration and what needs to be passed to what during `AndroidEnv`'s
loading, and it'll help to make it more modular.

This change also fixes a bug when installing apps (i.e. `.apk` files) via
`blob` requests where the `.apk` files were allocated and written to, but not
deleted. These files lasted until the (successful) termination of the binary,
and would possibly linger around if terminated abruptly.

PiperOrigin-RevId: 683605810
@copybara-service copybara-service bot merged commit 65ee54c into main Oct 8, 2024
@copybara-service copybara-service bot deleted the test_683411795 branch October 8, 2024 13:56
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.

1 participant