Add progress indicator to artifact downloads#181808
Add progress indicator to artifact downloads#181808auto-submit[bot] merged 2 commits intoflutter:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a progress indicator for artifact downloads, which is a great improvement for user experience. The changes are well-structured, extracting the progress reporting logic into the ArtifactUpdater and adding displayName and downloadCount properties to ArtifactSet for better control over the output. The implementation is consistent across the modified files, and the new tests provide good coverage for the new functionality. I've found one issue where an artifact that performs multiple downloads is missing the downloadCount override, which I've detailed in a specific comment.
|
Thanks for your contribution, @Mr-Pepe! Overall, I think this is a huge improvement! There's some failing tests that I'm guessing are failing due to unexpected output from the tool. We'll need to fix those issues before we can actually land this. |
|
@jtmcdole looking for a second opinion when you have a second. |
|
@bkonyi I'll look into the CI failures 👍 Not critical for this PR but do you have an opinion on "It would look nicer if the iOS USB artifacts were bundled in one artifact set"? I could look into turning them into an artifact set if possible or leave it for someone else to change in the future if they feel strongly about it. |
|
This is not a call to action, but if I had either a loading bar or a spinner, I'd also be happy. I don't know if we call HEAD first to find out how large the files are before downloading them. A silly example: https://asciinema.org/a/512092?t=48 |
|
Not sure if I'll find the time but something like that is totally what I would like to do. Just wanted to start with something small but impactful and not show up with a 4,000 loc PR that touches everything 😄 |
|
Looks good to me! Thanks for the contribution @Mr-Pepe! |
Roll Flutter from dad6f9d4107a to b31548feb941 (39 revisions) flutter/flutter@dad6f9d...b31548f 2026-02-25 [email protected] [web] Fix failure on Firefox 148 (flutter/flutter#182855) 2026-02-25 [email protected] Roll Fuchsia Linux SDK from KfPgw04T0OEADLJA5... to XI0Ax7fbtYE4XKYAQ... (flutter/flutter#182887) 2026-02-25 [email protected] Use AnimationStyle curve and reverseCurve in ModalBottomSheet animation (flutter/flutter#181403) 2026-02-25 [email protected] Roll Dart SDK from fd3dce5b6a4e to 5c57e75f1102 (9 revisions) (flutter/flutter#182801) 2026-02-25 98614782+auto-submit[bot]@users.noreply.github.com Reverts "refactor: remove material in context_menu_controller_test, icon_test, list_wheel_scroll_view_test, media_query_test, platform_menu_bar_test (#182697)" (flutter/flutter#182879) 2026-02-25 [email protected] Make sure that an AnimatedSlide doesn't crash in 0x0 environment (flutter/flutter#181535) 2026-02-24 [email protected] Reland Standardize on Test* widgets in *_tester.dart files (flutter/flutter#182632) 2026-02-24 [email protected] docs(Path): clarify that zero-length contours are excluded from computeMetrics (flutter/flutter#180165) 2026-02-24 [email protected] Fix typo in assert message (flutter/flutter#182843) 2026-02-24 [email protected] [win32] Fix overflow in TaskRunnerWindow. (flutter/flutter#182822) 2026-02-24 [email protected] feat: Add --no-uninstall flag to flutter test for integration tests (flutter/flutter#182714) 2026-02-24 [email protected] Rename noFrequencyBasedMinification to useFrequencyBasedMinification (flutter/flutter#182684) 2026-02-24 [email protected] [Impeller] Fix fail to render pixel buffer texture on Linux (flutter/flutter#181656) 2026-02-24 [email protected] Remove FlutterFramework app migration (flutter/flutter#182100) 2026-02-24 [email protected] Roll Packages from 12b43a1 to 062c8d4 (5 revisions) (flutter/flutter#182839) 2026-02-24 [email protected] [web] Run webparagraph tests in CI (flutter/flutter#182092) 2026-02-24 [email protected] Fix a race in EmbedderTest.CanSpecifyCustomUITaskRunner (flutter/flutter#182649) 2026-02-24 [email protected] flutter_tools: Use a super-parameter in several missed cases (flutter/flutter#182581) 2026-02-24 [email protected] Replace more references to `flutter/engine` with `flutter/flutter` (flutter/flutter#182654) 2026-02-24 [email protected] Carousel: Migration from Scrollable+Viewport to CustomScrollView (flutter/flutter#182475) 2026-02-24 [email protected] Refactor impellerc_main to better organize some of its logic (flutter/flutter#182783) 2026-02-24 [email protected] Remove unused `getPluginList ` (flutter/flutter#182660) 2026-02-24 [email protected] Refactor: Remove material from ticker provider test (flutter/flutter#181697) 2026-02-24 [email protected] Roll Skia from 26eebffe12bd to f44d7db68805 (3 revisions) (flutter/flutter#182821) 2026-02-24 [email protected] refactor: remove material in context_menu_controller_test, icon_test, list_wheel_scroll_view_test, media_query_test, platform_menu_bar_test (flutter/flutter#182697) 2026-02-24 [email protected] Roll Skia from 7dad66aae75a to 26eebffe12bd (5 revisions) (flutter/flutter#182810) 2026-02-24 [email protected] Update roadmap for 2026 (flutter/flutter#182798) 2026-02-24 [email protected] Marks Windows tool_tests_commands_1_2 to be unflaky (flutter/flutter#179670) 2026-02-23 [email protected] [web] scroll iOS iframe text input into view (flutter/flutter#179759) 2026-02-23 [email protected] Fix textscaler clamp assertion error (flutter/flutter#181716) 2026-02-23 [email protected] Roll Skia from 9a5a3c92c336 to 7dad66aae75a (4 revisions) (flutter/flutter#182779) 2026-02-23 [email protected] Move more getters from userMessages class to the appropriate places (flutter/flutter#182656) 2026-02-23 [email protected] Manual roll Dart SDK from f8fac50475b8 to fd3dce5b6a4e (6 revisions) (flutter/flutter#182768) 2026-02-23 [email protected] Copy Flutter framework to Add to App FlutterPluginRgistrant (flutter/flutter#182523) 2026-02-23 [email protected] Add progress indicator to artifact downloads (flutter/flutter#181808) 2026-02-23 [email protected] Clarify batch release mode requirements (flutter/flutter#182228) 2026-02-23 [email protected] [web] Remove --disable-gpu from flutter chrome tests (flutter/flutter#182618) 2026-02-23 [email protected] running-apps: update running-apps to use Duration.ago() (flutter/flutter#182172) 2026-02-23 [email protected] Refactor bin/ shell scripts for better performance and safety (flutter/flutter#182674) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. ...
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> This is a first step towards resolving flutter#14268. This change adds a simple progress indicator telling the user how many artifact (sets) need downloading. The output also makes the structure of artifact sets clearer by indenting the artifacts inside a set. Here is the output of downloading all artifacts: <details><summary>Details</summary> <p> ``` ❯ flutter precache -f -a Building flutter tool... Resolving dependencies... Downloading packages... Got dependencies. Downloading Flutter dependencies... [1/18] Material Fonts 278ms [2/18] Gradle Wrapper 28ms [3/18] Android SDK ├─ [1/21] android-arm-profile/darwin-x64 303ms ├─ [2/21] android-arm-release/darwin-x64 243ms ├─ [3/21] android-arm64-profile/darwin-x64 787ms ├─ [4/21] android-arm64-release/darwin-x64 235ms ├─ [5/21] android-x64-profile/darwin-x64 365ms ├─ [6/21] android-x64-release/darwin-x64 249ms ├─ [7/21] android-arm-profile/linux-x64 189ms ├─ [8/21] android-arm-release/linux-x64 181ms ├─ [9/21] android-arm64-profile/linux-x64 184ms ├─ [10/21] android-arm64-release/linux-x64 1,009ms ├─ [11/21] android-x64-profile/linux-x64 275ms ├─ [12/21] android-x64-release/linux-x64 179ms ├─ [13/21] android-arm-profile/windows-x64 164ms ├─ [14/21] android-arm-release/windows-x64 178ms ├─ [15/21] android-arm64-profile/windows-x64 187ms ├─ [16/21] android-arm64-release/windows-x64 183ms ├─ [17/21] android-x64-profile/windows-x64 996ms ├─ [18/21] android-x64-release/windows-x64 193ms ├─ [19/21] dart-sdk-darwin-x64 6.6s ├─ [20/21] dart-sdk-linux-x64 5.5s └─ [21/21] dart-sdk-windows-x64 5.3s [4/18] Android Internal Build Artifacts ├─ [1/10] android-x86 4.8s ├─ [2/10] android-x64 4.8s ├─ [3/10] android-arm 4.9s ├─ [4/10] android-arm-profile 2,507ms ├─ [5/10] android-arm-release 1,626ms ├─ [6/10] android-arm64 5.0s ├─ [7/10] android-arm64-profile 2,204ms ├─ [8/10] android-arm64-release 2,161ms ├─ [9/10] android-x64-profile 2,374ms └─ [10/10] android-x64-release 2,179ms [5/18] iOS SDK ├─ [1/3] ios 3.1s ├─ [2/3] ios-profile 2,606ms └─ [3/3] ios-release 4.0s [6/18] Web SDK 2,075ms [7/18] Engine Information 161ms [8/18] Flutter SDK ├─ [1/7] sky_engine 144ms ├─ [2/7] flutter_gpu 358ms ├─ [3/7] flutter_patched_sdk 202ms ├─ [4/7] flutter_patched_sdk_product 179ms ├─ [5/7] windows-x64 2,010ms ├─ [6/7] linux-x64 1,652ms └─ [7/7] darwin-x64 1,856ms [9/18] Windows SDK ├─ [1/4] windows-x64-debug/windows-x64-flutter 3.1s ├─ [2/4] windows-x64/flutter-cpp-client-wrapper 147ms ├─ [3/4] windows-x64-profile/windows-x64-flutter 3.6s └─ [4/4] windows-x64-release/windows-x64-flutter 3.6s [10/18] MacOS SDK ├─ [1/8] darwin-x64/framework 2,017ms ├─ [2/8] darwin-x64/gen_snapshot 1,204ms ├─ [3/8] darwin-x64-profile/framework 1,329ms ├─ [4/8] darwin-x64-profile 978ms ├─ [5/8] darwin-x64-profile/gen_snapshot 680ms ├─ [6/8] darwin-x64-release/framework 3.9s ├─ [7/8] darwin-x64-release 1,006ms └─ [8/8] darwin-x64-release/gen_snapshot 1,271ms [11/18] Linux SDK ├─ [1/3] linux-x64-debug/linux-x64-flutter-gtk 2,293ms ├─ [2/3] linux-x64-profile/linux-x64-flutter-gtk 1,485ms └─ [3/3] linux-x64-release/linux-x64-flutter-gtk 1,462ms [12/18] iOS USB Artifact: libimobiledevice 43ms [13/18] iOS USB Artifact: libusbmuxd 34ms [14/18] iOS USB Artifact: libplist 25ms [15/18] iOS USB Artifact: openssl 55ms [16/18] iOS USB Artifact: libimobiledeviceglue 26ms [17/18] iOS USB Artifact: ios-deploy 26ms [18/18] Font Subsets ├─ [1/3] darwin-x64/font-subset 956ms ├─ [2/3] linux-x64/font-subset 172ms └─ [3/3] windows-x64/font-subset 168ms ``` </p> </details> Each artifact set now has a pretty display name. It would look nicer if the iOS USB artifacts were bundled in one artifact set but maybe there is a reason why they are separate? ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md Co-authored-by: Ben Konyi <[email protected]>
This is a first step towards resolving #14268. This change adds a simple progress indicator telling the user how many artifact (sets) need downloading. The output also makes the structure of artifact sets clearer by indenting the artifacts inside a set.
Here is the output of downloading all artifacts:
Details
Each artifact set now has a pretty display name.
It would look nicer if the iOS USB artifacts were bundled in one artifact set but maybe there is a reason why they are separate?
Pre-launch Checklist
///).