Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--dry-run can drive you nuts #52

Open
LicoMonch opened this issue Sep 5, 2013 · 8 comments
Open

--dry-run can drive you nuts #52

LicoMonch opened this issue Sep 5, 2013 · 8 comments

Comments

@LicoMonch
Copy link

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

@commonsguy
Copy link

I echo this concern. --dry-run should not generate spurious error messages that would not be there without --dry-run.

@prateek
Copy link

prateek commented May 28, 2014

+1 I spent 2 hours on this today ..

@jcoffin
Copy link

jcoffin commented Jun 30, 2014

+1 me too! but only about 30 min for me ;)

@adarsh
Copy link

adarsh commented Jul 11, 2014

+1 WTF.

@nicolas33
Copy link
Member

nicolas33 commented Jan 10, 2015

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.

@yang-ling
Copy link

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.

@nicolas33
Copy link
Member

I agree. A message at runtime, a new entry in the FAQ and in the section "Known issues" of the manual are welcome.

@nicolas33
Copy link
Member

@Karunamon Please, make a proper pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants