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

3031 continue retries #3032

Merged
merged 2 commits into from Nov 28, 2021
Merged

3031 continue retries #3032

merged 2 commits into from Nov 28, 2021

Conversation

@TkDodo
Copy link
Collaborator

@TkDodo TkDodo commented Nov 28, 2021

fixes #3031

TkDodo added 2 commits Nov 28, 2021
if we are waiting for a retry to happen, unsubscribing he last observer will cancel retries and just return the error; however, if a new observer subscribes in the meantime, we should continue with the ongoing retries.

this is especially important with "strict effects" in react18, where effects are run twice and thus observers are always unsubscribed and re-subscribed immediately.
add another test to include query cancellation
@vercel
Copy link

@vercel vercel bot commented Nov 28, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tanstack/react-query/A5Ru2ZeZ5iGeJ2Lda6ZMhpzhXeYW
Preview: https://react-query-git-fork-tkdodo-3031-continue-retries-tanstack.vercel.app

@codesandbox
Copy link

@codesandbox codesandbox bot commented Nov 28, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 323484c:

Sandbox Source
tannerlinsley/react-query: basic Configuration
tannerlinsley/react-query: basic-typescript Configuration

@codecov
Copy link

@codecov codecov bot commented Nov 28, 2021

Codecov Report

Merging #3032 (323484c) into master (c51498a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3032   +/-   ##
=======================================
  Coverage   96.45%   96.45%           
=======================================
  Files          45       45           
  Lines        2254     2257    +3     
  Branches      641      641           
=======================================
+ Hits         2174     2177    +3     
  Misses         77       77           
  Partials        3        3           
Impacted Files Coverage Δ
src/core/query.ts 100.00% <100.00%> (ø)
src/core/retryer.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c51498a...323484c. Read the comment docs.

@TkDodo TkDodo merged commit dc2df10 into tannerlinsley:master Nov 28, 2021
8 checks passed
@TkDodo TkDodo deleted the 3031-continue-retries branch Nov 28, 2021
@tannerlinsley
Copy link
Owner

@tannerlinsley tannerlinsley commented Nov 28, 2021

🎉 This PR is included in version 3.33.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants