Last Comment Bug 1170271 - Provider does not sync single occurrences deleted occurrences
: Provider does not sync single occurrences deleted occurrences
Status: RESOLVED FIXED
:
Product: Calendar
Classification: Client Software
Component: Provider: GData (show other bugs)
: Trunk
: Unspecified Unspecified
P1 normal (vote)
: 4.5
Assigned To: Philipp Kewisch [:Fallen]
:
:
Mentors:
: 1146576 1185242 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-01 12:12 PDT by Philipp Kewisch [:Fallen]
Modified: 2015-11-13 00:44 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fix - v1 (4.63 KB, patch)
2015-08-12 13:36 PDT, Philipp Kewisch [:Fallen]
mohit.kanwal: review+
Details | Diff | Splinter Review
Regression Fix - v1 (1.55 KB, patch)
2015-10-12 04:47 PDT, Philipp Kewisch [:Fallen]
mohit.kanwal: review+
philipp: approval‑calendar‑aurora+
Details | Diff | Splinter Review

Description User image Philipp Kewisch [:Fallen] 2015-06-01 12:12:14 PDT
STR:

1. create daily recurring series
2. delete single occurrences in web UI
3. synchronize Lightning

Results:

* Occurrence is not removed, but I get this:

Timestamp: 6/1/15, 9:03:03 PM
Error: [calCachedCalendar] replay action failed: null, uri=googleapi://kewisch@gmail.com/?calendar=kewisch%40gmail.com&tasks=%40default, result=Can not modify immutable data container'Can not modify immutable data container' when calling method: [calIRecurrenceInfo::removeOccurrenceAt], op=[xpconnect wrapped calIOperation]
Source File: file:///Users/kewisch/Library/Thunderbird/Profiles/8xwcqxp9.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCachedCalendar.js
Line: 322
Comment 1 User image Philipp Kewisch [:Fallen] 2015-08-12 13:36:18 PDT
Created attachment 8647139 [details] [diff] [review]
Fix - v1

This fixes it. The unit test is mostly untested, because I can't run them correctly due to bug 1190012. I'd rather keep it though because this will force me to fix the test with bug 1190012 instead of not writing it.
Comment 2 User image Mohit Kanwal [:redDragon] 2015-08-13 09:30:27 PDT
Comment on attachment 8647139 [details] [diff] [review]
Fix - v1

Review of attachment 8647139 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM.

::: calendar/providers/gdata/modules/gdataUtils.jsm
@@ +1068,5 @@
>                  if (exc.id in this.masterItems) {
>                      item = this.masterItems[exc.id];
>                  } else {
>                      item = (yield this.promiseOfflineStorage.getItem(exc.id))[0];
> +                    item = item.clone();

oh yeah! damn good catch.
Comment 3 User image Philipp Kewisch [:Fallen] 2015-08-20 11:46:30 PDT
*** Bug 1185242 has been marked as a duplicate of this bug. ***
Comment 4 User image Philipp Kewisch [:Fallen] 2015-08-20 12:20:07 PDT
*** Bug 1146576 has been marked as a duplicate of this bug. ***
Comment 5 User image Philipp Kewisch [:Fallen] 2015-08-25 02:07:17 PDT
Pushed to comm-central changeset e6c5bce2b8fb
Comment 6 User image Philipp Kewisch [:Fallen] 2015-10-12 04:46:15 PDT
This doesn't quite work if there are occurrences in the stream that don't have a master, neither in the stream nor in the offline storage. Moving the clone call to only occur when there is an item helps and a fake master will be created later on.
Comment 7 User image Philipp Kewisch [:Fallen] 2015-10-12 04:47:47 PDT
Created attachment 8672583 [details] [diff] [review]
Regression Fix - v1
Comment 8 User image Mohit Kanwal [:redDragon] 2015-10-12 10:08:14 PDT
Comment on attachment 8672583 [details] [diff] [review]
Regression Fix - v1

Review of attachment 8672583 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good
Comment 9 User image Philipp Kewisch [:Fallen] 2015-11-12 14:45:49 PST
Pushed to comm-central changeset 27df23ea2d73
Comment 10 User image Stefan Sitter 2015-11-12 23:29:16 PST
According to comment 5 the original patch landed in 4.4. The regression fix is now in 4.7. 
How serious is the regression and do we need to port it back up to 4.4?
Comment 11 User image Philipp Kewisch [:Fallen] 2015-11-13 00:44:34 PST
It won't hurt to backport this to beta, but since the gdata provider is only released periodically, I think it will be ok.

https://hg.mozilla.org/releases/comm-aurora/rev/d0455ccc36ab
https://hg.mozilla.org/releases/comm-beta/rev/54d2b5e104a7

Note You need to log in before you can comment on or make changes to this bug.