issue 748 : Provide better trigger exception logging

1 view
Skip to first unread message

Ruben Willems

unread,
Dec 23, 2008, 5:06:02 PM12/23/08
to ccnet-devel
Hi all



I think I got it fixed, although unit tests are not yet done.
http://jira.public.thoughtworks.org/browse/CCNET-748
the patch is 748_4


if someone can take a look and if possible give some feedback



with kind regards
Ruben Willems

Steve Trefethen

unread,
Dec 23, 2008, 6:47:39 PM12/23/08
to ccnet-devel
Great! I'll take a look and let you know what I find.

Thanks much!

-Steve

On Dec 23, 2:06 pm, "Ruben Willems" <ruben.will...@gmail.com> wrote:
> Hi all
>
> I think I got it fixed, although unit tests are not yet done.http://jira.public.thoughtworks.org/browse/CCNET-748

Steve Trefethen

unread,
Dec 29, 2008, 4:32:29 PM12/29/08
to ccnet-devel
Hi Ruben,
It seems the patch is working WRT reporting errors via the email
publisher. Thanks!

I have a problem with the project being left in the stopped state. In
my case, which I know is specific to my situation, I'd like the
project to continue running as it may eventually succeed in which case
no manual intervention is required. Perhaps there could be specific
exception classes that could be used to control what state the project
should be left in when an error occurs.

In my specific case, I've coded my SCC provider to throw an exception
after an FTP connection has failed for N minutes which notifies IT
manual intervention *may* be required. Potentially, the FTP connection
will eventually succeed in which case no manual intervention is
required.

Btw, what's necessary to start a stopped project? Forcing a build from
the webdashboard?

Thanks
-Steve

On Dec 23, 2:06 pm, "Ruben Willems" <ruben.will...@gmail.com> wrote:
> Hi all
>
> I think I got it fixed, although unit tests are not yet done.http://jira.public.thoughtworks.org/browse/CCNET-748

Ruben Willems

unread,
Dec 30, 2008, 2:01:17 PM12/30/08
to ccnet...@googlegroups.com
Hi

Stopping the project after a source control error (via getmodifications) is hard coded for the moment.
I'll try to make this configurable somewhere.

For getting the project back to work, you have to start it,
there is a start button on the dashboard, or you can do it via cctray.


with kind regards
Ruben Willems


Steve Trefethen

unread,
Dec 30, 2008, 5:39:08 PM12/30/08
to ccnet-devel
Hi Ruben,
I saw the call to Stopped() which I've commented out for now in my
build. I played around with the restart options and found the things
you mentioned to work accordingly.

Thanks again,
-Steve

On Dec 30, 11:01 am, "Ruben Willems" <ruben.will...@gmail.com> wrote:
> Hi
>
> Stopping the project after a source control error (via getmodifications) is
> hard coded for the moment.
> I'll try to make this configurable somewhere.
>
> For getting the project back to work, you have to start it,
> there is a start button on the dashboard, or you can do it via cctray.
>
> with kind regards
> Ruben Willems
>

Steve Trefethen

unread,
Dec 31, 2008, 4:23:23 PM12/31/08
to ccnet-devel
Just a quick heads up as it looks like I spoke too soon as the patch
causes problems with the project integration. If I run a project it
*always* complete integration regardless of whether or not there were
modifications thus triggering whatever publishers are active.

I haven't determined the cause yet but this patch definitely breaks
CCNET.

Investigating...

-Steve

On Dec 23, 2:06 pm, "Ruben Willems" <ruben.will...@gmail.com> wrote:
> Hi all
>
> I think I got it fixed, although unit tests are not yet done.http://jira.public.thoughtworks.org/browse/CCNET-748

Steve Trefethen

unread,
Dec 31, 2008, 4:48:00 PM12/31/08
to ccnet-devel
Hi Ruben,
So this patch will *always* call PostBuild() regardless of
result.ShouldRunBuild() which is a serious problem.

Here is my modification to IntegrationRunner.cs
IntegrationRunner.Integration(...) to fix this problem. These changes
more closely mirror the previous code with respect to the result of
ShouldRunBuild(). I'm now testing with these changes.

