-
Notifications
You must be signed in to change notification settings - Fork 181
Separate fetching business logic from cross-cutting file download concerns #1762
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jemoreira
approved these changes
Nov 4, 2025
3cbf113 to
1ab3644
Compare
Databean
added a commit
to Databean/android-cuttlefish
that referenced
this pull request
Nov 4, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 4, 2025
#1762 (comment) Bug: b/457549895
1ab3644 to
b00c286
Compare
Member
Author
|
Changed the new API surface. A relevant behavioral change is that now extracting |
jemoreira
approved these changes
Nov 5, 2025
b00c286 to
ea3a46a
Compare
Bug: b/457520264
Bug: b/457520264
Wraps standard download operations with cross-cutting concerns: - Tracing long-running operations with time used. - Tracking the source build of created files. - Placing files under the right target directory. - Desparsing images. File paths for return values and argument values are relative to the target directory. By hiding the target directory from direct access, IO operations are funneled through an instance of this type, which guarantees none of the cross-cutting concerns are missed. Additionally, this could be replaced with a fake implementation later to support unit testing the business logic. Bug: b/457520264
Bug: b/457520264
Bug: b/457520264
Bug: b/457520264
Bug: b/457520264
Bug: b/457520264
Bug: b/457520264
Bug: b/457520264
Bug: b/457520264
Bug: b/457520264
Bug: b/457520264
These have been folded into the logic for fetching default and system builds. Bug: b/457520264
ea3a46a to
fc297d2
Compare
Databean
added a commit
to Databean/android-cuttlefish
that referenced
this pull request
Nov 26, 2025
google#1762 added automatic fetch trace logging for each individual file extracted from a `.zip` file. Many of these operations are very fast, especially for `otatools.zip` and take many lines of logs. These should be condensed since they don't contribute much to the overall time and make the trace harder to read. Sample new output: ``` Performance stats: PreFetch actions: started: 2025-11-25 15:52:13, duration: 1 s - GetBuilds: 1 s Host Package: started: 2025-11-25 15:52:14, duration: 3 m 13 s - Download: 3 m 6 s, 851 MiB - Extract: 6 s - 2 operations omitted with a combined duration of 12 ms. Default: started: 2025-11-25 15:52:14, duration: 7 m 33 s - Downloaded 'misc_info.txt': 1 s, 9000 B - Downloaded 'aosp_cf_x86_64_only_phone-img-14496483.zip': 7 m 23 s, 1135 MiB - Extracted 'super.img' from 'aosp_cf_x86_64_only_phone-img-14496483.zip': 7 s, 1339 MiB - Desparsed [/super.img]: 933 ms, 8192 MiB - 22 operations omitted with a combined duration of 549 ms. Kernel: started: 2025-11-25 15:59:47, duration: 8 ms - 4 operations omitted with a combined duration of 8 ms. OTA Tools: started: 2025-11-25 15:59:47, duration: 1 m 54 s - Downloaded 'otatools.zip': 1 m 51 s, 486 MiB - 14653 operations omitted with a combined duration of 3 s. ``` Bug: b/463765667
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 26, 2025
#1762 added automatic fetch trace logging for each individual file extracted from a `.zip` file. Many of these operations are very fast, especially for `otatools.zip` and take many lines of logs. These should be condensed since they don't contribute much to the overall time and make the trace harder to read. Sample new output: ``` Performance stats: PreFetch actions: started: 2025-11-25 15:52:13, duration: 1 s - GetBuilds: 1 s Host Package: started: 2025-11-25 15:52:14, duration: 3 m 13 s - Download: 3 m 6 s, 851 MiB - Extract: 6 s - 2 operations omitted with a combined duration of 12 ms. Default: started: 2025-11-25 15:52:14, duration: 7 m 33 s - Downloaded 'misc_info.txt': 1 s, 9000 B - Downloaded 'aosp_cf_x86_64_only_phone-img-14496483.zip': 7 m 23 s, 1135 MiB - Extracted 'super.img' from 'aosp_cf_x86_64_only_phone-img-14496483.zip': 7 s, 1339 MiB - Desparsed [/super.img]: 933 ms, 8192 MiB - 22 operations omitted with a combined duration of 549 ms. Kernel: started: 2025-11-25 15:59:47, duration: 8 ms - 4 operations omitted with a combined duration of 8 ms. OTA Tools: started: 2025-11-25 15:59:47, duration: 1 m 54 s - Downloaded 'otatools.zip': 1 m 51 s, 486 MiB - 14653 operations omitted with a combined duration of 3 s. ``` Bug: b/463765667
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 26, 2025
#1762 added automatic fetch trace logging for each individual file extracted from a `.zip` file. Many of these operations are very fast, especially for `otatools.zip` and take many lines of logs. These should be condensed since they don't contribute much to the overall time and make the trace harder to read. Sample new output: ``` Performance stats: PreFetch actions: started: 2025-11-25 15:52:13, duration: 1 s - GetBuilds: 1 s Host Package: started: 2025-11-25 15:52:14, duration: 3 m 13 s - Download: 3 m 6 s, 851 MiB - Extract: 6 s - 2 operations omitted with a combined duration of 12 ms. Default: started: 2025-11-25 15:52:14, duration: 7 m 33 s - Downloaded 'misc_info.txt': 1 s, 9000 B - Downloaded 'aosp_cf_x86_64_only_phone-img-14496483.zip': 7 m 23 s, 1135 MiB - Extracted 'super.img' from 'aosp_cf_x86_64_only_phone-img-14496483.zip': 7 s, 1339 MiB - Desparsed [/super.img]: 933 ms, 8192 MiB - 22 operations omitted with a combined duration of 549 ms. Kernel: started: 2025-11-25 15:59:47, duration: 8 ms - 4 operations omitted with a combined duration of 8 ms. OTA Tools: started: 2025-11-25 15:59:47, duration: 1 m 54 s - Downloaded 'otatools.zip': 1 m 51 s, 486 MiB - 14653 operations omitted with a combined duration of 3 s. ``` Bug: b/463765667
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 26, 2025
#1762 added automatic fetch trace logging for each individual file extracted from a `.zip` file. Many of these operations are very fast, especially for `otatools.zip` and take many lines of logs. These should be condensed since they don't contribute much to the overall time and make the trace harder to read. Sample new output: ``` Performance stats: PreFetch actions: started: 2025-11-25 15:52:13, duration: 1 s - GetBuilds: 1 s Host Package: started: 2025-11-25 15:52:14, duration: 3 m 13 s - Download: 3 m 6 s, 851 MiB - Extract: 6 s - 2 operations omitted with a combined duration of 12 ms. Default: started: 2025-11-25 15:52:14, duration: 7 m 33 s - Downloaded 'misc_info.txt': 1 s, 9000 B - Downloaded 'aosp_cf_x86_64_only_phone-img-14496483.zip': 7 m 23 s, 1135 MiB - Extracted 'super.img' from 'aosp_cf_x86_64_only_phone-img-14496483.zip': 7 s, 1339 MiB - Desparsed [/super.img]: 933 ms, 8192 MiB - 22 operations omitted with a combined duration of 549 ms. Kernel: started: 2025-11-25 15:59:47, duration: 8 ms - 4 operations omitted with a combined duration of 8 ms. OTA Tools: started: 2025-11-25 15:59:47, duration: 1 m 54 s - Downloaded 'otatools.zip': 1 m 51 s, 486 MiB - 14653 operations omitted with a combined duration of 3 s. ``` Bug: b/463765667
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Wraps standard download operations with cross-cutting concerns:
File paths for return values and argument values are relative to the target directory.
By hiding the target directory from direct access, IO operations are funneled through an instance of this type, which guarantees none of the cross-cutting concerns are missed. Additionally, this could be replaced with a fake implementation later to support unit testing the business logic.
Bug: b/457520264