-
Notifications
You must be signed in to change notification settings - Fork 6k
Adds a runner to engine_build_configs #50342
Conversation
6cb8a50 to
6e9417b
Compare
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. |
|
Friendly ping. Happy to chat about this or split it up into smaller pieces if that would be helpful. |
| // For example: | ||
| // $ dart bin/run.dart mac_unopt host_debug_unopt | ||
| // | ||
| // The build config names are the namess of the json files under ci/builders |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // The build config names are the namess of the json files under ci/builders | |
| // The build config names are the names of the json files under ci/builders |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| // $ dart bin/run.dart mac_unopt host_debug_unopt | ||
| // | ||
| // The build config names are the namess of the json files under ci/builders | ||
| // The build names are the "name" fields of the maps in the list of "builds". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good info, could we also add it to a README.md in //flutter/tools/pkg/engine_build_configs/ for improved readability?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel strongly about this, feel free to skip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Added a light README.md.
| configName = args[0]; | ||
| buildName = args[1]; | ||
| } else { | ||
| io.stderr.writeln('Wrong arguments'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this error message actionable? Perhaps something like:
| io.stderr.writeln('Wrong arguments'); | |
| io.stderr.writeln(''' | |
| Usage: | |
| $ dart bin/run.dart [build config name] [build name] | |
| For example: | |
| $ dart bin/run.dart mac_unopt host_debug_unopt | |
| The build config names are the names of the json files under ci/builders | |
| '''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| } | ||
|
|
||
| // Check the parsed build configs for validity. | ||
| BuildConfig? targetConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace the loop below with:
targetConfig = configs[name];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Done.
| for (final String dimension in droneDimensions) { | ||
| os ??= switch (dimension.split('=')) { | ||
| ['os', 'Linux'] => Platform.linux, | ||
| ['os', 'Windows'] => Platform.windows, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we'll need to support Windows-10 and Windows-11. Example:
| "os=Windows-10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, good catch. Done.
| } | ||
|
|
||
| if (runGn) { | ||
| if (!await _runGN(eventHandler)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: consider consistent casing _runGn to align with runGn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| String toString() { | ||
| final String ts = '[${_timestamp(timestamp)}]'; | ||
| final String pct = '${percent.toStringAsFixed(1)}%'; | ||
| return '$ts[$name]: $pct $what'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The percentages feel slower than ninja's <completed>/<total> output. My computer might display 68.9% for a while even though it's actually completed several steps.
Could you expand on why you chose percentages instead of raw numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't think about this too deeply, but it does make sense for the progress object to include the number of completed steps and the total number of steps so that the client of the API can do whatever it likes with them, so I added them.
loic-sharma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome, excellent work!
6e9417b to
9adbbee
Compare
9adbbee to
f06a6f0
Compare
…143265) flutter/engine@e08b6c8...c587bd6 2024-02-10 [email protected] Adds a runner to engine_build_configs (flutter/engine#50342) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll 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 Flutter: 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
This PR adds an API to the
engine_build_configspackage that executes an engine build config locally . This API is a building block for an eventual command line tool to streamline workflows in the engine repo. In particular, it will allow the command line tool to execute the same config, build, and test commands that are run on CI.