breaking: error when a client-requested single-flight mutation isn't respected by the server, allow the server to explicitly ignore refreshes - #16892
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/96d1afaf626b3b8bd07bb1edcb64e13c9fede102Open in |
🦋 Changeset detectedLatest commit: 96d1afa The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Change version of @sveltejs/kit from minor to major and update the feature description.
|
I investigated this failed test run and found that The primary test used a timing-sensitive server cleanup counter despite traces showing the form response and targeted reconnect succeeded; it is stabilized by asserting observable reconnect requests. The separate flaky batch retry arose from module-level todo state leaking across retries and is fixed by resetting that state before baseline assertions. I opened #16896 with a proposed fix. |
closes #16839
Prior to the PR, client-requested single-flight mutations had a weird inconsistency. When calling
requested(query, limit), queries that exceededlimitwould be failed by the server -- the server would generate a failure response for each one of them and send it back to the client. However, ifrequestedwasn't called at all, we would just do... nothing. Your queries would just not refresh and you wouldn't know about it unless you happened to notice.In addition to the inconsistency, the design was silly. The error for a missed refresh is the same for every query. The client already knows which queries were requested. So the server doesn't need to send back information about them! The client can just diff its list of requested refreshes with the response!
This PR addresses the two issues:
ignore:If you just want to ignore a query altogether, there's a similar shorthand:
requested(...).ignoreAll().