Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 77 additions & 3 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ platform_properties:
device_type: none
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
{"dependency": "chrome_and_driver", "version": "version:145.0.7632.117"}
]
windows_arm64:
properties:
Expand Down Expand Up @@ -217,6 +217,14 @@ targets:
channel: stable
version_file: flutter_stable.version
package_sharding: "--shardIndex 0 --shardCount 3"
# TODO(mdebbar): Upgrade to Chrome 145 once Flutter stable includes the
# upstream flutter_tools fixes for Chrome 145 (flutter/flutter#190155 and
# flutter/flutter#190584) which pass --disable-search-engine-choice-screen
# and --disable-background-timer-throttling.
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
]

- name: Linux_web web_dart_unit_test_shard_2 stable
recipe: packages/packages
Expand All @@ -226,6 +234,14 @@ targets:
channel: stable
version_file: flutter_stable.version
package_sharding: "--shardIndex 1 --shardCount 3"
# TODO(mdebbar): Upgrade to Chrome 145 once Flutter stable includes the
# upstream flutter_tools fixes for Chrome 145 (flutter/flutter#190155 and
# flutter/flutter#190584) which pass --disable-search-engine-choice-screen
# and --disable-background-timer-throttling.
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
]

- name: Linux_web web_dart_unit_test_shard_3 stable
recipe: packages/packages
Expand All @@ -235,6 +251,14 @@ targets:
channel: stable
version_file: flutter_stable.version
package_sharding: "--shardIndex 2 --shardCount 3"
# TODO(mdebbar): Upgrade to Chrome 145 once Flutter stable includes the
# upstream flutter_tools fixes for Chrome 145 (flutter/flutter#190155 and
# flutter/flutter#190584) which pass --disable-search-engine-choice-screen
# and --disable-background-timer-throttling.
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
]

# Wasm unit tests in master
# TODO(stuartmorgan): Switch to testing wasm on master and stable and non-wasm
Expand Down Expand Up @@ -321,7 +345,7 @@ targets:
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"},
{"dependency": "cmake", "version": "build_id:8787856497187628321"},
{"dependency": "ninja", "version": "version:1.9.0"},
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
{"dependency": "chrome_and_driver", "version": "version:145.0.7632.117"}
]
channel: master

Expand All @@ -334,6 +358,10 @@ targets:
version_file: flutter_stable.version
target_file: linux_custom_package_tests.yaml
# See comments on 'master' version above.
# TODO(mdebbar): Upgrade to Chrome 145 once Flutter stable includes the
# upstream flutter_tools fixes for Chrome 145 (flutter/flutter#190155 and
# flutter/flutter#190584) which pass --disable-search-engine-choice-screen
# and --disable-background-timer-throttling.
dependencies: >-
[
{"dependency": "android_virtual_device", "version": "android_36_google_apis_x64.textpb"},
Expand Down Expand Up @@ -685,6 +713,15 @@ targets:
channel: master
package_sharding: "--shardIndex 2 --shardCount 3"

- name: Linux_web web_platform_tests_camera_web master
recipe: packages/packages
bringup: true
timeout: 90
properties:
target_file: web_platform_tests_camera_web.yaml
version_file: flutter_master.version
channel: master

# Wasm integration tests in master
- name: Linux_web web_platform_tests_wasm_shard_1 master
recipe: packages/packages
Expand Down Expand Up @@ -713,6 +750,15 @@ targets:
channel: master
package_sharding: "--shardIndex 2 --shardCount 3"

- name: Linux_web web_platform_tests_camera_web_wasm master
recipe: packages/packages
bringup: true
timeout: 90
properties:
target_file: web_platform_tests_camera_web_wasm.yaml
version_file: flutter_master.version
channel: master

# JS integration tests in stable
- name: Linux_web web_platform_tests_shard_1 stable
recipe: packages/packages
Expand All @@ -722,6 +768,14 @@ targets:
version_file: flutter_stable.version
channel: stable
package_sharding: "--shardIndex 0 --shardCount 3"
# TODO(mdebbar): Upgrade to Chrome 145 once Flutter stable includes the
# upstream flutter_tools fixes for Chrome 145 (flutter/flutter#190155 and
# flutter/flutter#190584) which pass --disable-search-engine-choice-screen
# and --disable-background-timer-throttling.
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
]

- name: Linux_web web_platform_tests_shard_2 stable
recipe: packages/packages
Expand All @@ -731,6 +785,14 @@ targets:
version_file: flutter_stable.version
channel: stable
package_sharding: "--shardIndex 1 --shardCount 3"
# TODO(mdebbar): Upgrade to Chrome 145 once Flutter stable includes the
# upstream flutter_tools fixes for Chrome 145 (flutter/flutter#190155 and
# flutter/flutter#190584) which pass --disable-search-engine-choice-screen
# and --disable-background-timer-throttling.
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
]

