Skip to content

Conversation

@christopherfujino
Copy link
Contributor

I plan to extend the prepare_package.dart script to upload the flutter preview device (design doc).

However, given that that script is one large >1k line file, I decided to organize it into smaller libraries in this PR. There should be no behavioral change in this PR, this is a cleanup only. I made the following changes:

  1. Created a //dev/bots/prepare_package/ directory to contain helper libraries
  2. Moved everything but the main() function in //dev/bots/prepare_package.dart into one of 4 helper libraries under the new directory from step 1:
    a. archive_creator.dart which contains the code that creates archive directory locally on disk
    b. archive_publisher.dart which contains the code that uploads the archive to cloud storage
    c. common.dart for shared constants and definitions
    d. process_runner.dart for an abstraction over running sub-processes
  3. Changed all definitions to File and Directory from dart:io to use the testable versions from package:file. This allowed me to use the MemoryFileSystem in the unit tests, rather than creating real temp file system directories.

Copy link
Contributor

@CaseyHillers CaseyHillers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flutter-lgtm

Nice cleanup! This will make the next parts much easier to review :-)

@christopherfujino christopherfujino added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 30, 2023
@auto-submit auto-submit bot merged commit 8871097 into flutter:master Nov 30, 2023
@christopherfujino christopherfujino deleted the refactor-prepare-package branch November 30, 2023 19:42
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 2, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Dec 2, 2023
flutter/flutter@918e336...d861ce4

2023-12-02 [email protected] Roll Flutter Engine from f0122c32c5cc to cfabe42bc0c6 (1 revision) (flutter/flutter#139423)
2023-12-02 [email protected] Roll Flutter Engine from f23c33f3831c to f0122c32c5cc (1 revision) (flutter/flutter#139422)
2023-12-02 [email protected] Roll Flutter Engine from d441f087052c to f23c33f3831c (2 revisions) (flutter/flutter#139421)
2023-12-02 [email protected] Roll Flutter Engine from 27d37db84b8e to d441f087052c (1 revision) (flutter/flutter#139419)
2023-12-02 [email protected] Roll Flutter Engine from 5a9f33e3a41e to 27d37db84b8e (1 revision) (flutter/flutter#139418)
2023-12-02 [email protected] Roll Flutter Engine from 9f8502c4e255 to 5a9f33e3a41e (1 revision) (flutter/flutter#139416)
2023-12-02 [email protected] Roll Flutter Engine from 43a1598713bb to 9f8502c4e255 (1 revision) (flutter/flutter#139414)
2023-12-02 [email protected] Roll Flutter Engine from 039439c1ffe8 to 43a1598713bb (1 revision) (flutter/flutter#139412)
2023-12-02 [email protected] Roll Flutter Engine from 4d19fedb7617 to 039439c1ffe8 (1 revision) (flutter/flutter#139410)
2023-12-02 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Retry on transient Skia failure." (flutter/flutter#139407)
2023-12-01 [email protected] Roll Flutter Engine from 162ad29a576f to 4d19fedb7617 (1 revision) (flutter/flutter#139397)
2023-12-01 [email protected] [l10n] Update Material shareButtonLabel (flutter/flutter#138899)
2023-12-01 [email protected] Retry on transient Skia failure. (flutter/flutter#139182)
2023-12-01 [email protected] Roll Flutter Engine from 820cb686d17d to 162ad29a576f (1 revision) (flutter/flutter#139394)
2023-12-01 [email protected] Roll Flutter Engine from 00316e4b7680 to 820cb686d17d (2 revisions) (flutter/flutter#139390)
2023-12-01 [email protected] Roll Flutter Engine from 95995c48d591 to 00316e4b7680 (1 revision) (flutter/flutter#139389)
2023-12-01 [email protected] Roll Flutter Engine from 69f0e5550702 to 95995c48d591 (6 revisions) (flutter/flutter#139388)
2023-12-01 [email protected] Added vscode-insiders path installed via snap (flutter/flutter#137117)
2023-12-01 [email protected] Typo fix in dartdoc in tool test (flutter/flutter#139386)
2023-12-01 [email protected] Roll Flutter Engine from 51ef7642750f to 69f0e5550702 (1 revision) (flutter/flutter#139348)
2023-12-01 [email protected] Roll Flutter Engine from 894360cca1ec to 51ef7642750f (1 revision) (flutter/flutter#139346)
2023-12-01 [email protected] Roll Flutter Engine from c26e6ced11df to 894360cca1ec (1 revision) (flutter/flutter#139345)
2023-12-01 [email protected] Roll Flutter Engine from 74d2df52514a to c26e6ced11df (26 revisions) (flutter/flutter#139342)
2023-12-01 [email protected] Roll Flutter Engine from 35939ca8534f to 74d2df52514a (1 revision) (flutter/flutter#139264)
2023-11-30 [email protected] Add `undoStackModifier` to `UndoHistory` (flutter/flutter#138674)
2023-11-30 [email protected] Migrate docs_test to shard. (flutter/flutter#139282)
2023-11-30 [email protected] Write Tests for API Examples of `cupertino_text_field.0`, `data_table.0`, `icon_button.2` & `ink_well.0` (flutter/flutter#139258)
2023-11-30 [email protected] Refactor prepare_package.dart (flutter/flutter#139277)
2023-11-30 [email protected] Roll Packages from e4aaba8 to bc72d15 (4 revisions) (flutter/flutter#139307)

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],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
caseycrogers pushed a commit to caseycrogers/flutter that referenced this pull request Dec 29, 2023
I plan to extend the prepare_package.dart script to upload the flutter preview device ([design doc](https://docs.google.com/document/d/1AzI-_Uk2v1LA2kKKFJ7gVD4xcakXJ6yVZiS5Ek6RHtg/edit#heading=h.byp03plw7mg9)).

However, given that that script is one large >1k line file, I decided to organize it into smaller libraries in this PR. There should be no behavioral change in this PR, this is a cleanup only. I made the following changes:

1. Created a //dev/bots/prepare_package/ directory to contain helper libraries
2. Moved everything but the `main()` function in //dev/bots/prepare_package.dart into one of 4 helper libraries under the new directory from step 1:
  a. archive_creator.dart which contains the code that creates archive directory locally on disk
  b. archive_publisher.dart which contains the code that uploads the archive to cloud storage
  c. common.dart for shared constants and definitions
  d. process_runner.dart for an abstraction over running sub-processes
3. Changed all definitions to `File` and `Directory` from `dart:io` to use the testable versions from `package:file`. This allowed me to use the `MemoryFileSystem` in the unit tests, rather than creating real temp file system directories.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants