Skip to content

Conversation

@deldering
Copy link
Contributor

@deldering deldering commented Aug 2, 2023

Implement expected functionalities when supplying --web-launch-url and/or --web-hostname arguments to flutter drive.

  • --web-launch-url now sets the starting url for the (headless) browser
    • Which for example means you can start at a certain part of the app at the start of your integration test
  • --web-hostname now sets the hostname where the target of flutter drive will be hosted
    • Which allows you to set something other than localhost (allowing access via a reverse-proxy for example)

Fixes #118028

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • 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.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@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 (don't just cc him here, he won't see it! He's on Discord!).

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.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 2, 2023
@andrewkolos
Copy link
Contributor

@eyebrowsoffire Would you be interested in reviewing this PR?

Copy link
Contributor

@eyebrowsoffire eyebrowsoffire left a comment

Choose a reason for hiding this comment

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

Looks mostly good! One question/nitpick

_webUri = _residentRunner.uri;

if (_webUri == null) {
if (_residentRunner.uri == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this check move down to after processing the debugging options? We only care want to error if we couldn't produce a valid _webUri, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would say that both the _webUri and _residentRunner.uri should be valid. Even if you supply a different webLaunchUrl the original connection should still be able to be set up properly. That is why I didn't use tryParse for applying the webLaunchUrl later on if it is supplied.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another option would be to use tryParse if webLaunchUrl is available and throw a ToolExit if it returns null

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have a strong opinion on it. It's just a nitpick, and it's fine either way, I just think it makes more sense to validate the URI we're actually going to use. But I'm fine with landing it with any of those options.

@@ -1,3 +1,2 @@
lib/generated_plugin_registrant.dart
Copy link
Contributor

Choose a reason for hiding this comment

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

why was this removed?

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

@christopherfujino christopherfujino added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 10, 2023
@auto-submit auto-submit bot merged commit 82e2de0 into flutter:master Aug 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 11, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 11, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 11, 2023
flutter/flutter@685141b...9b6945b

2023-08-11 [email protected] Roll Flutter Engine from 93e8901490e7 to 77dfeea40e10 (1 revision) (flutter/flutter#132389)
2023-08-11 [email protected] Roll Flutter Engine from 4e532b957225 to 93e8901490e7 (1 revision) (flutter/flutter#132381)
2023-08-11 [email protected] Roll Flutter Engine from 25afdb9b696d to 4e532b957225 (4 revisions) (flutter/flutter#132376)
2023-08-11 [email protected] Roll Flutter Engine from da23fb0d9a1d to 25afdb9b696d (1 revision) (flutter/flutter#132370)
2023-08-11 [email protected] Roll Flutter Engine from acd1bc5536ef to da23fb0d9a1d (2 revisions) (flutter/flutter#132367)
2023-08-11 [email protected] Roll Flutter Engine from 578a8e8aabf6 to acd1bc5536ef (1 revision) (flutter/flutter#132365)
2023-08-11 [email protected] Roll Flutter Engine from 18a71c031f5f to 578a8e8aabf6 (1 revision) (flutter/flutter#132364)
2023-08-11 [email protected] Update `dev/devicelab/**` to provide `--local-engine-host`. (flutter/flutter#132342)
2023-08-10 [email protected] Roll Flutter Engine from b019ac62f21f to 18a71c031f5f (2 revisions) (flutter/flutter#132347)
2023-08-10 [email protected] Roll Flutter Engine from 16b01b98af20 to b019ac62f21f (1 revision) (flutter/flutter#132341)
2023-08-10 [email protected] Update `flutter_tools/bin/*.(dart|sh)` to provide, if set, --local-engine-host. (flutter/flutter#132336)
2023-08-10 [email protected] Update application id and bundle id of a11y assessment app (flutter/flutter#132334)
2023-08-10 [email protected] Roll Flutter Engine from a9be77e6f475 to 16b01b98af20 (6 revisions) (flutter/flutter#132332)
2023-08-10 [email protected] Remove the fast reassemble / single widget reload feature (flutter/flutter#132255)
2023-08-10 [email protected] Analyze code snippets in integration_test docs (flutter/flutter#132314)
2023-08-10 [email protected] Adds SemanticsNode Finders for searching the semantics tree (flutter/flutter#127137)
2023-08-10 [email protected] TextField should correctly resolve provided style for material states (flutter/flutter#132330)
2023-08-10 [email protected] setState documentation (flutter/flutter#132090)
2023-08-10 [email protected] Roll Flutter Engine from ea7730c16301 to a9be77e6f475 (6 revisions) (flutter/flutter#132328)
2023-08-10 [email protected] Fix: use --web-launch-url and --web-hostname arguments in flutter drive (flutter/flutter#131763)
2023-08-10 [email protected] GridView sample code (flutter/flutter#131900)
2023-08-10 [email protected] Upgrade flutter packages. (flutter/flutter#132326)
2023-08-10 [email protected] TextPainter migration cleanup (flutter/flutter#132317)
2023-08-10 [email protected] An example of parentData usage. (flutter/flutter#131818)
2023-08-10 [email protected] Add hasInteractedByUser getter in FormField (flutter/flutter#131539)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--web-launch-url option has no effect for flutter drive

4 participants