Closed Bug 944271 Opened 11 years ago Closed 11 years ago

[OTA][Data Migration][Clock] The alarm events will be lost after update from v1.1 to v1.2

Categories

(Firefox OS Graveyard :: Gaia::Clock, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:koi+, b2g-v1.2 fixed, b2g-v1.3 fixed)

RESOLVED FIXED
blocking-b2g koi+
Tracking Status
b2g-v1.2 --- fixed
b2g-v1.3 --- fixed

People

(Reporter: hlu, Assigned: oconnore)

References

Details

(Keywords: dataloss, regression)

Attachments

(4 files, 2 obsolete files)

Attached file alarm.txt
* Build Information Gaia: 92cd11ea023dd6598d82d859ae3c945ff6589ce6 Gecko: http://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/14e91ab12441 BuildID 20131127004001 Version 26.0 ro.build.version.incremental=eng.cltbld.20131127.073824 * Reproduce Steps 1. Flash device to v1.1 build from PVT 2. Change update URL to http://update.boot2gecko.org/unagi/1.2.0/nightly/update_20131127004001.xml 3. Add some alarm events as below. - Time: 06:00 AM, Repeat: Never, Sound: Classic Buzz, Vibrate: on, Snooze: 5 mins - TIme: 10:30 AM, Repeat: Weekdays, Sound: Gem Echoes, Vibrate: off, Snooze: 10 minutes - Time: 12:00 AM, Repeat: Weekends, Sound: Into the void, Vibrate: off, Snooze: 15 minutes - Time: 1:14 PM, Repeat: Wed&Sat, Sound: Classic Buzz, Vibrate: on, Snooze: 20 minutes. - TIme: 6:57 PM, Repeat: Fri., Sound: Classic Buzz, Vibrate: off, Snooze: 5 mins 4. Download the update package and install the update. * Actual results: 1. After update, all of alarm events are lost. * Expected result: 1. The alarm events should be kept after update.
blocking-b2g: --- → koi?
Keywords: dataloss, regression
Hi Ian, could you help to take a look? Thank you :)
Flags: needinfo?(iliu)
(Redirecting from Ian) Mike, can you or Eric take a look at this one?
Flags: needinfo?(iliu) → needinfo?(mike)
Sure thing, Dylan. I've talked to Eric, and he has a plan for a patch to handle the database upgrade.
Assignee: nobody → eric
Flags: needinfo?(mike)
Attached file github pr (obsolete) —
Attachment #8341176 - Flags: review?(mike)
Comment on attachment 8341176 [details] [review] github pr Hello, Eric. O'Connor. I left some comments on the GitHub pull request. Let me know when you'd like me to take another look. Hello.
Attachment #8341176 - Flags: review?(mike)
Comment on attachment 8341176 [details] [review] github pr Fixed review comments.
Attachment #8341176 - Flags: review?(mike)
Attached patch patch (obsolete) — Splinter Review
Here is the patch for testing.
Hi Hlu, I've reviewed Eric's patch for technical accuracy, and the unit tests verify correct behavior. Unfortunately, we're not very well-equipped to test code on Unagi devices any more. Are you able to test this patch? In order to do so, you would need to change step 4 to something like: 4. Check out the `v1.2` branch of Gaia, apply the patch at attachment 8341246 [details] [diff] [review], and re-install Gaia
Flags: needinfo?(hlu)
Attached image 2013-12-03-15-55-24.png
Hubet and I test the patch on Buri and Unagi. Step 4': After checkout and pull gaia v1.2, do following commands: $ git cherry-pick 8e0505dc712117741a1a8fddd91cd40639852e91 $ git log -n 1 --oneline 9ebd77a Bug 944271 - [OTA][Data Migration][Clock] The alarm events will... be lost after update from v1.1 to v1.2 $ adb shell stop b2g && adb remount $ B2G_SYSTEM_APPS=1 BUILD_APP_NAME=clock make install-gaia Due to the apps are installed under "/system/b2g/webapps" not "/data/local/webapps", set B2G_SYSTEM_APPS option as 1. It does not work.
Flags: needinfo?(hlu)
Attachment #8341246 - Attachment is patch: true
Thanks to you both! Eric has updated the patch on GitHub to address what he believes to be the issue. I am still trying to simulate a device upgrade locally, but I'm having a little difficulty. If you have a moment, could you make another attempt to reproduce with the latest patch on GitHub?
blocking+ for data loss + regression
blocking-b2g: koi? → koi+
Attached file DB of v1.1 clock
Also got the black screen again when we only re-install gaia (comment 9). I think it might be the problem of DB's location change. So I change the testing steps below and the clock can launch successfully: 1. Flash device to v1.1 build from PVT 2. Add some alarms 3. pull DB from /data/local/indexedDB/XXXX+f+app+++clock.gaiamobile.org 4. Flash device to v1.2 build from PVT, open clock once to create DB's folder. 5. Flash gaia by following commands: $ git fetch --all && git checkout v1.2 && git pull $ git cherry-pick d90e637 $ git log -n 2 --oneline 3c7fb96 Bug 944271 - [OTA][Data Migration][Clock] The alarm events will... be lost after update from v1.1 to v1.2 1e33fd8 Bug 943183 - [Messages] the bad recipient markers should not be absolutely positioned to a non-scrolled ancestor r=schung $ adb shell stop b2g && adb remount $ B2G_SYSTEM_APPS=1 BUILD_APP_NAME=clock make install-gaia 6. push back DB into /data/local/storage/persistent/XXXX+f+app+++clock.gaiamobile.org/idb , then adb reboot 7. check the alarms Result: Clock app can lauch, but there is still no alarms.
Attachment #8342833 - Attachment description: DB of clock → DB of v1.1 clock
Comment on attachment 8341176 [details] [review] github pr Hi Eric, As discussed on IRC, we'll need to preform this migration in response to the IndexedDB `upgradeneeded` event, since we increased the database version number for version 1.2. Askeing: thank you for taking the time to verify again and for sharing your work! After much trial-and-error, I designed a similar process yesterday. With this knowledge, I will be able to verify locally before requesting that you go through the process a third time :)
Attachment #8341176 - Flags: review?(mike)
Attachment #8341176 - Flags: review?(mike)
Hi Eric, The attachments on this bug are getting a little confusing to follow, so I'm invalidating the old attachments and directly attaching your latest work as a patchfile. I've tested this patch using both methods described in this bug (see comment 0 and comment 13), and multiple alarms are completely migrated correctly in both cases. Nice work! Askeing and Hubet: thanks once again for helping me learn how to verify this!
Attachment #8341176 - Attachment is obsolete: true
Attachment #8341246 - Attachment is obsolete: true
Attachment #8341176 - Flags: review?(mike)
Attachment #8343929 - Flags: review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Uplifted 979a3db21abd154efef337686e7a15d846c3d65f to: v1.3 already had this commit v1.2: 6131ad93f5385e9cc3ad5f85ea44203449d671d1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: