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

Conversation

@yjbanov
Copy link
Contributor

@yjbanov yjbanov commented Nov 18, 2021

This way browser installation happens early in the build process, and if it fails we get reasonable errors in the output.

Prior to this PR the browser was installed on-demand while the test framework was attempting to run a test. If the browser fails to install the test simply hangs (internally it is awaiting for the browser-localhost handshake), and there's no log output (probably because the test framework sets up a custom zone and intercepts console output).

@yjbanov yjbanov requested a review from mdebbar November 18, 2021 00:48
@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Nov 18, 2021
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

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

LGTM!


print('INFO: Starting Chrome download.');

final String url = PlatformBinding.instance.getChromeDownloadUrl(version);
Copy link
Contributor

Choose a reason for hiding this comment

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

Reading this code, it looks like we always re-download Chrome even if LUCI has provided us with a Chrome from CIPD. In fact, in the code above, we check to make sure that LUCI provided a Chrome installation, but here we download it again anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. We actually shouldn't enter this method when running on LUCI because the call is predicated on installer.isInstalled above:

if (installer.isInstalled) {
      infoLog.writeln(
          'Installation was skipped because Chrome version ${installer.version} is already installed.');
    }
} else {
  // calls this method
}

I'm going to assert here that we're not running on LUCI and see what happens.

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

Tiny typo in docs.

///
/// This may include things like staring web drivers, iOS Simulators, and/or
/// Android emulators.
/// This may include things like installing browsers, and staring web drivers,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// This may include things like installing browsers, and staring web drivers,
/// This may include things like installing browsers, and starting web drivers,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes needs tests platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants