offlineimap
offlineimap copied to clipboard
--dry-run can drive you nuts
Hi there,
I newly installed offlineimap for testing some archive scenarios and after I finished the config, I just did a --dry-run to test the config and the compatiblity of the used (remote-)IMAP ... and here it started: 4h of debugging a non-existent bug.
Main error from offlineimap was:
offlineimap -o -d IMAP --dry-run -l offlineimap.log
[...] 2013-09-06 00:07:46 WARNING: ERROR: Exceptions occurred during the run! 2013-09-06 00:07:46 WARNING: ERROR: Aborting sync, folder 'INBOX/Alice' [acc: 'licozara'] getfolder() asked for a nonexisting folder 'INBOX/Alice'. 2013-09-06 00:07:46 WARNING: Traceback: File "/usr/lib64/python2.7/site-packages/offlineimap/accounts.py", line 372, in syncfolder replace(remoterepos.getsep(), localrepos.getsep())) File "/usr/lib64/python2.7/site-packages/offlineimap/repository/Maildir.py", line 134, in getfolder OfflineImapError.ERROR.FOLDER)
And what was the Problem? Well, offlineimap never run one "real" shot and so the dir-tree wasnt set up and the dry-run got a lil cold ;)
This case should at least be caught by any exception, to minimze confusion.
Not really a bug, but if I do a dry-run, I kinda expect to get a result as if I do a real run. Also this behavior could lead to hours of confusion ;)
Thanks for reading my 2c.
Lico
I echo this concern. --dry-run should not generate spurious error messages that would not be there without --dry-run.
+1 I spent 2 hours on this today ..
+1 me too! but only about 30 min for me ;)
+1 WTF.
The problem with --dry-run is that it's not so easy to implement. The reason is that OfflineIMAP internally base any sync by comparing changes from both sides, and so it has a lot of expectations of how one side must look like. Once the first appearing error fixed I would expect another to be raised and so on... So, while I might be wrong this issue might require much more work than what it looks like at the first glance.
Don't get me wrong. I understand your concerns. OTOH, we (the maintainers) have to face with reality and we are missing of contributors to help us. We are even late in reviewing and merging patches.
Since this issue is not critical I'm in favour of putting it aside to focus on more urgent issues and I guess other maintainers agree. That's why you didn't have answer until today.
Please, don't +1 on issues. It does not help.
non-existing folder error will definitely happen when a user runs --dry-run for the first time, and it is confusing. I also spent 1 hour on it.
Maybe a message can be shown when offlineimap is executed with --dry-run? Something like Don't panic. Nonexisting folder error is normal if you use --dry-run for the first time
Or add some notes to the readme?
This message will not solve this problem but at least can save a lot of debugging time.
I agree. A message at runtime, a new entry in the FAQ and in the section "Known issues" of the manual are welcome.
@Karunamon Please, make a proper pull request.