This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 205752 - No way to interrupt Document creating for new build job
Summary: No way to interrupt Document creating for new build job
Status: RESOLVED FIXED
Alias: None
Product: connecteddeveloper
Classification: Unclassified
Component: Hudson (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2011-12-01 08:26 UTC by Tomas Mysik
Modified: 2012-10-17 08:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed Patch (4.25 KB, patch)
2012-10-10 14:42 UTC, Jaroslav Havlin
Details | Diff
Proposed Patch (4.68 KB, patch)
2012-10-11 14:10 UTC, Jaroslav Havlin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2011-12-01 08:26:22 UTC
There is no way to interrupt Document creating for new build job; my scenario is:
- user is creating new Hudson build job for a PHP project
- (s)he clicks OK
- hudson.php support must do 2 things:
    1. generate project files (build.xml and phpunit.xml.dist) via external tool
    2. create (copy) job config.xml

The problem is when the external tool fails to generate project files - message is displayed to the user but there is no way to avoid message from hudson support "Could not create job". Or am I missing something?

Thanks.
Comment 1 Jaroslav Havlin 2012-10-10 14:42:16 UTC
Created attachment 125707 [details]
Proposed Patch
Comment 2 Jaroslav Havlin 2012-10-10 14:43:58 UTC
Added new exception type SilentIOException. Please check attached patch.

I'm opening an API review. Module hudson is not public (frient private), but someone could suggest a better solution.
Comment 3 Tomas Mysik 2012-10-11 07:59:43 UTC
TM01: Please, increase spec. version of hudson.php module as well (I think it should work even without it but just to be sure).

Otherwise the patch seems OK to me. Thanks for it.
Comment 4 Jaroslav Havlin 2012-10-11 14:10:55 UTC
Created attachment 125782 [details]
Proposed Patch

TM01 - Spec. version increased.

Thank you. If there are no other comments, I will integrate tomorrow.
Comment 5 Jaroslav Havlin 2012-10-12 14:33:57 UTC
Integrated as http://hg.netbeans.org/core-main/rev/9a4b61f1ca24

Thanks for reporting and your comments.
Comment 6 Jaroslav Tulach 2012-10-12 22:13:01 UTC
A bit too late, but: Do you know there is UserQuestionException? Its purpose is opposite, but possibly it could be used for the same task. The hudson would just throw UserQuestionEx (subclass of IOEx) and the dialog would be presented be caller code.

The motivation for that is clear - it is not wise to block while showing a dialog, when it is not clear what locks and thread the caller operates in (not sure how applicable it is here).
Comment 7 Quality Engineering 2012-10-13 02:08:45 UTC
Integrated into 'main-golden', will be available in build *201210130002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9a4b61f1ca24
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #205752: No way to interrupt Document creating for new build job
Comment 8 Jaroslav Havlin 2012-10-17 08:42:39 UTC
(In reply to comment #6)
> A bit too late, but: Do you know there is UserQuestionException?
I didn't know about it, thanks, 

> Its purpose is opposite, but possibly it could be used for the same task.
> The hudson would just throw UserQuestionEx (subclass of IOEx) and the dialog 
> would be presented be caller code.
> 
> The motivation for that is clear - it is not wise to block while showing a
> dialog, when it is not clear what locks and thread the caller operates in (not
> sure how applicable it is here).
I think that the current implementation is appropriate.
The dialog has some custom buttons and we would need to pass more information in the UserQuestionException. There should be no problems with locking in this case.