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 215972 - hudson plugin won't deactivate
Summary: hudson plugin won't deactivate
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal with 1 vote (vote)
Assignee: Tomas Mysik
URL:
Keywords:
: 217056 (view as bug list)
Depends on:
Blocks: 211562
  Show dependency tree
 
Reported: 2012-07-25 21:38 UTC by BullfrogBlues
Modified: 2012-11-15 11:47 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Yet another is.eager approach (2.09 KB, patch)
2012-11-09 16:58 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BullfrogBlues 2012-07-25 21:38:56 UTC
1. Tools > Plugins > Installed
2. check the Hudson plugin
3. click "Deactivate"
4. click "Deactivate" again in the comfirmation dialog which comes up
5! select "Restart IDE Now" and click "Finish".  The IDE restarts but the
plugin is still active.

Version 7.2


This is not an isolated issue
-----------------------------

Bugzilla wont deactivate: http://netbeans.org/bugzilla/show_bug.cgi?id=196406
Java profiler won't deactivate http://netbeans.org/bugzilla/show_bug.cgi?id=208810
Ant http://netbeans.org/bugzilla/show_bug.cgi?id=196374

... those are just the first few on a "deactivate" search http://netbeans.org/bugzilla/buglist.cgi?quicksearch=deactivate;list_id=66127

This is without the persitant issues of disable/enable dependencies:

java profiler http://netbeans.org/bugzilla/show_bug.cgi?id=208810
Software as Service http://netbeans.org/bugzilla/process_bug.cgi
Database http://netbeans.org/bugzilla/show_bug.cgi?id=214317
Comment 1 Jiri Rechtacek 2012-09-12 13:31:19 UTC
*** Bug 218159 has been marked as a duplicate of this bug. ***
Comment 2 Petr Jiricka 2012-09-12 15:21:51 UTC
I think this is pretty serious -> P2.
Comment 3 Jiri Rechtacek 2012-09-13 08:00:44 UTC
*** Bug 217056 has been marked as a duplicate of this bug. ***
Comment 4 Jiri Rechtacek 2012-10-18 12:42:33 UTC
*** Bug 211562 has been marked as a duplicate of this bug. ***
Comment 5 Jaroslav Tulach 2012-11-05 16:56:51 UTC
*** Bug 219303 has been marked as a duplicate of this bug. ***
Comment 6 Jaroslav Tulach 2012-11-06 11:25:05 UTC
*** Bug 209999 has been marked as a duplicate of this bug. ***
Comment 7 Jaroslav Tulach 2012-11-07 09:45:23 UTC
The case of hudson is as follows: php.kit recommends hudson.php and that one depends on hudson. Because php.kit remains enabled, it tried to turn hudson.php up and that in turn re-enabled hudson.

Just make hudson.php an eager module and remove the recommends from the kit.

diff -r ccd07a11e690 hudson.php/nbproject/project.properties
--- a/hudson.php/nbproject/project.properties   Wed Nov 07 03:49:32 2012 +0100
+++ b/hudson.php/nbproject/project.properties   Wed Nov 07 10:44:33 2012 +0100
@@ -1,4 +1,4 @@
-is.autoload=true
+is.eager=true
 javac.source=1.6
 javac.compilerargs=-Xlint -Xlint:-serial
 release.external/config-4f37f781e487dc957ff09359d8a5cb51e6588ff9.xml=hudson/config.xml
diff -r ccd07a11e690 php.kit/manifest.mf
--- a/php.kit/manifest.mf       Wed Nov 07 03:49:32 2012 +0100
+++ b/php.kit/manifest.mf       Wed Nov 07 10:44:33 2012 +0100
@@ -2,4 +2,4 @@
 OpenIDE-Module: org.netbeans.modules.php.kit
 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/php/kit/Bundle.properties
 OpenIDE-Module-Specification-Version: 1.47
-OpenIDE-Module-Recommends: cnb.org.netbeans.modules.hudson.php, cnb.org.netbeans.modules.languages.ini, cnb.org.netbeans.modules.languages.neon, cnb.org.netbeans.modules.php.apigen, cnb.org.netbeans.modules.web.clientproject, cnb.org.netbeans.modules.websvc.saas.codegen.php, cnb.org.netbeans.modules.websvc.saas.kit
+OpenIDE-Module-Recommends: cnb.org.netbeans.modules.languages.ini, cnb.org.netbeans.modules.languages.neon, cnb.org.netbeans.modules.php.apigen, cnb.org.netbeans.modules.web.clientproject, cnb.org.netbeans.modules.websvc.saas.codegen.php, cnb.org.netbeans.modules.websvc.saas.kit
Comment 8 Tomas Mysik 2012-11-07 09:53:05 UTC
I will do that, thanks for the patch. But I have to say that I am now a bit confused whether recommended modules work... (I expect the same for WS etc.).

