[flutter_tools] Add timeout duration to error and handle exceptions for HttpHostValidator.#98290
Conversation
There was a problem hiding this comment.
Not sure why the .toList was needed here
There was a problem hiding this comment.
Why did you condense lines 89-92 into one? I feel like it is more difficult to read as a one-liner.
There was a problem hiding this comment.
So should I reintroduce availabilityResultFutures?
There was a problem hiding this comment.
If it was just a style refactor, I would prefer having availabilityResultFutures
There was a problem hiding this comment.
I agree that .toList() was redundant
|
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
69f00bb to
fbf784e
Compare
There was a problem hiding this comment.
We already mention $host before this message, no need to mention it again.
There was a problem hiding this comment.
e.toString() => e.message
There was a problem hiding this comment.
yikes, good catch
1140d90 to
3e6c6fb
Compare
There was a problem hiding this comment.
can this also be lifted outside of the try block?
There was a problem hiding this comment.
Are you catching FormatException?
There was a problem hiding this comment.
Not in this PR, but in the (future)PR that fixes that issue, and I see no point in moving this line when eventually it has to be moved back.
There was a problem hiding this comment.
any reason not to catch and toolexit on formatexception in this PR?
There was a problem hiding this comment.
Nothing specific, thought it would be better to land separate PRs to fix separate issues, but I can include all in one if you are okay with that.
There was a problem hiding this comment.
Sounds good to me as long as it's not a lot more code, which I imagine it wouldn't be?
There was a problem hiding this comment.
@christopherfujino I've pushed a commit that handles all possible exceptions, PTAL.
3e6c6fb to
2aa5a65
Compare
a4061bd to
cbde691
Compare
cbde691 to
6c4cd61
Compare
|
This pull request is not suitable for automatic merging in its current state.
|
|
@Jasguerrero can you give another review on this one? |
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
…ptions for HttpHostValidator. (flutter/flutter#98290)
Includes the timeout duration, handles exceptions for invalid
FLUTTER_DOCTOR_HOST_TIMEOUT,PUB_HOSTED_URLorFLUTTER_STORAGE_BASE_URLenvironment variables ofHttpHostValidator.Also includes some code hand-formatting/cleanup for readability.
Adds tests to make sure the timeout is being displayed and exceptions are handled accordingly.
Fixes #98286.
Fixes #98328.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.