-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add publish-port flag to disable mDNS port discovery #67452
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
Conversation
jonahwilliams
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Observatory or VM Service ?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you document the reasoning for leaving it enabled on run?
jonahwilliams
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
zanderso
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 w/ question
| flutterUsage: _flutterUsage, | ||
| ).send(); | ||
|
|
||
| try { |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's still used on attach, but no longer used for drive or run.
| await MDnsObservatoryDiscovery.instance.getObservatoryUri( |
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