darcs

Issue 24 darcs get_patch failed: better diagnostics?

Title darcs get_patch failed: better diagnostics?
Priority wishlist Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, hanwen, jch, kowey, markstos, thorkilnaur, tommy
Assigned To dagit
Topics

Created on 2005-11-27.10:39:30 by hanwen, last changed 2009-08-27.14:03:41 by admin.

Messages
msg89 (view) Author: hanwen Date: 2005-11-27.10:39:30
when darcs fails to create a SSH connections (eg. due to firewall limits on
connections) it will complain

darcs: failed to read patch in get_extra:

Perhaps this is a 'partial' repository? 


This diagnostic is misleading; can have a more detailed reason why 'get_patch
failed' ? 

thanks!
msg90 (view) Author: droundy Date: 2005-11-27.12:35:18
On Sun, Nov 27, 2005 at 10:39:30AM +0000, Han-Wen Nienhuys wrote:
> when darcs fails to create a SSH connections (eg. due to firewall limits on
> connections) it will complain
> 
> darcs: failed to read patch in get_extra:
> 
> Perhaps this is a 'partial' repository? 
> 
> 
> This diagnostic is misleading; can have a more detailed reason why
> 'get_patch failed' ?

Hmmm.  The reason for the lack of an informative error message is that
we're using a Maybe Patch (which is either a patch or Nothing) to indicate
whether the read patch succeeded.  We could switch to an Either String
Patch, which will allow us to give a useful error message (provided ssh
gives us a useful error message).  This would be a pretty pervasive change,
but should be pretty safe--as the type system will force us to make it
everywhere.
-- 
David Roundy
http://www.darcs.net
msg257 (view) Author: dagit Date: 2005-12-22.08:49:16
I'd be happy to look into this.
msg285 (view) Author: dagit Date: 2005-12-31.02:02:59
I redefined "get_extra_old" which appears to be the only place that error
message can be generated from.  I turned it into "undefined", ran the test suite
and everything passed.  This tells me we don't have any test cases that test
this problem.  I guess my first step will be to figure out a reliable test case.
msg287 (view) Author: droundy Date: 2005-12-31.16:35:09
On Sat, Dec 31, 2005 at 02:02:59AM +0000, Jason Dagit wrote:
> I redefined "get_extra_old" which appears to be the only place that error
> message can be generated from.  I turned it into "undefined", ran the
> test suite and everything passed.  This tells me we don't have any test
> cases that test this problem.  I guess my first step will be to figure
> out a reliable test case.

I believe you could trigger this error message simply by deleting one of
the patch files in a local repository (created in the test suite).  This
would simulate some sort of connection failure that keeps us from accessing
that patch file.  You could also try making the patch file non-readable
(which might be more similar to a scenario that users would actually see).
-- 
David Roundy
http://www.darcs.net
msg727 (view) Author: dagit Date: 2006-07-03.20:22:50
On Dec 31, 2005, at 8:35 AM, David Roundy wrote:

>
> David Roundy <droundy@darcs.net> added the comment:
>
> On Sat, Dec 31, 2005 at 02:02:59AM +0000, Jason Dagit wrote:
>> I redefined "get_extra_old" which appears to be the only place  
>> that error
>> message can be generated from.  I turned it into "undefined", ran the
>> test suite and everything passed.  This tells me we don't have any  
>> test
>> cases that test this problem.  I guess my first step will be to  
>> figure
>> out a reliable test case.
>
> I believe you could trigger this error message simply by deleting  
> one of
> the patch files in a local repository (created in the test suite).   
> This
> would simulate some sort of connection failure that keeps us from  
> accessing
> that patch file.  You could also try making the patch file non- 
> readable
> (which might be more similar to a scenario that users would  
> actually see).

I tried both of those actually and neither did the trick  :)  I also  
discovered that this could be caused in patchset_unison or possibly  
when dealing with partial repos.  I'm still trying to decipher some  
code where it could be happening, but I'm not sure if I'll be able to  
fix this.  Either way, the test suite is inadequate in this area.  I  
should try that test again since I have 'undefined' several more  
functions which call get_extra_old.

Also worth noting, copySSH does not print the scp error message, but  
copySSHs does.  Perhaps I should just modify copySSH to be more like  
copySSHs in that regard.  Even if I do that I would like to improve  
the test suite so I can see the output and verify my changes.

Thanks,
Jason
msg3155 (view) Author: markstos Date: 2008-02-06.16:35:43
I believed darcs "get" provides much better feedback on failure in the unstable
branch now. 

Please re-open if you find that the problem persists.
History
Date User Action Args
2005-11-27 10:39:30hanwencreate
2005-11-27 12:35:19droundysetstatus: unread -> unknown
messages: + msg90
2005-12-22 08:49:16dagitsetnosy: + dagit
messages: + msg257
2005-12-31 02:02:59dagitsetnosy: droundy, tommy, hanwen, dagit
messages: + msg285
2005-12-31 16:35:10droundysetnosy: droundy, tommy, hanwen, dagit
messages: + msg287
2006-04-07 23:08:22jchsetnosy: + jch
2006-07-03 20:22:54dagitsetnosy: droundy, jch, tommy, hanwen, dagit
messages: + msg727
2008-02-06 16:35:47markstossetstatus: unknown -> resolved-in-unstable
nosy: + markstos, kowey, beschmi
messages: + msg3155
2008-09-04 21:27:44adminsetstatus: resolved-in-unstable -> resolved
nosy: droundy, jch, tommy, beschmi, kowey, markstos, hanwen, dagit
2009-08-06 17:32:22adminsetnosy: + jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy, jch, hanwen
2009-08-06 20:46:26adminsetnosy: - beschmi
2009-08-10 21:54:51adminsetnosy: + hanwen, jch, - darcs-devel, zooko, jast, Serware, mornfall
2009-08-10 23:55:44adminsetnosy: - dagit
2009-08-25 17:47:08adminsetnosy: + darcs-devel, - simon
2009-08-27 14:03:41adminsetnosy: jch, tommy, kowey, markstos, darcs-devel, hanwen, thorkilnaur, dmitry.kurochkin