-
Notifications
You must be signed in to change notification settings - Fork 88
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
Split sync of ApiService to sync and save #4424
Conversation
Passing run #11441 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
@@ -242,7 +242,7 @@ class SyncService { | |||
async save({ force = false, manualSave = true } = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may still want to trigger the autosave somehow regular. I think this is no longer the case as only sync is called in an interval. Might be something to check with @max-nextcloud next week on how to best achieve that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually still being triggered regularly. At least yesterday it was 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And that's the 30s autosave:
text/src/services/SyncService.js
Line 88 in 0d088d6
this.autosave = debounce(this._autosave.bind(this), AUTOSAVE_INTERVAL) |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for tackling this!
I have only one small remark.
Just went over the code did not test locally or go through untouched code to see if further changes would be needed.
bdf34f6
to
76f9f33
Compare
squahsed and rebased |
80837f6
to
f7107a5
Compare
The remaining cypress errors about conflicts are rooted that this information was not transported on The handler we have, reacts to this status only on polling! Saves would be ignored, you could see the failures only on the console (before and after the changes). With the polling itself it's not a big deal. |
75bdd5c
to
4ec598e
Compare
Signed-off-by: Arthur Schiwon <[email protected]>
2436346
to
ecb1932
Compare
Signed-off-by: Arthur Schiwon <[email protected]>
Signed-off-by: Arthur Schiwon <[email protected]>
ecb1932
to
0dd749b
Compare
The remaining issue with cypress conflicts tests was an accidentally inverted condition, so that the proper exception was not thrown. |
📝 Summary
As discussed with @juliushaertl when talking about #3899 it might be worthwhile to split the sync route into dedicated sync and save endpoints.
🚧 TODO
🏁 Checklist
npm run lint
/npm run stylelint
/composer run cs:check
)