Skip to content
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

Re-enable scenario tests on Android #33574

Merged
merged 30 commits into from
Jun 3, 2022
Merged

Conversation

blasten
Copy link

@blasten blasten commented May 23, 2022

Re-enables the scenario tests on Android.

Fixes: flutter/flutter#90401

@blasten blasten force-pushed the ci_yaml branch 5 times, most recently from 9910962 to d18fff3 Compare May 27, 2022 22:07
@blasten blasten force-pushed the ci_yaml branch 2 times, most recently from 28295a4 to 74f9c92 Compare June 1, 2022 03:07
@skia-gold
Copy link

Gold has detected about 1 new digest(s) on patchset 15.
View them at https://flutter-engine-gold.skia.org/cl/github/33574

@skia-gold
Copy link

Gold has detected about 1 new digest(s) on patchset 16.
View them at https://flutter-engine-gold.skia.org/cl/github/33574

double width = 500,
double height = 500,
}) async {
final bool usesAndroidHybridComposition = scenarioParams['use_android_view'] as bool;
Copy link
Contributor

Choose a reason for hiding this comment

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

scenarioParams['use_android_view'] is null on iOS and triggers a crash when trying to cast.

Copy link
Author

Choose a reason for hiding this comment

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

done!

@skia-gold
Copy link

Gold has detected about 1 new digest(s) on patchset 17.
View them at https://flutter-engine-gold.skia.org/cl/github/33574

@skia-gold
Copy link

Gold has detected about 2 new digest(s) on patchset 19.
View them at https://flutter-engine-gold.skia.org/cl/github/33574

@skia-gold
Copy link

Gold has detected about 24 new digest(s) on patchset 21.
View them at https://flutter-engine-gold.skia.org/cl/github/33574

@skia-gold
Copy link

Gold has detected about 24 new digest(s) on patchset 22.
View them at https://flutter-engine-gold.skia.org/cl/github/33574

@blasten blasten marked this pull request as ready for review June 2, 2022 21:46
@blasten blasten requested review from dnfield and GaryQian June 2, 2022 21:46
void _onBeginFrame(Duration duration) {
currentScenario?.onBeginFrame(duration);

Future<void> _onBeginFrame(Duration duration) async {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we avoid making this async? There's nothing getting awaited in here.

Copy link
Author

Choose a reason for hiding this comment

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

done

final SceneBuilder builder = SceneBuilder();

finishBuilderByAddingPlatformViewAndPicture(builder, id);
await addPlatformView(
Copy link
Contributor

Choose a reason for hiding this comment

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

We should try to avoid this - instead we should be pumping frames when things are ready. Making this async makes it a bit harder to reason about what actually drives this method getting called and when it will complete vs. the engine lifecycle side.

Copy link
Author

Choose a reason for hiding this comment

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

I think using async makes it more clear. For instance, the state is manage by the future, and there's no need to keep track of before/after a condition is met.

In this case the condition is that the method should receive an id from the platform before using the SsceneBuilder API.

Copy link
Contributor

Choose a reason for hiding this comment

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

But we're calling a future from something that can't handle futures. The state just disappears into the future and it's really not clear to me from reading this how that's interacting with the frame scheduling that's going on in the engine. I'm not sure if what we're testing here resembles the way a real application would use this or not (i.e. one that will have to handle frame scheduling, even if via the framework).

Copy link
Author

Choose a reason for hiding this comment

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

that's a good point. It's now scheduling frames as the framework does. It would be ideal if we could actually use the framework, and do a proper integration test. I think it's still not great that a lot of what we do in this test is assume the framework does something similar.

@dnfield
Copy link
Contributor

dnfield commented Jun 2, 2022

The golden files look like the emulator is having some error condition happening at startup and is rendering that over the application and platform views. We should fix that before landing this.

@dnfield
Copy link
Contributor

dnfield commented Jun 2, 2022

image

@skia-gold
Copy link

Gold has detected about 24 new digest(s) on patchset 27.
View them at https://flutter-engine-gold.skia.org/cl/github/33574

@flutter-dashboard
Copy link

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.

Changes reported for pull request #33574 at sha 0312c76

@dnfield
Copy link
Contributor

dnfield commented Jun 3, 2022

Code is looking good, there's still a system dialog showing over the UI

@skia-gold
Copy link

Gold has detected about 23 new digest(s) on patchset 30.
View them at https://flutter-engine-gold.skia.org/cl/github/33574

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #33574 at sha 2d5232c

@blasten
Copy link
Author

blasten commented Jun 3, 2022

@dnfield the latest ones look ok: https://flutter-engine-gold.skia.org/search?crs=github&issue=33574&patchsets=30&positive=true. I sent https://flutter-review.googlesource.com/c/recipes/+/30888 as I suspect one issue we are running is that the user data image is growing over time since these builders don't create a new clean environment whenever a new task is executed.

PTAL

@blasten
Copy link
Author

blasten commented Jun 3, 2022

Also see http://b/234791343

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM

@blasten blasten added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Jun 3, 2022
@fluttergithubbot fluttergithubbot merged commit ada245a into flutter:main Jun 3, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 3, 2022
zanderso added a commit that referenced this pull request Jun 3, 2022
zanderso added a commit that referenced this pull request Jun 3, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 3, 2022
blasten pushed a commit to blasten/engine that referenced this pull request Jun 14, 2022
blasten pushed a commit to blasten/engine that referenced this pull request Jun 14, 2022
houhuayong pushed a commit to houhuayong/engine that referenced this pull request Jun 21, 2022
houhuayong pushed a commit to houhuayong/engine that referenced this pull request Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform-android waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. will affect goldens
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Either fix or delete the Android emulator scenario app tests
5 participants