Skip to content
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

[flutter_tool] Handle RPCErrorKind.kConnectionDisposed #164299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DanTup
Copy link
Contributor

@DanTup DanTup commented Feb 27, 2025

There's currently a lot of code that handles RPC Errors that contain the text "Service connection disposed" because the error originally did not have a unique error code.

A new error code was added in https://dart-review.googlesource.com/c/sdk/+/381501 but it's not currently used because it won't be caught by existing code.

This change updates all places that check for this text, and now also handle the new error code in preperation for the code changing in future.

See #153471

cc @bkonyi

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.
    Issue listed, but this change does not directly fix it, it just prepares for a related future change that will simplify handling these errors without string checks
  • 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].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

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

There's currently a lot of code that handles RPC Errors that contain the text "Service connection disposed" because the error originally did not have a unique error code.

A new error code was added in https://dart-review.googlesource.com/c/sdk/+/381501 but it's not currently used because it won't be caught by existing code.

This change updates all places that check for this text, and now also handle the new error code in preperation for the code changing in future.

See flutter#153471
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 27, 2025
@DanTup DanTup added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 13, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 13, 2025
Copy link
Contributor

auto-submit bot commented Mar 13, 2025

autosubmit label was removed for flutter/flutter/164299, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@DanTup
Copy link
Contributor Author

DanTup commented Mar 14, 2025

@bkonyi thanks! The bot says Google Testing failed, but it appears green here. I presume it's been re-run and it's ok for me to add the autosubmit tab back, but could you confirm this before I do? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants