Add publish-port flag to disable mDNS port discovery#67452
Add publish-port flag to disable mDNS port discovery#67452fluttergithubbot merged 6 commits intoflutter:masterfrom
Conversation
jonahwilliams
left a comment
There was a problem hiding this comment.
If the log scanning is sufficient, why do we need it for run? Removing the mDNS logic from everything but attach would be a tremendous simplification.
| argParser.addFlag('publish-observatory-port', | ||
| negatable: true, | ||
| hide: !verboseHelp, | ||
| help: 'Publish the observatory URL over mDNS. Disable to prevent the' |
There was a problem hiding this comment.
Observatory or VM Service ?
There was a problem hiding this comment.
Oh you. I'm still torn whether consistency or accuracy is better, considering in the engine it's called FlutterObservatoryPublisher etc. I'll reword.
I'm willing to give it a try, let's see if we get more failure reports. |
I think we still want it to launch and publish over mDNS with |
ed6435f to
8c5cd34
Compare
jonahwilliams
left a comment
There was a problem hiding this comment.
Can you document the reasoning for leaving it enabled on run?
| flutterUsage: _flutterUsage, | ||
| ).send(); | ||
|
|
||
| try { |
There was a problem hiding this comment.
To make sure I understand, this PR just removes mDNS discovery from fallback discovery, but it will still be used when needed from e.g. flutter attach?
There was a problem hiding this comment.
Yes, it's still used on attach, but no longer used for drive or run.
Description
Add a
publish-portflag torunanddrive. Default to on forrunand off fordrive.This will tell the engine to not use mDNS to publish the observatory port, which means the local network permission popup won't be blocking the app on
driveon iOS 14, which is particularly important in a CI environment.As of #66092 log scanning should be sufficient to parse the port without the mDNS fallback, so remove it.
Related Issues
Framework part of #65207
Engine launch flag PR at flutter/engine#21632
Tests
drive_test, fallback_discovery_test, ios_device_start_prebuilt_test.
Manual testing showed
flutter drivedidn't show the permission prompt on iOS 14, and the tests passed.Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change