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

Feature/edit file locally restart sync #5175

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

allexzander
Copy link
Contributor

@allexzander allexzander commented Nov 14, 2022

This will fix #5110

Changes:

  • edit locally task is now put to the top priority and when it gets triggered, all other running syncs get aborted
  • it is now possible to force sync only a specific file even if it was not yet synced but is not blacklisted

@allexzander allexzander force-pushed the feature/edit-file-locally-restart-sync branch 2 times, most recently from fc63f57 to a102403 Compare November 15, 2022 18:10
@codecov
Copy link

codecov bot commented Nov 15, 2022

Codecov Report

Merging #5175 (6db9c95) into master (ab8f0db) will decrease coverage by 0.16%.
The diff coverage is 36.50%.

❗ Current head 6db9c95 differs from pull request most recent head b673ab9. Consider uploading reports for the commit b673ab9 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5175      +/-   ##
==========================================
- Coverage   57.80%   57.63%   -0.17%     
==========================================
  Files         138      138              
  Lines       17441    17490      +49     
==========================================
- Hits        10082    10081       -1     
- Misses       7359     7409      +50     
Impacted Files Coverage Δ
src/libsync/account.cpp 36.31% <0.00%> (-0.85%) ⬇️
src/libsync/account.h 33.33% <ø> (ø)
src/libsync/discoveryphase.h 25.00% <ø> (ø)
src/libsync/syncengine.h 50.00% <ø> (ø)
src/libsync/discovery.cpp 87.78% <18.18%> (-0.47%) ⬇️
src/libsync/syncengine.cpp 81.64% <40.74%> (-2.14%) ⬇️
src/libsync/discovery.h 59.25% <76.92%> (ø)
src/libsync/vfs/cfapi/hydrationjob.cpp 52.38% <0.00%> (-3.71%) ⬇️
src/libsync/vfs/cfapi/vfs_cfapi.cpp 83.00% <0.00%> (-2.38%) ⬇️
src/libsync/vfs/cfapi/cfapiwrapper.cpp 72.50% <0.00%> (-1.82%) ⬇️
... and 3 more

@allexzander allexzander force-pushed the feature/edit-file-locally-restart-sync branch 2 times, most recently from d6ff62c to 88c7e27 Compare November 21, 2022 09:04
@tobiasKaminsky
Copy link
Member

@allexzander have you closed this with purpose?

@allexzander allexzander reopened this Nov 21, 2022
@allexzander allexzander force-pushed the feature/edit-file-locally-restart-sync branch from 9c2d18b to d07e164 Compare November 21, 2022 16:55
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ clang-tidy found issue(s) with the introduced code (1/1)

src/libsync/syncengine.h Outdated Show resolved Hide resolved
@allexzander allexzander force-pushed the feature/edit-file-locally-restart-sync branch 2 times, most recently from 006b378 to 8655c46 Compare November 22, 2022 19:38
@allexzander allexzander marked this pull request as ready for review November 22, 2022 19:38
src/gui/editlocallyjob.cpp Outdated Show resolved Hide resolved
src/gui/editlocallyjob.cpp Outdated Show resolved Hide resolved
src/gui/editlocallyjob.cpp Outdated Show resolved Hide resolved
src/gui/editlocallyjob.h Outdated Show resolved Hide resolved
src/gui/folder.cpp Outdated Show resolved Hide resolved
src/gui/editlocallyjob.cpp Outdated Show resolved Hide resolved
src/gui/editlocallyjob.cpp Outdated Show resolved Hide resolved
@allexzander
Copy link
Contributor Author

@allexzander have you closed this with purpose?

yes, our CI has hung, so, I've closed and reopened it just to make sure it gets through all the checks
should I not do that in future?

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ clang-tidy found issue(s) with the introduced code (1/1)

src/libsync/syncfileitem.h Outdated Show resolved Hide resolved
src/gui/editlocallyjob.h Outdated Show resolved Hide resolved
src/gui/editlocallyjob.h Outdated Show resolved Hide resolved
src/gui/editlocallyjob.h Outdated Show resolved Hide resolved
src/gui/editlocallyjob.h Outdated Show resolved Hide resolved
src/gui/editlocallyjob.cpp Outdated Show resolved Hide resolved
src/gui/editlocallyjob.h Outdated Show resolved Hide resolved
src/libsync/syncfileitem.cpp Outdated Show resolved Hide resolved
src/gui/editlocallyjob.h Outdated Show resolved Hide resolved
src/gui/editlocallyjob.h Outdated Show resolved Hide resolved
src/gui/editlocallyjob.cpp Outdated Show resolved Hide resolved
@mgallien mgallien force-pushed the feature/edit-file-locally-restart-sync branch from 7244c87 to dbe0260 Compare November 25, 2022 09:38
@allexzander allexzander force-pushed the feature/edit-file-locally-restart-sync branch 2 times, most recently from fd97d22 to 82c7aee Compare December 5, 2022 18:16
Copy link
Collaborator

@claucambra claucambra left a comment

Choose a reason for hiding this comment

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

Other than small nitpick, looks good and works great 🚀

src/gui/editlocallyjob.cpp Show resolved Hide resolved
…e of the Sync Engine. All other running syncs will get terminated. Syncing is now optimized to run faster and it checks if the file has changed on the server before syncing it.

Signed-off-by: alex-z <blackslayer4@gmail.com>
@allexzander allexzander force-pushed the feature/edit-file-locally-restart-sync branch from 82c7aee to b673ab9 Compare December 6, 2022 08:37
@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-5175-b673ab996ef0e588765ffd1e2d07f094397e2375-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarcloud
Copy link

sonarcloud bot commented Dec 6, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 34 Code Smells

11.3% 11.3% Coverage
0.0% 0.0% Duplication

@allexzander allexzander merged commit f6ac52b into master Dec 6, 2022
@allexzander allexzander deleted the feature/edit-file-locally-restart-sync branch December 6, 2022 09:02
@allexzander
Copy link
Contributor Author

/backport to stable-3.6

@allexzander allexzander restored the feature/edit-file-locally-restart-sync branch December 6, 2022 13:03
@mgallien mgallien added this to the 3.7.0 milestone Jan 30, 2023
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.

Open file for local editing should not wait till the currently-running sync completes
5 participants