public IIntegrationResult Integrate(IntegrationRequest request)
{
IIntegrationResult result = resultManager.StartNewIntegration
(request);
IIntegrationResult lastResult =
resultManager.LastIntegrationResult;

CreateDirectoryIfItDoesntExist(result.WorkingDirectory);
CreateDirectoryIfItDoesntExist(result.ArtifactDirectory);

result.MarkStartTime();

bool GettingModifications = true;
bool RunBuild = false;

try
{
target.CreateLabel(result);

result.Modifications = GetModifications(lastResult, result);
GettingModifications = false;

RunBuild = result.ShouldRunBuild();
if (RunBuild)
{
Log.Info("Building: " + request);
Build(result);
}

}
catch (Exception ex)
{
result.ExceptionResult = ex;
result.SourceControlErrorOccured = GettingModifications;

}
finally
{
if (RunBuild)
{
result.MarkEndTime();
PostBuild(result);
Log.Info(string.Format("Integration complete: {0} - {1}",
result.Status, result.EndTime));
}
target.Activity = ProjectActivity.Sleeping;
}
return result;
}

-Steve
http://www.stevetrefethen.com/blog/

On Dec 23, 2:06 pm, "Ruben Willems" <ruben.will...@gmail.com> wrote:
> Hi all
>
> I think I got it fixed, although unit tests are not yet done.http://jira.public.thoughtworks.org/browse/CCNET-748

Ruben Willems

unread,
Jan 1, 2009, 3:50:46 PM1/1/09
to ccnet...@googlegroups.com
Hi Steve

this fix will not work:
you will only run the publishers if a build occured,
but when an error occured at getmodifications, the publishers are not ran.

I'll try to fix this problem, it is indeed not needed to run the publishers on every integration.
only when a build ran, or there was an error in getting the modifications.




with kind regards
Ruben Willems




Steve Trefethen

unread,
Jan 2, 2009, 2:33:16 AM1/2/09
to ccnet-devel
You're absolutely right. This occurred to me and when I returned here
to post again I found your response. :)

-Steve

On Jan 1, 12:50 pm, "Ruben Willems" <ruben.will...@gmail.com> wrote:
> Hi Steve
>
> this fix will not work:
> you will only run the publishers if a build occured,
> but when an error occured at getmodifications, the publishers are not ran.
>
> I'll try to fix this problem, it is indeed not needed to run the publishers
> on every integration.
> only when a build ran, or there was an error in getting the modifications.
>
> with kind regards
> Ruben Willems
>

Ruben Willems

unread,
Jan 2, 2009, 4:22:40 AM1/2/09
to ccnet...@googlegroups.com
Hi


let me know if the latest patch works,
I'm now working on making it configurable, and have some idea on the posible options.
Hopefully this is ready during the weekend.

Keeping you posted ...



with kind regards
Ruben Willems

Steve Trefethen

unread,
Jan 9, 2009, 1:39:11 PM1/9/09
to ccnet-devel
Hi Ruben,
Yes, this is looking better.

Thanks!
-Steve

On Jan 2, 1:22 am, "Ruben Willems" <ruben.will...@gmail.com> wrote:
> Hi
>
> let me know if the latest patch works,
> I'm now working on making it configurable, and have some idea on the posible
> options.
> Hopefully this is ready during the weekend.
>
> Keeping you posted ...
>
> with kind regards
> Ruben Willems
>

Ruben Willems

unread,
Jan 9, 2009, 1:57:57 PM1/9/09
to ccnet...@googlegroups.com
Hi


did you use the patch with the configuration option?
748_8



with kind regards
Ruben Willems

Steve Trefethen

unread,
Jan 11, 2009, 1:18:00 AM1/11/09
to ccnet-devel
Yes, I grabbed that patch. I didn't test with the
MaxAmountOfSourceControlExceptions option as I want the project to
continue running and sending email. I review all of the changes and
greatly appreciate the fact that you incorporated this support into
the code.

-Steve

On Jan 9, 10:57 am, "Ruben Willems" <ruben.will...@gmail.com> wrote:
> Hi
>
> did you use the patch with the configuration option?
> 748_8
>
> with kind regards
> Ruben Willems
>
Reply all
Reply to author
Forward
0 new messages