- name: Linux_web web_platform_tests_shard_3 stable
recipe: packages/packages
Expand All @@ -740,6 +802,14 @@ targets:
version_file: flutter_stable.version
channel: stable
package_sharding: "--shardIndex 2 --shardCount 3"
# TODO(mdebbar): Upgrade to Chrome 145 once Flutter stable includes the
# upstream flutter_tools fixes for Chrome 145 (flutter/flutter#190155 and
# flutter/flutter#190584) which pass --disable-search-engine-choice-screen
# and --disable-background-timer-throttling.
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
]

### Linux desktop tasks
- name: Linux_desktop build_all_packages master
Expand Down Expand Up @@ -769,7 +839,7 @@ targets:
# Install Chrome as a default handler for schemes for url_launcher.
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
{"dependency": "chrome_and_driver", "version": "version:145.0.7632.117"}
]

- name: Linux_desktop platform_tests stable
Expand All @@ -781,6 +851,10 @@ targets:
target_file: linux_platform_tests.yaml
channel: stable
# Install Chrome as a default handler for schemes for url_launcher.
# TODO(mdebbar): Upgrade to Chrome 145 once Flutter stable includes the
# upstream flutter_tools fixes for Chrome 145 (flutter/flutter#190155 and
# flutter/flutter#190584) which pass --disable-search-engine-choice-screen
# and --disable-background-timer-throttling.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's get (and link to) an issue for this with packages and p: waiting for stable update so we find it when doing the next stable update.

dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
Expand Down
16 changes: 16 additions & 0 deletions .ci/targets/web_platform_tests_camera_web.yaml

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Per my other comment, I think these files and the new shards should be reverted.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

(Also, keeping the new shard would cause every PR to unconditionally run camera_web tests no matter what was being touched, which combined with the fact that it's presumably going to consume a machine for 60 minutes every time would be extremely wasteful of CI resources.)

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: download Dart deps
script: .ci/scripts/tool_runner.sh
args: ["fetch-deps", "--web", "--supporting-target-platforms-only"]
infra_step: true
- name: drive examples
script: .ci/scripts/tool_runner.sh
args: [
"drive-examples",
"--web",
"--run-chromedriver",
"--packages=camera_web",
]
17 changes: 17 additions & 0 deletions .ci/targets/web_platform_tests_camera_web_wasm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: download Dart deps
script: .ci/scripts/tool_runner.sh
args: ["fetch-deps", "--web", "--supporting-target-platforms-only"]
infra_step: true
- name: drive examples
script: .ci/scripts/tool_runner.sh
args: [
"drive-examples",
"--web",
"--wasm",
"--run-chromedriver",
"--packages=camera_web",
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

import 'package:integration_test/integration_test_driver.dart';

Future<void> main() => integrationDriver();
Future<void> main() => integrationDriver(timeout: const Duration(minutes: 30));
15 changes: 14 additions & 1 deletion packages/cross_file/dart_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,17 @@ override_platforms:
chrome:
settings:
executable: chrome
arguments: --no-sandbox
arguments: >-
--no-sandbox
--disable-background-timer-throttling
--disable-renderer-backgrounding
--disable-background-networking
--disable-search-engine-choice-screen
--disable-extensions
--disable-popup-blocking
--disable-translate
--disable-default-apps
--no-default-browser-check
--no-first-run
--password-store=basic
--bwsi
15 changes: 14 additions & 1 deletion packages/cross_file/example/dart_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,17 @@ override_platforms:
chrome:
settings:
executable: chrome
arguments: --no-sandbox
arguments: >-
--no-sandbox
--disable-background-timer-throttling
--disable-renderer-backgrounding
--disable-background-networking
--disable-search-engine-choice-screen
--disable-extensions
--disable-popup-blocking
--disable-translate
--disable-default-apps
--no-default-browser-check
--no-first-run
--password-store=basic
--bwsi
15 changes: 14 additions & 1 deletion packages/google_identity_services_web/dart_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,17 @@ override_platforms:
chrome:
settings:
executable: chrome
arguments: --no-sandbox
arguments: >-
--no-sandbox
--disable-background-timer-throttling
--disable-renderer-backgrounding
--disable-background-networking
--disable-search-engine-choice-screen
--disable-extensions
--disable-popup-blocking
--disable-translate
--disable-default-apps
--no-default-browser-check
--no-first-run
--password-store=basic
--bwsi
15 changes: 14 additions & 1 deletion packages/plugin_platform_interface/dart_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,17 @@ override_platforms:
chrome:
settings:
executable: chrome
arguments: --no-sandbox
arguments: >-
--no-sandbox
--disable-background-timer-throttling
--disable-renderer-backgrounding
--disable-background-networking
--disable-search-engine-choice-screen
--disable-extensions
--disable-popup-blocking
--disable-translate
--disable-default-apps
--no-default-browser-check
--no-first-run
--password-store=basic
--bwsi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test_on: vm
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ void main() {
// Due to the duration calculation accuracy between platforms,
// the milliseconds on Web will be a slightly different from natives.
// The audio was made with 44100 Hz, 192 Kbps CBR, and 32 bits.
expect(controller.value.duration, const Duration(seconds: 5, milliseconds: kIsWeb ? 42 : 41));
expect(controller.value.duration.inMilliseconds, closeTo(5000, 50));
});

testWidgets('can be played', (WidgetTester tester) async {
Expand Down
3 changes: 2 additions & 1 deletion packages/web_benchmarks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 4.1.2

* Updates Chrome launch arguments to unblock Chrome 145+ upgrade.
* Updates minimum supported SDK version to Flutter 3.38/Dart 3.10.

## 4.1.1
Expand Down
30 changes: 26 additions & 4 deletions packages/web_benchmarks/lib/src/browser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,16 @@ class Chrome {
final args = <String>[
if (options.userDataDirectory != null) '--user-data-dir=${options.userDataDirectory}',
if (url != null) url,
if (io.Platform.environment['CHROME_NO_SANDBOX'] == 'true') '--no-sandbox',
if (options.headless) '--headless',
if (withDebugging) '--remote-debugging-port=${options.debugPort}',
'--window-size=${options.windowWidth},${options.windowHeight}',
'--disable-background-timer-throttling',
'--disable-renderer-backgrounding',
'--disable-background-networking',
'--disable-sync',
'--disable-client-side-phishing-detection',
'--disable-notifications',
'--disable-features=GCM',
'--gcm-checkin-url=http://127.0.0.1',
'--gcm-registration-url=http://127.0.0.1',
'--gcm-mcs-endpoint=127.0.0.1:0',
'--disable-extensions',
'--disable-popup-blocking',
// Indicates that the browser is in "browse without sign-in" (Guest session) mode.
Expand All @@ -110,6 +116,22 @@ class Chrome {
'--no-default-browser-check',
'--disable-default-apps',
'--disable-translate',
'--password-store=basic',
if (io.Platform.isMacOS) '--use-mock-keychain',
'--disable-search-engine-choice-screen',
if (io.Platform.environment['CHROME_NO_SANDBOX'] == 'true') '--no-sandbox',
if (options.headless) ...<String>[
'--headless',
'--no-sandbox',
if (io.Platform.isLinux) ...<String>[
'--use-gl=angle',
'--use-angle=swiftshader',
'--enable-unsafe-swiftshader',
'--disable-gpu-sandbox',
],
],
if (withDebugging) '--remote-debugging-port=${options.debugPort}',
'--window-size=${options.windowWidth},${options.windowHeight}',
];
final io.Process chromeProcess = await io.Process.start(
_findSystemChromeExecutable(),
Expand Down
2 changes: 1 addition & 1 deletion packages/web_benchmarks/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: web_benchmarks
description: A benchmark harness for performance-testing Flutter apps in Chrome.
repository: https://github.com/flutter/packages/tree/main/packages/web_benchmarks
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+web_benchmarks%22
version: 4.1.1
version: 4.1.2

environment:
sdk: ^3.10.0
Expand Down
3 changes: 3 additions & 0 deletions script/configs/exclude_integration_web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
- file_selector
# Waiting on https://github.com/flutter/flutter/issues/145149
- google_maps_flutter/google_maps_flutter
# Moved to its own dedicated shard due to long test duration

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm very skeptical that long test duration is the problem here. I looked at the presubmit run before you added this commit, and found this header in the log:

|| Running for packages/camera/camera_web [@1:59]

That means it started running camera_web tests two minutes into the run, and then timed out 58 minutes later. It seems much more likely to me that the camera_web tests are hanging than that they take exactly 59 minutes to successfully run. (Also, they only took 4.5 minutes the last time I see them succeeding in a roll.)

If we have all the tests except this working, and this one is still hanging for reasons we don't understand yet, we should just disable this test entirely with a link to an issue tracking investigating, fixing, and re-enabling the test.

- camera/camera_web

18 changes: 18 additions & 0 deletions script/tool/lib/src/drive_examples_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ class DriveExamplesCommand extends PackageLoopingCommand {

static const String _chromeDriverFlag = 'run-chromedriver';

static const List<String> _webChromeBrowserFlags = <String>[
'--web-browser-flag=--no-sandbox',
'--web-browser-flag=--disable-background-timer-throttling',
'--web-browser-flag=--disable-renderer-backgrounding',
'--web-browser-flag=--disable-background-networking',
'--web-browser-flag=--disable-search-engine-choice-screen',
'--web-browser-flag=--disable-extensions',
'--web-browser-flag=--disable-popup-blocking',
'--web-browser-flag=--disable-translate',
'--web-browser-flag=--disable-default-apps',
'--web-browser-flag=--no-default-browser-check',
'--web-browser-flag=--no-first-run',
'--web-browser-flag=--password-store=basic',
'--web-browser-flag=--bwsi',
];

@override
final String name = 'drive-examples';

Expand Down Expand Up @@ -139,6 +155,8 @@ class DriveExamplesCommand extends PackageLoopingCommand {
if (useWasm) '--wasm',
if (platform.environment.containsKey('CHROME_EXECUTABLE'))
'--chrome-binary=${platform.environment['CHROME_EXECUTABLE']}',
..._webChromeBrowserFlags,
if (platform.isMacOS) '--web-browser-flag=--use-mock-keychain',
],
if (getBoolArg(platformWindows)) platformWindows: <String>['-d', 'windows'],
};
Expand Down
Loading
Loading