Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Add et run command #51037

Merged
merged 1 commit into from
Mar 1, 2024
Merged

Add et run command #51037

merged 1 commit into from
Mar 1, 2024

Conversation

johnmccutchan
Copy link
Contributor

@johnmccutchan johnmccutchan commented Feb 28, 2024

The run command builds both the host and target engines and then invokes flutter run so that it runs the app using the custom engine builds.

It is expected that 'et run' be used inside the directory of a flutter application.

Command line flags passed after -- will be forwarded to flutter run.

Some examples:

  • et run Build the debug variant and runs the app in that mode.
  • et run -- --profile Build the profile variant and runs the app in that mode.
  • et run -- --release Build the release variant and runs the app in that mode.

Also:

  • Start a local_engine.json builder definition (it is missing a lot)
  • Tweak the test fixture.
  • Add a new Matcher to litetest.
  • Tweaked the build config linter to only care about duplicate build names within the same builder.

Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

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

Awesome work! 🥳

@johnmccutchan johnmccutchan force-pushed the et_run branch 4 times, most recently from 12fd7a2 to ffd48f5 Compare February 28, 2024 21:55
@johnmccutchan
Copy link
Contributor Author

I can't land this change because:

android_profile_arm64 is duplicated.
	Found definition in /b/s/w/ir/cache/builder/src/flutter/ci/builders/local_engine.json.
	Previous definition was in /b/s/w/ir/cache/builder/src/flutter/ci/builders/mac_android_aot_engine.json.
android_release_arm64 is duplicated.
	Found definition in /b/s/w/ir/cache/builder/src/flutter/ci/builders/local_engine.json.
	Previous definition was in /b/s/w/ir/cache/builder/src/flutter/ci/builders/mac_android_aot_engine.json.
host_debug is duplicated.
	Found definition in /b/s/w/ir/cache/builder/src/flutter/ci/builders/mac_host_engine.json.
	Previous definition was in /b/s/w/ir/cache/builder/src/flutter/ci/builders/local_engine.json.
host_profile is duplicated.
	Found definition in /b/s/w/ir/cache/builder/src/flutter/ci/builders/mac_host_engine.json.
	Previous definition was in /b/s/w/ir/cache/builder/src/flutter/ci/builders/local_engine.json.
host_release is duplicated.
	Found definition in /b/s/w/ir/cache/builder/src/flutter/ci/builders/mac_host_engine.json.
	Previous definition was in /b/s/w/ir/cache/builder/src/flutter/ci/builders/local_engine.json.

I don't think the lint is useful.

Comment on lines +5 to +6
"os=Mac-13",
"os=Linux"
Copy link
Member

Choose a reason for hiding this comment

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

The LUCI recipes understand a | for specifying that either is okay. For example:

"os=Mac-12|Mac-13",

Hadn't added support for it since it wasn't needed, yet, but parsing that would go here: https://github.com/flutter/engine/blob/main/tools/pkg/engine_build_configs/lib/src/build_config.dart#L805.

Suggested change
"os=Mac-13",
"os=Linux"
"os=Mac-13|Linux",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do this in a follow on CL.

if (configName.isNotEmpty) {
return configName;
}
// TODO(johnmccutchan): We need a way to invoke flutter tool and be told
Copy link
Member

Choose a reason for hiding this comment

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

I think this would look like the following:

  1. Parse the -d flag and its value out of the flutter command line
  2. Run flutter devices --machine which will spit out some json on stdout.
  3. Search for the device given by -d in the json and grab the info out of the targetPlatform or sdk field(s).

If there's no -d flag, there's probably some magic to knowing which device is the default one, but this run command could always just require the flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for this info, I will do this in a follow on CL.

@johnmccutchan johnmccutchan added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 29, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 29, 2024
Copy link
Contributor

auto-submit bot commented Feb 29, 2024

auto label is removed for flutter/engine/51037, due to - The status or check suite Mac mac_host_engine has failed. Please fix the issues identified (or deflake) before re-applying this label.

@johnmccutchan johnmccutchan force-pushed the et_run branch 2 times, most recently from 13920e3 to dc69440 Compare March 1, 2024 00:05
@johnmccutchan johnmccutchan added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 1, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 1, 2024
Copy link
Contributor

auto-submit bot commented Mar 1, 2024

auto label is removed for flutter/engine/51037, due to - The status or check suite Linux linux_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label.

The `run` command builds both the host and target engines and then
invokes `flutter run` so that it runs with the custom engine builds.

It is expected that 'et run' be used inside the directory of a flutter
application.

Command line flags passed after `--` will be forwarded to `flutter run`.

Some examples:

`et run` Build the debug variant and runs the app in that mode.
`et run -- --profile` Build the profile variant and runs the app in that mode.
`et run -- --release` Build the release variant and runs the app in that mode.
@johnmccutchan johnmccutchan added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 1, 2024
@auto-submit auto-submit bot merged commit 34cf95c into flutter:main Mar 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 1, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 1, 2024
…144450)

flutter/engine@0db468f...34cf95c

2024-03-01 john@johnmccutchan.com Add et run command (flutter/engine#51037)

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 aaclarke@google.com,rmistry@google.com,zra@google.com 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

4 participants