mozilla-services / services-engineering

Services engineering core repo - Used for issues/docs/etc that don't obviously belong in another repo.
2 stars 1 forks source link

Test migration behaviour against client with fresh FF install #46

Closed tublitzed closed 4 years ago

tublitzed commented 4 years ago

After running through these tests, we want to check against the following scenario:

When a user with this collection of bookmarks gets migrated, what happens when they login for the very first time on a brand new sync client?

This can go one of two ways:

a) A sync is performed, data is fetched from spanner and populated on device. b) A sync is performed, empty dataset that exists in fresh install replaces existing dataset, data is lost.

tublitzed commented 4 years ago

Testing against sync id 142092891 (tublitzed+synctest@gmail.com) which is currently pointed here

erkolson commented 4 years ago

Looks like it hasn't synced with the migrate py node yet:

MySQL [tokenserver]> select * from users where email = 'e9389413141b45709b90c773e7674218@api.accounts.firefox.com';
+-----------+---------+-----------------------------------------------------------+---------------+----------------------------------+---------------+---------------+--------+-----------------+
| uid       | service | email                                                     | generation    | client_state                     | created_at    | replaced_at   | nodeid | keys_changed_at |
+-----------+---------+-----------------------------------------------------------+---------------+----------------------------------+---------------+---------------+--------+-----------------+
| 129848941 |       1 | e9389413141b45709b90c773e7674218@api.accounts.firefox.com | 1586203503210 | ae5bb8a9e99a997a86352a9fcad377d3 | 1572293538351 | 1586203504034 |    550 |            NULL |
| 142092891 |       1 | e9389413141b45709b90c773e7674218@api.accounts.firefox.com | 1586203503211 | 073730744458fbe00e256caa564d202c | 1586203504034 | 1586205140841 |    550 |   1586203503211 |
| 142094861 |       1 | e9389413141b45709b90c773e7674218@api.accounts.firefox.com | 1586203503211 | 073730744458fbe00e256caa564d202c | 1586205140841 |          NULL |    836 |            NULL |
+-----------+---------+-----------------------------------------------------------+---------------+----------------------------------+---------------+---------------+--------+-----------------+
tublitzed commented 4 years ago

^ For completeness sake, Erik and I talked offline and client is now synced as of this AM.

tublitzed commented 4 years ago

Unfortunately, I found the following:

  1. I first uploaded a collection from my test account, success sync log is here
  2. @erkolson migrated the user.
  3. I signed in from a fresh install on a new device (iOS). I synced, and got no data.
  4. Then, I signed in from a fresh profile on Desktop. I synced and also got no data. log here
  5. THEN, I signed in from my existing profile on Desktop (that I'd used to originally sync all my data), tried to sync and got errors. Sync error log here

cc @pjenvey @jrconlin

pjenvey commented 4 years ago

After initial issues w/ migrating individual users were resolved, I was seeing a fresh desktop install syncing for the first time not seeing all its bookmarks.

This was due to a bug in migrate_node.py where not all data was successfully migrated to Spanner. Fixed in #586