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

[stable26] fix(sync): push local changes on reconnect #5286

Merged
merged 8 commits into from
Jan 29, 2024

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Jan 19, 2024

Backport of #5279

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove [skip ci] tag

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot bot added bug Something isn't working 3. to review labels Jan 19, 2024
@backportbot backportbot bot added this to the Nextcloud 26.0.11 milestone Jan 19, 2024
@Altahrim Altahrim mentioned this pull request Jan 22, 2024
3 tasks
@mejo- mejo- force-pushed the backport/5279/stable26 branch 3 times, most recently from b4947f8 to da3fcaf Compare January 29, 2024 10:29
Copy link

cypress bot commented Jan 29, 2024

3 flaky tests on run #12457 ↗︎

0 149 2 0 Flakiness 3

Details:

[stable26] fix(sync): push local changes on reconnect
Project: Text Commit: 51faf26448
Status: Passed Duration: 05:06 💡
Started: Jan 29, 2024 11:19 AM Ended: Jan 29, 2024 11:24 AM
Flakiness  cypress/e2e/sync.spec.js • 3 flaky tests

View Output

Test Artifacts
Sync > saves the actual file and document state Screenshots
Sync > saves on close Screenshots
Sync > passes the doc content from one session to the next Screenshots

Review all test suite changes for PR #5286 ↗︎

max-nextcloud and others added 7 commits January 29, 2024 11:44
When an editing session is interrupted
steps that were already pushed to the server
may be cleared alongside the sync service session.

Make sure to push all local state
that is not part of the document state
when (re-)connecting.

Tests

Yjs relies on a browser environment.
Therefore we test it in a cypress test.
Move these tests into component tests
to separate them from 'normal' e2e tests.

Signed-off-by: Max <max@nextcloud.com>
Even if all sessions have expired and been removed
there may still be disconnected clients
that hold state from the last editing session.

When they reconnect they will send their yjs updates
based on the old state they had.
Preserve the yjs state accross editing sessions
so updates send after a reconnect can still be processed.

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Remove duplicate encoding for updateMessage

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
@mejo- mejo- force-pushed the backport/5279/stable26 branch from 579cc96 to 59e5c9c Compare January 29, 2024 10:45
@mejo-
Copy link
Member

mejo- commented Jan 29, 2024

/compile

@mejo- mejo- marked this pull request as ready for review January 29, 2024 10:59
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@mejo- mejo- merged commit 8d333ee into stable26 Jan 29, 2024
44 checks passed
@mejo- mejo- deleted the backport/5279/stable26 branch January 29, 2024 11:49
@skjnldsv skjnldsv mentioned this pull request Feb 14, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants