After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 681679 - migration should be profile-bound
migration should be profile-bound
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Profile
git master
Other Linux
: Normal normal
: ---
Assigned To: Diego Escalante Urrelo (not reading bugmail)
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-12 11:47 UTC by Claudio Saavedra
Modified: 2012-09-03 18:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
e-profile-migrator: clean single step (1.37 KB, patch)
2012-08-24 08:35 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
e-profile-migrator: make profile migration a step (1.56 KB, patch)
2012-08-24 08:35 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
e-profile-migrator: update migrate_cookies (4.67 KB, patch)
2012-08-24 08:35 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
e-profile-migrator: add dry_run to parse_and_decrypt (3.57 KB, patch)
2012-08-24 08:35 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
e-profile-migrator: update migrate_passwords (3.59 KB, patch)
2012-08-24 08:35 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
e-profile-migrator: update migrate_passwords2 (2.57 KB, patch)
2012-08-24 08:35 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
profile migrator (1.68 KB, patch)
2012-08-24 08:35 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-file-helpers: add ephy_dot_dir_is_default() (2.28 KB, patch)
2012-09-03 14:44 UTC, Claudio Saavedra
committed Details | Review
ephy-profile-migrator: allow running migration in non-default profile directories (2.89 KB, patch)
2012-09-03 14:44 UTC, Claudio Saavedra
committed Details | Review
ephy-profile-utils: add a profile_dir parameter to ephy_profile_utils_do_migration() (3.19 KB, patch)
2012-09-03 14:44 UTC, Claudio Saavedra
committed Details | Review
ephy-main: run the migration for any instance that is not a temporary private one (1.14 KB, patch)
2012-09-03 14:44 UTC, Claudio Saavedra
committed Details | Review

Description Claudio Saavedra 2012-08-12 11:47:44 UTC
Right now the migration tool will only run on the main profile, but on other profiles. This is broken, as changes in any of the profile data format that might need migration will never be applied for them.

The reason why I've found out about this is simple: I am making a few changes to the history database that require the migration tool to run. These happen OK for the main profile, business as usual. However, when opening ephy with an pre-migration profile shows that the database for that profile has not been migrated -- ephy has no way to know if that profile needs to be migrated at all.
Comment 1 Claudio Saavedra 2012-08-12 11:50:52 UTC
I have no idea if this can be fixed at all without breaking all existing profiles already. As there is no .migrated file in existing profiles it's not possible to know which steps of the migration need to be executed for each profile. Since this has not been a problem until now, maybe it would be OK to assume that no .migrated means start with the current step (meaning: the one I am adding now)?
Comment 2 Diego Escalante Urrelo (not reading bugmail) 2012-08-17 21:50:11 UTC
I am working on this.
Comment 3 Diego Escalante Urrelo (not reading bugmail) 2012-08-24 08:35:13 UTC
Created attachment 222284 [details] [review]
e-profile-migrator: clean single step
Comment 4 Diego Escalante Urrelo (not reading bugmail) 2012-08-24 08:35:16 UTC
Created attachment 222285 [details] [review]
e-profile-migrator: make profile migration a step
Comment 5 Diego Escalante Urrelo (not reading bugmail) 2012-08-24 08:35:19 UTC
Created attachment 222286 [details] [review]
e-profile-migrator: update migrate_cookies
Comment 6 Diego Escalante Urrelo (not reading bugmail) 2012-08-24 08:35:21 UTC
Created attachment 222287 [details] [review]
e-profile-migrator: add dry_run to parse_and_decrypt
Comment 7 Diego Escalante Urrelo (not reading bugmail) 2012-08-24 08:35:23 UTC
Created attachment 222288 [details] [review]
e-profile-migrator: update migrate_passwords
Comment 8 Diego Escalante Urrelo (not reading bugmail) 2012-08-24 08:35:26 UTC
Created attachment 222289 [details] [review]
e-profile-migrator: update migrate_passwords2
Comment 9 Diego Escalante Urrelo (not reading bugmail) 2012-08-24 08:35:29 UTC
Created attachment 222290 [details] [review]
profile migrator
Comment 10 Diego Escalante Urrelo (not reading bugmail) 2012-08-24 08:37:17 UTC
Patches likely do not build because of minor syntax issues. I am attaching early to comment on the approach.

I am basically adding (src, dest, dry_run, data) to every migrator function.

This should allow to run arbitrary steps in arbitrary paths. Even only as dry-run tests with extra debugging.
Comment 11 Xan Lopez 2012-08-27 15:09:01 UTC
Comment on attachment 222284 [details] [review]
e-profile-migrator: clean single step

Why is this needed/a good idea? Guys, let's spend 30 seconds writing ChangeLogs...
Comment 12 Xan Lopez 2012-08-27 15:11:14 UTC
Comment on attachment 222285 [details] [review]
e-profile-migrator: make profile migration a step

Unless I'm mistaken this is wrong (that's why it's not a migration step). If you do this at the end you'll first try to do the previous steps while having as profile dir the new XDG target, so they will all fail. Did you test this?
Comment 13 Claudio Saavedra 2012-09-03 08:29:55 UTC
Diego, what's the status of this? We break some profiles already in master (given that we merged the  in-tab-overview branch). We should have at least this solved for 3.9.91 ...
Comment 14 Claudio Saavedra 2012-09-03 14:44:49 UTC
Created attachment 223329 [details] [review]
ephy-file-helpers: add ephy_dot_dir_is_default()

This method will let us know when the current dot directory is the
default one and not a user-specified one nor a web application one.
Comment 15 Claudio Saavedra 2012-09-03 14:44:52 UTC
Created attachment 223330 [details] [review]
ephy-profile-migrator: allow running migration in non-default profile directories

THis is necessary since we add new columns to the history database in
step 8 of migration. However, non-default profile directories don't
have a .migrated file right now but, since up to step 7 it was
possible to use these profiles without migration, it is safe to assume
that a non-default profile without a .migrated file can be migrated
starting from step 8.
Comment 16 Claudio Saavedra 2012-09-03 14:44:55 UTC
Created attachment 223331 [details] [review]
ephy-profile-utils: add a profile_dir parameter to ephy_profile_utils_do_migration()

This is passed further on to the migrator process. Right now this is
unused.
Comment 17 Claudio Saavedra 2012-09-03 14:44:58 UTC
Created attachment 223332 [details] [review]
ephy-main: run the migration for any instance that is not a temporary private one
Comment 18 Xan Lopez 2012-09-03 17:05:18 UTC
Review of attachment 223329 [details] [review]:

Yep.
Comment 19 Xan Lopez 2012-09-03 17:17:12 UTC
Review of attachment 223330 [details] [review]:

Makes sense to me. You have a typo in the commit message s/THis/This/
Comment 20 Xan Lopez 2012-09-03 17:28:16 UTC
Review of attachment 223331 [details] [review]:

OK.
Comment 21 Xan Lopez 2012-09-03 17:32:18 UTC
Review of attachment 223332 [details] [review]:

Alright. Hopefully we won't destroy everything.... ;)
Comment 22 Claudio Saavedra 2012-09-03 18:39:02 UTC
Attachment 223329 [details] pushed as 55ffe5b - ephy-file-helpers: add ephy_dot_dir_is_default()
Attachment 223330 [details] pushed as 1afb017 - ephy-profile-migrator: allow running migration in non-default profile directories
Attachment 223331 [details] pushed as 95eb18e - ephy-profile-utils: add a profile_dir parameter to ephy_profile_utils_do_migration()
Attachment 223332 [details] pushed as 4757133 - ephy-main: run the migration for any instance that is not a temporary private one