Skip to content

Conversation

@bkonyi
Copy link
Contributor

@bkonyi bkonyi commented Aug 1, 2024

Nullable types for values in map patterns require the key to be present. Since the 'uri' key is not always present in DDS exception responses, this was causing us to fall back to throwing a StateError.

Fixes #152684

Nullable types for values in map patterns require the key to be present.
Since the 'uri' key is not always present in DDS exception responses,
this was causing us to fall back to throwing a StateError.

Fixes #152684
@bkonyi bkonyi marked this pull request as ready for review August 1, 2024 15:52
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 1, 2024
DartDevelopmentServiceException.existingDdsInstance(
message,
ddsUri: Uri.parse(uri!),
ddsUri: Uri.parse(json['uri']! as String),
Copy link
Member

Choose a reason for hiding this comment

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

But the key might still not be present, though right? Doesn't this still need to be more defensive?

Copy link
Contributor Author

@bkonyi bkonyi Aug 1, 2024

Choose a reason for hiding this comment

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

For this particular DDS error, this property should always be present. The other two exception types will never provide uri.

Copy link
Member

Choose a reason for hiding this comment

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

I'll take your word for it since I don't know this code super well, but in general I'd encourage being much more paranoid when parsing json.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 1, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Aug 1, 2024

auto label is removed for flutter/flutter/152685, due to - The status or check suite Mac tool_integration_tests_2_5 has failed. Please fix the issues identified (or deflake) before re-applying this label.

@bkonyi bkonyi merged commit d55a0b3 into master Aug 1, 2024
@bkonyi bkonyi deleted the fix_dds_exception_parsing branch August 1, 2024 18:38
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 3, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 3, 2024
Manual roll requested by [email protected]

flutter/flutter@4ff9462...f10a497

2024-08-02 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Shift Linux_build_test tests from MotoG4 to mokey (#152750)" (flutter/flutter#152755)
2024-08-02 [email protected] Shift Linux_build_test tests from MotoG4 to mokey (flutter/flutter#152750)
2024-08-02 [email protected] Roll Flutter Engine from b408111b976c to 077b6f057b69 (1 revision) (flutter/flutter#152745)
2024-08-02 [email protected] Add test for scaffold_state.show_bottom_sheet.0.dart (flutter/flutter#152731)
2024-08-02 [email protected] Roll Flutter Engine from fe39ed980e74 to b408111b976c (6 revisions) (flutter/flutter#152739)
2024-08-02 [email protected] Roll Flutter Engine from ab3f177fb61d to fe39ed980e74 (1 revision) (flutter/flutter#152721)
2024-08-02 [email protected] Roll Flutter Engine from 1cbe88e8115e to ab3f177fb61d (4 revisions) (flutter/flutter#152718)
2024-08-01 [email protected] Roll Flutter Engine from 17e3c7d520e7 to 1cbe88e8115e (5 revisions) (flutter/flutter#152707)
2024-08-01 [email protected] Use `.fromMap()` constructors in example code (flutter/flutter#152535)
2024-08-01 [email protected] Add more widgets to a11y assessment app (flutter/flutter#152662)
2024-08-01 [email protected] Roll Flutter Engine from 230879c7936e to 17e3c7d520e7 (1 revision) (flutter/flutter#152703)
2024-08-01 [email protected] Explain that predictive back doesn't work with WillPopScope (flutter/flutter#152116)
2024-08-01 [email protected] SearchBar.scrollPadding (flutter/flutter#152635)
2024-08-01 [email protected] Quick docs grammar fixes (flutter/flutter#152700)
2024-08-01 [email protected] Roll Flutter Engine from bbb2fcad4808 to 230879c7936e (1 revision) (flutter/flutter#152701)
2024-08-01 [email protected] Disable DDS and Dart profiling for Android driver tests. (flutter/flutter#152696)
2024-08-01 [email protected] Remove one set of parens that wrap a single String literal (flutter/flutter#152031)
2024-08-01 [email protected] Roll Flutter Engine from 7c4a44611abe to bbb2fcad4808 (3 revisions) (flutter/flutter#152694)
2024-08-01 [email protected] Fix bad pattern matching in DDS exception parsing (flutter/flutter#152685)
2024-08-01 [email protected] Roll Packages from 46a712f to 27896d1 (7 revisions) (flutter/flutter#152693)
2024-08-01 [email protected] [CupertinoActionSheet & AlertDialog] Improve documentation and type for `scrollController` parameters (flutter/flutter#152647)
2024-08-01 [email protected] Fix typo in CHANGELOG.md (flutter/flutter#152543)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TytaniumDev pushed a commit to TytaniumDev/flutter that referenced this pull request Aug 7, 2024
Nullable types for values in map patterns require the key to be present.
Since the 'uri' key is not always present in DDS exception responses,
this was causing us to fall back to throwing a StateError.

Fixes flutter#152684
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
Nullable types for values in map patterns require the key to be present.
Since the 'uri' key is not always present in DDS exception responses,
this was causing us to fall back to throwing a StateError.

Fixes flutter#152684
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2024
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.

Bad state: Invalid DartDevelopmentServiceException JSON error from Linux_android_emu tests causing many flakes

2 participants