Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8509

Hudson does not warn when a plug-in is build for a more recent version of Hudson (then the installed one)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Linux Red Hat Enterprise Linux - 2.6.9-55.0.2.ELhugemem #1 SMP Tue Jun 12 18:11:10 EDT 2007 i686 i686 i386 GNU/Linux
      Hudson ver. 1.362

      Description

      There is no warning for this plugin in the update center that this plugin requires a newer Hudson version than at least 1.362 which we are using!

      I updated the plugin from 1.14 to 1.15 version and after that our metrics job failed to finish, the graphs of the metrics job were lost, configuration page of any job in Hudson failed to load completely and it wasn't possible to trigger some jobs - so the warning about update should always be there if there is a need for it!

        Activity

        Hide
        drulli Ulli Hafner added a comment -

        This already is inplemented in Hudson (maybe not in you old version). Now you get a warning about incompatible updates.

        Show
        drulli Ulli Hafner added a comment - This already is inplemented in Hudson (maybe not in you old version). Now you get a warning about incompatible updates.
        Hide
        drulli Ulli Hafner added a comment -

        Hmm, there seems to be a bug in that feature. Just tried and the warning is not shown for all plugins.

        Show
        drulli Ulli Hafner added a comment - Hmm, there seems to be a bug in that feature. Just tried and the warning is not shown for all plugins.
        Hide
        drulli Ulli Hafner added a comment -

        Attached a screenshot showing a Hudson 1.392 instance.

        Hudson reports that some plug-ins require Hudson 1.393. However, the latest version of the static analysis plug-ins are also build against Hudson 1.393. There is no such warning for these plugins.

        Show
        drulli Ulli Hafner added a comment - Attached a screenshot showing a Hudson 1.392 instance. Hudson reports that some plug-ins require Hudson 1.393. However, the latest version of the static analysis plug-ins are also build against Hudson 1.393. There is no such warning for these plugins.
        Hide
        drulli Ulli Hafner added a comment -

        Seems that the entry "requiredCore": "1.393" is missing in my plug-ins. Maybe the problem is that my plug-ins don't reference Hudson's plug-in pom directly. E.g., checkstyle has parent analysis-pom which has parent hudson-plugin-pom.

        Show
        drulli Ulli Hafner added a comment - Seems that the entry "requiredCore": "1.393" is missing in my plug-ins. Maybe the problem is that my plug-ins don't reference Hudson's plug-in pom directly. E.g., checkstyle has parent analysis-pom which has parent hudson-plugin-pom.
        Hide
        drulli Ulli Hafner added a comment -

        From discussion with Kohsuke:

        [19:00:13] <drulli> kohsuke: can I change the scope @requiresDependencyResolution in the HPI mojo from 'runtime' to 'test'? Otherwise the dependency to Hudson core is not correctly resolved? See JENKINS-8509.
        [19:00:14] <hudson-admin> JENKINS-8509:Hudson does not warn when a plug-in is build for a more recent version of Hudson (then the installed one) (Reopened) http://hudson-labs.org/issue/8509
        [19:01:14] <kohsuke> This sounds more like a bug in the hpi mojo
        [19:01:19] *** awb has joined #hudson
        [19:01:26] <kohsuke> How does changing the scope to test fix it?
        [19:01:53] <drulli> When scope is test the 'provided' dependencies are added. In runtime not.
        [19:02:22] <drulli> And hudson-core is a provided dependency in many plug-ins.
        [19:02:37] <kohsuke> Does that mean we never correctly calculated the value?
        [19:03:30] <drulli> I didn't check, but this should work only if the dependency does not use provided, see http://maven.apache.org/developers/mojo-api-specification.html
        [19:03:51] <kohsuke> If we set it to test, we now need to make sure test scope dependencies don't show up as dependencies
        [19:03:52] <drulli> At least for my plug-ins it does not work.
        [19:04:50] <drulli> I see. This will require some extra work. I'll have a look at it.
        [19:05:56] <kohsuke> Maybe we are better off resolving dependencies on our own.
        [19:06:26] <kohsuke> I had a very similar situation back in GlassFish, and in the end I felt more comfortable doing that
        [19:06:53] <kohsuke> Build the dependency graph, and cut the edges with the criteria of my choice, instead of one of four pre-built choices.
        [19:07:21] <kohsuke> The code is at http://java.net/projects/maven-antrun-extended-plugin
        [19:08:17] <drulli> Ok, I'll have a look at it...
        [19:10:36] <kohsuke> (for example when your plugin depends on another plugin in a compile dependency, and when that in turn depends on a version of Hudson core, you want to make sure that's ignored)

        Show
        drulli Ulli Hafner added a comment - From discussion with Kohsuke: [19:00:13] <drulli> kohsuke: can I change the scope @requiresDependencyResolution in the HPI mojo from 'runtime' to 'test'? Otherwise the dependency to Hudson core is not correctly resolved? See JENKINS-8509 . [19:00:14] <hudson-admin> JENKINS-8509 :Hudson does not warn when a plug-in is build for a more recent version of Hudson (then the installed one) (Reopened) http://hudson-labs.org/issue/8509 [19:01:14] <kohsuke> This sounds more like a bug in the hpi mojo [19:01:19] *** awb has joined #hudson [19:01:26] <kohsuke> How does changing the scope to test fix it? [19:01:53] <drulli> When scope is test the 'provided' dependencies are added. In runtime not. [19:02:22] <drulli> And hudson-core is a provided dependency in many plug-ins. [19:02:37] <kohsuke> Does that mean we never correctly calculated the value? [19:03:30] <drulli> I didn't check, but this should work only if the dependency does not use provided, see http://maven.apache.org/developers/mojo-api-specification.html [19:03:51] <kohsuke> If we set it to test, we now need to make sure test scope dependencies don't show up as dependencies [19:03:52] <drulli> At least for my plug-ins it does not work. [19:04:50] <drulli> I see. This will require some extra work. I'll have a look at it. [19:05:56] <kohsuke> Maybe we are better off resolving dependencies on our own. [19:06:26] <kohsuke> I had a very similar situation back in GlassFish, and in the end I felt more comfortable doing that [19:06:53] <kohsuke> Build the dependency graph, and cut the edges with the criteria of my choice, instead of one of four pre-built choices. [19:07:21] <kohsuke> The code is at http://java.net/projects/maven-antrun-extended-plugin [19:08:17] <drulli> Ok, I'll have a look at it... [19:10:36] <kohsuke> (for example when your plugin depends on another plugin in a compile dependency, and when that in turn depends on a version of Hudson core, you want to make sure that's ignored)
        Show
        drulli Ulli Hafner added a comment - See: https://github.com/jenkinsci/maven-hpi-plugin/commit/c3a3a9872edc2bb0d2e3e8098705b0275104bc9f

          People

          • Assignee:
            drulli Ulli Hafner
            Reporter:
            tiainpa tiainpa
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: