-
Notifications
You must be signed in to change notification settings - Fork 109
Fix sync errors after network issues #4474
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
Conversation
1 failed and 1 flaky tests on run #10957 ↗︎Details:
|
|||||||||||||||||||||||||||
| Test | Artifacts | |
|---|---|---|
| Sync > recovers from a lost connection |
Output
Screenshots
|
|
cypress/e2e/directediting.spec.js • 1 flaky test
| Test | Artifacts | |
|---|---|---|
| direct editing > Open an existing plain text file, edit it |
Output
Screenshots
|
|
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.
0226261 to
fc8b297
Compare
|
I could not reproduce the cypress failure locally... set a crazy long wait time ™️ for the failed cypress statement to see if it's a matter of speed. |
2a49ed9 to
21f6f39
Compare
|
Ahh... now the |
1cda958 to
61524c2
Compare
|
Code looks good to me, also did a couple of tests using separate browsers and killing random connections, setting offline/online again, so far no obstacles found :) Very nice. |
|
/compile |
Interesting, good catch. Let's open a new issue to track it: #4483 |
61524c2 to
92c86de
Compare
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
Also drop the `sending` logic from `WebsocketPolyfill`. It prevented resending the queue after an error. The queue was non empty then so `this.#initiateSending()` was not called. `SyncService` is responsible for throttling the network requests if needed. Signed-off-by: Max <[email protected]>
Signed-off-by: Jonas <[email protected]>
Signed-off-by: Max <[email protected]>
This way the calling function can catch all network errors and make sure to preserve the unsent steps in the queue. Signed-off-by: Max <[email protected]>
SyncService will resend failed steps after network has recovered. Remove obsolete `data.retry` flag when emitting error of `ERROR_TYPE.CONNECTION_FAILED`. Fixes: #4340 Signed-off-by: Jonas <[email protected]>
Also only wait for `@alive` once in `syncs even when initial state was present` to fix the test. Signed-off-by: Jonas <[email protected]>
Signed-off-by: Max <[email protected]>
This is required for Cypress tests where we want the broadcast channel synchronization to be disabled. If not passed, default to `true` in debug mode and `false` otherwise. Signed-off-by: Jonas <[email protected]>
Signed-off-by: Jonas <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
efe68c0 to
ce2b903
Compare
|
/backport 6454257,c012aac34c0a47f9b3fae67878a5244a9ac12638,2a666d1ea5958abb26f99cc39cd9372f5c802bc5,6a4489e8cce0d73bcee115fe472738cef180270a,155bbb5fa5783ef08e3ac8a6d3106c236d5c606e,0329f46f61420d5d4fbcf1c7da02d3cb71712161,58fc762c4da53ec6275513c447275b835371b67b,fa5d293a2df74b4a6189c3c4cd9f3bed41d47981,d196ae0d1fd16eb2a5ba2c08e400c92e4c7adb0f,f0396923a4ed15ec104d7e9533ac3a053cea725b,236b07ef71353083d2bafaac86bbe81973d3116e to stable27 |
|
The backport to stable27 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable27
git pull origin stable27
# Create the new backport branch
git checkout -b fix/foo-stable27
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
|
Manual backports: |

📝 Summary
🚧 TODO
.onlyfrom Cypress testdisableBc: truefromSyncServiceProvider.js🏁 Checklist
npm run lint/npm run stylelint/composer run cs:check)