-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[iOS] fix hot restart with native assets #148752
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
[iOS] fix hot restart with native assets #148752
Conversation
93cd0b9 to
297c0eb
Compare
|
@dcharkes, I think this should work, but the tree is currently broken and the integration tests are currently failing for unrelated reason. |
29571ba to
8cef4c2
Compare
|
@dcharkes, it seems that the hot reload test (with the fix) passes successfully on simulator on CI: |
8cef4c2 to
6552cec
Compare
dcharkes
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.
Great!
Before merging, could you check the existing device lab test? That already spin up a simulator.
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.
We have all this logic already in the device lab tests.
$ cd <...>/flutter/dev/devicelab && dart bin/test_runner.dart test -t native_assets_ios_simulator
Would you be able to check why the existing hot integration test was not failing on the ios simulator?
(I don't feel strongly opposed to adding the logic also here, but since we already have it in the device lab tests it feels a bit like unnecessary code duplication.)
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 think the problem is that when hot restart happens this is in the logs
Performing hot restart...
Restarted application in 325ms.
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following ArgumentError was thrown building _FocusInheritedScope:
The test only checks for Restarted application, which is there, so it assumes it passed, the exception is printed after. I think this is handled bit differently in the integration tests that's why those catch the issue.
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 present in the integration test
expect(stdout, isNot(contains('EXCEPTION CAUGHT BY WIDGETS LIBRARY')));Probably should be added to device lab tool
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.
But even if I detect the exception and return TaskResult.failure the task still exits with success for some reason.
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.
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 wouldn't mind having it there, it's easier to run locally than the devicelab test.
However, I believe we shouldn't be using infinite resources on CI. And the test coverage should be similar between the integration test with the simulator and the devicelab test with the simulator.
cc @jmagman @vashworth What's our policy on how much testing resources we use? And what's the policy on where simulator tests should run? (Integration suite vs device lab. I'm added the simulator to the device lab based on existing device lab tests that run the simulator.)
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 for diving into this @knopp! ❤️
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 4/4 shard already takes long time to complete (in fact it did timeout in previous run and I had to restart it). I think maybe it's a good idea to remove it.
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.
Yeah that test runs long already. We don't want to introduce flakes due to timeouts. Let's remove it from this PR.
That means that this PR will just be a test fix and a fix 👍
343cf29 to
eb6b04c
Compare
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.
Please also fix dev/devicelab/bin/tasks/native_assets_ios.dart
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.
That one seems fine? I looked at it and it seems to propagate the result of createNativeAssetsTest correctly.
dcharkes
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.
LGTM with simulator removed again from integration test.
|
@dcharkes I don't think it is related to this PR. I'm going to restart the test to see if it passes, but I think it might be flaky? |
This reverts commit 24d81275222cc480db740cb91d4204a009faeaed.
This reverts commit fdbb5637ca8ef46ae86ba018ac9a413d8fe087f7.
This reverts commit 55fb3865e8a150553e1c129bfb20fe1d32ce27cc.
This reverts commit b69c39c536711cc8563f2f27d0c2539b72b17fd4.
edf78f0 to
8eca905
Compare
flutter/flutter@73bf206...8d955cd 2024-05-23 [email protected] Update `FocusManager` platform check to include iOS (flutter/flutter#148612) 2024-05-23 [email protected] [iOS] fix hot restart with native assets (flutter/flutter#148752) 2024-05-23 [email protected] Roll Flutter Engine from b8b82454e302 to 964f087f288c (8 revisions) (flutter/flutter#148943) 2024-05-23 [email protected] Fix DecoratedSliver sample code to reflect the description (flutter/flutter#148621) 2024-05-23 [email protected] Test raw autocomplete api examples (flutter/flutter#148234) 2024-05-23 [email protected] Add test for scaffold.0.dart and scaffold.2.dart (flutter/flutter#148166) 2024-05-23 [email protected] Add tests for restorable_value.0.dart API example. (flutter/flutter#148676) 2024-05-23 [email protected] Roll Flutter Engine from 8b094fbb94d8 to b8b82454e302 (6 revisions) (flutter/flutter#148919) 2024-05-22 [email protected] Allow `RenderObject.getTransformTo` to take an arbitrary RenderObject in the same tree (flutter/flutter#148897) 2024-05-22 [email protected] 3.22.1 changelog updates (flutter/flutter#148895) 2024-05-22 [email protected] Add frame number and widget location map service extension (flutter/flutter#148702) 2024-05-22 [email protected] Remove an assert with false positives (flutter/flutter#148795) 2024-05-22 [email protected] Revert "Fix the second TextFormField to trigger onTapOutside" (flutter/flutter#148909) 2024-05-22 [email protected] [wiki migration] Remaining pages under docs/about/ (flutter/flutter#148782) 2024-05-22 [email protected] Roll Flutter Engine from b6971cdf14f8 to 8b094fbb94d8 (3 revisions) (flutter/flutter#148883) 2024-05-22 [email protected] Fix the second TextFormField to trigger onTapOutside (flutter/flutter#148206) 2024-05-22 [email protected] Try removing robolectric from `integration_test` tests (flutter/flutter#148803) 2024-05-22 [email protected] Prevent test folder deletion on running `flutter create --empty` on an existing app project (flutter/flutter#147160) 2024-05-22 [email protected] [wiki migration] Tool team pages (flutter/flutter#148779) 2024-05-22 [email protected] Roll Flutter Engine from c89defa55801 to b6971cdf14f8 (6 revisions) (flutter/flutter#148819) 2024-05-22 [email protected] [native_assets] Add support for link hooks (flutter/flutter#148474) 2024-05-22 [email protected] Roll Packages from ba19b24 to 6525441 (12 revisions) (flutter/flutter#148864) 2024-05-22 [email protected] Update tokens to 4.0.0 (flutter/flutter#148789) 2024-05-22 [email protected] Move Linux web_long_running_tests_2_5 to bringup (flutter/flutter#148854) 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
Fixes flutter#148687 Adds support for running the hot restart and reload integration test on iOS simulator. ## 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 `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#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/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat [Data Driven Fixes]: https://github.com/flutter/flutter/wiki/Data-driven-Fixes
Fixes flutter#148687 Adds support for running the hot restart and reload integration test on iOS simulator. ## 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 `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#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/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat [Data Driven Fixes]: https://github.com/flutter/flutter/wiki/Data-driven-Fixes
Fixes #148687
Adds support for running the hot restart and reload integration test on iOS simulator.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.