Skip to content

Conversation

@dacianf
Copy link
Contributor

@dacianf dacianf commented May 14, 2022

Fix for issue #99671

Caching the resulting resource is done regardless of whether the call was successful. This results in caching both successful and failed results.
This PR changes the logic to only cache successful results.

Closes #99671

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.
  • 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.
  • All existing and new tests are passing.

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

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 14, 2022
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@google-cla
Copy link

google-cla bot commented May 14, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label May 17, 2022
@dacianf dacianf force-pushed the fix/flutter-issue-99671 branch from fbfe63e to 4f73b43 Compare May 18, 2022 07:17
@dacianf
Copy link
Contributor Author

dacianf commented May 18, 2022

@ditman When you have time, I would appreciate your review.

Comment on lines 93 to 96
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix indent:

void _expectRequestCounts(
  Map<String, int> expectedCounts,
  Map<String, int> requestedPathCounts,
) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

Copy link
Contributor

Choose a reason for hiding this comment

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

Fix indent:

Future<void> _waitForAppToLoad(
  Map<String, int> waitForCounts,
  Map<String, int> requestedPathCounts,
  AppServer? server
) async {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

Copy link
Contributor

Choose a reason for hiding this comment

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

Fix indent (-4 spaces)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

@dacianf dacianf requested a review from yjbanov May 23, 2022 18:01
@dacianf dacianf force-pushed the fix/flutter-issue-99671 branch from d7eee39 to 864e6da Compare May 23, 2022 18:06
[fix] [web] Updated tests

[fix] [web] Added tests
@dacianf dacianf force-pushed the fix/flutter-issue-99671 branch from 864e6da to 9ff6018 Compare May 24, 2022 06:41
Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

@fluttergithubbot fluttergithubbot merged commit 680bc17 into flutter:master May 24, 2022
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter web service worker caches error response

4 participants