Thanks.
Comment 9 Tomas Mysik 2012-11-07 09:56:38 UTC
Also, this patch can hardly fix e.g. issue #209999 which is marked as a duplicate of this issue...
Comment 10 Jaroslav Tulach 2012-11-07 12:10:55 UTC
(In reply to comment #9)
> Also, this patch can hardly fix e.g. issue #209999 which is marked as a
> duplicate of this issue...

I was hoping to fix this in the infrastructure, but I am not able to find a way to do it. I will have to re-open the other bugs.

(In reply to comment #8)
> I will do that, thanks for the patch. But I have to say that I am now a bit
> confused whether recommended modules work... (I expect the same for WS etc.).

Seems to me that recommending a module with UI or an element in the Plugins list is wrong. The hudson case seems like a clear "bridge case" - e.g. a module that depends on other functionalities and should be enabled whenever they are both enabled. For this purpose eager is ideal. I am not sure about the other cases.
Comment 11 Tomas Mysik 2012-11-07 12:45:51 UTC
(In reply to comment #10)
> Seems to me that recommending a module with UI or an element in the Plugins
> list is wrong.

Interesting since to me, it makes perfect sense to recommend plugin from Plugins list, e.g. if there is a plugin for some templates (which can be used standalone) and there is some framework which can use these templates (or any others) - the framework could recommend this templates plugin and it is up to user to decide [1] whether he wants it or not.

Thanks for your explanation.
[1] I know that we have no UI for recommended modules yet.
Comment 12 Tomas Mysik 2012-11-08 07:27:33 UTC
Fixed the hudson and php part - thanks again Jardo for the patch.

I will reopen the duplicates.

http://hg.netbeans.org/web-main/rev/1f116f69a44b
Comment 13 Tomas Mysik 2012-11-08 13:30:09 UTC
I am sorry but I have to reopen this issue since I had to rollback [1] the fix - the commit validation failed for our team build [2]. Jardo, could you please check the test failure if it is correct or not?

Thanks a lot.
[1] http://hg.netbeans.org/web-main/rev/00e74f3b56ea
[2] http://bertram2.netbeans.org:8080/job/web-main/9152/
Comment 14 Jesse Glick 2012-11-08 18:29:31 UTC
(In reply to comment #11)
> I know that we have no UI for recommended modules yet.

Such a user-level feature cannot be implemented using this module system facility; it was never designed for it. You would need to introduce new metadata interpreted by Plugin Manager.
Comment 15 Quality Engineering 2012-11-09 02:51:29 UTC
Integrated into 'main-golden', will be available in build *201211090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1f116f69a44b
User: Tomas Mysik <tmysik@netbeans.org>
Log: #215972 - hudson plugin won't deactivate
Comment 16 Jaroslav Tulach 2012-11-09 13:51:00 UTC
I've reapplied 1f116f69a44b locally, rebuilt php.kit and hudson.php and ide.ergonomics, but running following command seems to work OK:

$ ant -f ide.ergonomics/build.xml test-single -Dtest.includes=**/Caching*

-do-junit-single:
    [junit] Testsuite: org.netbeans.modules.ide.ergonomics.CachingPreventsLoadingOfModuleManifestsTest
    [junit] System class loader patches: /home/jarda/src/netbeans/ergonomics/ide.ergonomics/build/test/unit/classes
    [junit] System class loader patches: /home/jarda/src/netbeans/ergonomics/ide.ergonomics/build/test/unit/classes
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 26,57 sec

I'll try to do clean build now.
Comment 17 Jaroslav Tulach 2012-11-09 14:24:10 UTC
$ ant clean build commit-validation 
reproduces the problem.
Comment 18 Jaroslav Tulach 2012-11-09 16:58:07 UTC
Created attachment 127498 [details]
Yet another is.eager approach

It turns out that the hudson.php module does not depend on any regular module from php cluster. Only two autoload APIs. The current behavior is to turn such eager module on anyway which is not what we want and the failing test detected that correctly.

Possible solution is to add dependency on some regular module from php cluster. My patch tries that with php.kit. It is sort of artificial, but it seems to behave well in the IDE.

Maybe there is a better regular (usually means with user visible UI) module in the php cluster to depend on...
Comment 19 Jaroslav Tulach 2012-11-09 16:59:49 UTC
I had some additional changes locally, but I hope they don't affect the previous conclusion. Passing to Tomáš to polish the changes to suite his needs.
Comment 20 Tomas Mysik 2012-11-13 12:28:31 UTC
Should be fixed now, Martine please verify, Thanks.

http://hg.netbeans.org/web-main/rev/a7beea41783b
Comment 21 Quality Engineering 2012-11-14 02:43:09 UTC
Integrated into 'main-golden', will be available in build *201211140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a7beea41783b
User: Tomas Mysik <tmysik@netbeans.org>
Log: #215972 - hudson plugin won't deactivate
Comment 22 Tomas Mysik 2012-11-14 09:48:16 UTC
After applying the "Yet another is.eager approach" patch, hudson.php unit tests started to fail - see [1]. Jardo, could you please have a look at it (I tried it but no success, sorry!)? I really don't see any connection with your patch but the tests are fixed again once I revert it...

Reopening and assigning to Jarda, please, reassign back once you know the cause.

Thanks a lot.
[1] http://bertram.netbeans.org:8080/job/PHP-build/5648/testReport/junit/org.netbeans.modules.hudson.php.xml/XmlUtilsTest/testAsString/
Comment 23 Jaroslav Tulach 2012-11-14 10:35:49 UTC
Looks like php.kit has an (indirect) dependency on a module that provides non-functional part of XML parser. One fix may be to change the dependencies (so the JAR file is not on classpath of the test). Or I think there is a way to specify the preferred XML parser using a property - the test could set it before its execution.

The proper fix however would be to remove the non-functional XML parser module from the IDE. I don't really get why PHP support needs to bundle broken XML parser...
Comment 24 Tomas Mysik 2012-11-14 10:37:55 UTC
(In reply to comment #23)
> I don't really get why PHP support needs to bundle broken XML
> parser...

We parse e.g. XML file from PHPUnit. I will look at it.
Comment 25 Tomas Mysik 2012-11-14 12:42:10 UTC
Closing back as FIXED, the test failure will be fixed in PHP area.

Thanks.
Comment 26 Martin Kanak 2012-11-15 11:47:17 UTC
verified - Hudson plug-in is possible to deactivate

Product Version: NetBeans IDE Dev (Build 201211150001)
Java: 1.7.0_10-ea; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b15