Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Aug 28, 2020

Description

Deprecate devices command --timeout flag, replace with a command-level --device-timeout flag. Also use in flutter run, drive, attach, install, screenshot, and logs.

Related Issues

Another piece to #15072 to allow longer timeouts for networked devices.

This will allow devicelab tests to pass a longer timeout to flutter drive for tests targeting slower iOS devices.

Tests

Added does/does not refreshes device cache with a timeout tests.

Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.

@jmagman jmagman added the platform-ios iOS applications specifically label Aug 28, 2020
@jmagman jmagman self-assigned this Aug 28, 2020
@flutter-dashboard flutter-dashboard bot added tool Affects the "flutter" command-line tool. See also t: labels. work in progress; do not review labels Aug 28, 2020
@jmagman jmagman changed the title Add --device-timeout flag to run, drive, and devices commands Add --device-timeout flag to device-related commands Aug 28, 2020
@jmagman jmagman requested review from xster and zanderso August 29, 2020 00:35
@jmagman jmagman marked this pull request as ready for review August 29, 2020 00:35
Copy link
Member Author

Choose a reason for hiding this comment

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

@zanderso What do you think of this hard deprecation? I doubt this is commonly used. I didn't want to silently drop it. I could make it more complicated and print this warning, but then try to pass the deprecated timeout down into deviceDiscoveryTimeout.

Copy link
Member

Choose a reason for hiding this comment

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

Plumbing it to deviceDiscovertyTimeout sounds like the right way to deprecate this. It can then be entirely removed after the stable branch cut.

Copy link
Member Author

Choose a reason for hiding this comment

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

This has the side effect of repopulating the devices cache, with the timeout duration. We decided to do this in #51678 (comment) to avoid google3 breakages.

Copy link
Member

Choose a reason for hiding this comment

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

Plumbing it to deviceDiscovertyTimeout sounds like the right way to deprecate this. It can then be entirely removed after the stable branch cut.

@jmagman
Copy link
Member Author

jmagman commented Sep 2, 2020

Plumbing it to deviceDiscovertyTimeout sounds like the right way to deprecate this. It can then be entirely removed after the stable branch cut.

Done. Now it warns about the deprecation, but uses the old flag value.
Screen Shot 2020-09-02 at 11 45 58 AM

@jmagman jmagman merged commit 6175183 into flutter:master Sep 2, 2020
@jmagman jmagman deleted the device-timeout branch September 2, 2020 22:38
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants