Skip to content

Conversation

@max-nextcloud
Copy link
Collaborator

@max-nextcloud max-nextcloud commented Oct 13, 2025

Backport various sync fixes:

max-nextcloud and others added 6 commits October 12, 2025 22:25
Remove the delegations to only use the typed interface.

Signed-off-by: Max <max@nextcloud.com>
* Hand versions alongside the actual step.
* Increase sync service version when processing the next step.
* Keep track of the step that is currently processed
and provide better `warn` logging when steps are not processed.
* Add types to WebsocketPolyfill and its test.

Signed-off-by: Max <max@nextcloud.com>
Drop the `FlatStep` type.
Process each version iterating through its data.
Increment the version counter afterwards.

Signed-off-by: Max <max@nextcloud.com>
* First is logged as error.
* Second is logged as debug and can be tracked with conditional logging.

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Jonas <jonas@freesources.org>
@max-nextcloud max-nextcloud changed the title backport/7745/stable31 backport sync fixes to stable31 Oct 13, 2025
@codecov
Copy link

codecov bot commented Oct 13, 2025

Codecov Report

❌ Patch coverage is 37.06140% with 287 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.28%. Comparing base (820bb0d) to head (1cf97fc).
⚠️ Report is 21 commits behind head on stable31.

Files with missing lines Patch % Lines
src/services/SyncService.ts 31.89% 190 Missing ⚠️
src/services/WebSocketPolyfill.ts 35.80% 52 Missing ⚠️
src/helpers/yjs.ts 23.80% 16 Missing ⚠️
src/helpers/steps.ts 15.38% 11 Missing ⚠️
src/services/Outbox.ts 35.71% 9 Missing ⚠️
src/services/PollingBackend.js 11.11% 8 Missing ⚠️
src/services/SessionApi.js 90.90% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           stable31    #7779      +/-   ##
============================================
+ Coverage     50.68%   58.28%   +7.59%     
============================================
  Files           292      290       -2     
  Lines         42332    36715    -5617     
  Branches        875      867       -8     
============================================
- Hits          21458    21399      -59     
+ Misses        20753    15198    -5555     
+ Partials        121      118       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Prevents possible race condition when steps from first sync request got
applied before documentState from first push request (answer to
SyncStep1) arrived.

Signed-off-by: Jonas <jonas@freesources.org>
@max-nextcloud max-nextcloud force-pushed the backport/7745/stable31 branch from c2848ea to d9fe6eb Compare October 13, 2025 10:27
@max-nextcloud max-nextcloud marked this pull request as ready for review October 13, 2025 10:44
@max-nextcloud max-nextcloud requested a review from mejo- as a code owner October 13, 2025 10:44
Signed-off-by: Max <max@nextcloud.com>
Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and didn't manage to break it with three simultaneous session clients.

@mejo- mejo- merged commit 24e5ac4 into stable31 Oct 13, 2025
67 of 68 checks passed
@mejo- mejo- deleted the backport/7745/stable31 branch October 13, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants