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

[stable27] Fix sync errors after network issues #4486

Merged
merged 12 commits into from Jul 11, 2023
Merged

Conversation

mejo-
Copy link
Member

@mejo- mejo- commented Jul 11, 2023

📝 Summary

Manual backport of #4474

max-nextcloud and others added 11 commits July 11, 2023 19:12
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
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 <max@nextcloud.com>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Max <max@nextcloud.com>
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 <max@nextcloud.com>
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 <jonas@freesources.org>
Also only wait for `@alive` once in `syncs even when initial state was
present` to fix the test.

Signed-off-by: Jonas <jonas@freesources.org>
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 <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
@mejo-
Copy link
Member Author

mejo- commented Jul 11, 2023

/compile

@cypress
Copy link

cypress bot commented Jul 11, 2023

1 failed and 1 flaky tests on run #10961 ↗︎

1 143 2 0 Flakiness 1

Details:

[stable27] Fix sync errors after network issues
Project: Text Commit: fa7197a83a
Status: Failed Duration: 03:49 💡
Started: Jul 11, 2023 5:35 PM Ended: Jul 11, 2023 5:39 PM
Failed  cypress/e2e/sync.spec.js • 1 failed test

View Output Video

Test Artifacts
Sync > recovers from a lost connection Output Screenshots
Flakiness  cypress/e2e/sync.spec.js • 1 flaky test

View Output Video

Test Artifacts
Sync > saves the actual file and document state Output Screenshots

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@mejo- mejo- mentioned this pull request Jul 11, 2023
7 tasks
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@mejo- mejo- merged commit 0b20e0b into stable27 Jul 11, 2023
30 of 33 checks passed
@delete-merged-branch delete-merged-branch bot deleted the backport/4474/stable27 branch July 11, 2023 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants