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

Conflict active-choices-plugin with jquery-plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      active-choices-plugin with jquery-plugin (which needed for sonar plugin) does not update data in Active Choices Reactive Parameter.
      Example Jenkinsfile:

      properties([parameters([booleanParam(defaultValue: false, description: '', name: 'RELEASE'), [$class: 'CascadeChoiceParameter', choiceType: 'PT_SINGLE_SELECT', description: '', filterable: false, name: 'TEST', randomName: 'choice-parameter-123', referencedParameters: 'RELEASE', script: [$class: 'GroovyScript', fallbackScript: [classpath: [], sandbox: false, script: ''], script: [classpath: [], sandbox: false, script: '''
      
      if (RELEASE.equals(\'on\')){
      return ['xtrue',RELEASE] }
      else{
      return ['xfalse',RELEASE]
      }
      ''']]]]), pipelineTriggers([])])
      

      After remove jquery-plugin all work perfect.

        Attachments

          Activity

          Hide
          kinow Bruno P. Kinoshita added a comment -

          HI Yuriy Burtsev

          I have used other plug-ins that depend on jquery-plugin with active-choices-plugin, and it worked well, even after uninstalling the plug-ins. I remember seeing a similar issue, but if I recall correctly, it was closed as not a defect.

          The sonarqube-plugin uses the jquery-plugin as a Maven dependency

          https://github.com/jenkinsci/sonarqube-plugin/blob/2506455aa5b8af909df5f9c1c6b25bdfd2552265/pom.xml#L160

          And the jquery-plugin is using an adjunct jquery https://github.com/stapler/stapler-adjunct-jquery which active-choices is also using. Jenkins should take care of plug-in dependencies, to avoid uninstalling plug-ins used by other plug-ins, and the adjunct takes care to load the library just once. So everything should work... but we could have a bug

          >active-choices-plugin with jquery-plugin (which needed for sonar plugin) does not update data in Active Choices Reactive Parameter.

          Righto.

          > Example Jenkinsfile:

          Could you confirm it happens without Jenkinsfile or workflow/pipeline plug-in, please? See https://issues.jenkins-ci.org/browse/JENKINS-28735 for example. There are other issues with the pipeline plug-in, but the plugin needs to have access to the browser DOM, more specifically that one created for the build with parameters screen.

          >After remove jquery-plugin all work perfect.

          Could you confirm that, without pipelines, please?

          Show
          kinow Bruno P. Kinoshita added a comment - HI Yuriy Burtsev I have used other plug-ins that depend on jquery-plugin with active-choices-plugin, and it worked well, even after uninstalling the plug-ins. I remember seeing a similar issue, but if I recall correctly, it was closed as not a defect. The sonarqube-plugin uses the jquery-plugin as a Maven dependency https://github.com/jenkinsci/sonarqube-plugin/blob/2506455aa5b8af909df5f9c1c6b25bdfd2552265/pom.xml#L160 And the jquery-plugin is using an adjunct jquery https://github.com/stapler/stapler-adjunct-jquery which active-choices is also using. Jenkins should take care of plug-in dependencies, to avoid uninstalling plug-ins used by other plug-ins, and the adjunct takes care to load the library just once. So everything should work... but we could have a bug >active-choices-plugin with jquery-plugin (which needed for sonar plugin) does not update data in Active Choices Reactive Parameter. Righto. > Example Jenkinsfile: Could you confirm it happens without Jenkinsfile or workflow/pipeline plug-in, please? See https://issues.jenkins-ci.org/browse/JENKINS-28735 for example. There are other issues with the pipeline plug-in, but the plugin needs to have access to the browser DOM, more specifically that one created for the build with parameters screen. >After remove jquery-plugin all work perfect. Could you confirm that, without pipelines, please?
          Hide
          burtsevyg Yuriy Burtsev added a comment - - edited

          Yes you are right.
          I cannot reproduce this with jenkins docker container from docker hub.
          I install default plugins than jquery and sonarqube and active choice work good!
          But on my production Jenkins server it reproduce all the time.

          In all the tests I use pipeline script:

          properties([parameters([booleanParam(defaultValue: false, description: '', name: 'RELEASE'), [$class: 'CascadeChoiceParameter', choiceType: 'PT_SINGLE_SELECT', description: '', filterable: false, name: 'TEST', randomName: 'choice-parameter-123', referencedParameters: 'RELEASE', script: [$class: 'GroovyScript', fallbackScript: [classpath: [], sandbox: false, script: ''], script: [classpath: [], sandbox: false, script: '''
          
          if (RELEASE.equals(\'on\')){
          return ['xtrue',RELEASE] }
          else{
          return ['xfalse',RELEASE]
          }
          ''']]]]), pipelineTriggers([])])
          
          Show
          burtsevyg Yuriy Burtsev added a comment - - edited Yes you are right. I cannot reproduce this with jenkins docker container from docker hub. I install default plugins than jquery and sonarqube and active choice work good! But on my production Jenkins server it reproduce all the time. In all the tests I use pipeline script: properties([parameters([booleanParam(defaultValue: false , description: '', name: ' RELEASE '), [$class: ' CascadeChoiceParameter ', choiceType: ' PT_SINGLE_SELECT ', description: ' ', filterable: false , name: ' TEST ', randomName: ' choice-parameter-123 ', referencedParameters: ' RELEASE ', script: [$class: ' GroovyScript ', fallbackScript: [classpath: [], sandbox: false , script: ' '], script: [classpath: [], sandbox: false , script: ' '' if (RELEASE.equals(\ 'on\' )){ return [ 'xtrue' ,RELEASE] } else { return [ 'xfalse' ,RELEASE] } ''']]]]), pipelineTriggers([])])
          Hide
          burtsevyg Yuriy Burtsev added a comment -

          Should I close the bug?

          Show
          burtsevyg Yuriy Burtsev added a comment - Should I close the bug?
          Hide
          kinow Bruno P. Kinoshita added a comment -

          I think so Yuriy Burtsev. I will keep an eye on issues like this, as you are not the first to report something similar. In the end it proved to be hard to reproduce, but we may have a hidden bug, or one that gets triggered only under specific circumstances. Let's close it, and we can re-open or file a new bug if that re-appears.

          Thank you!
          Bruno

          Show
          kinow Bruno P. Kinoshita added a comment - I think so Yuriy Burtsev . I will keep an eye on issues like this, as you are not the first to report something similar. In the end it proved to be hard to reproduce, but we may have a hidden bug, or one that gets triggered only under specific circumstances. Let's close it, and we can re-open or file a new bug if that re-appears. Thank you! Bruno

            People

            Assignee:
            kinow Bruno P. Kinoshita
            Reporter:
            burtsevyg Yuriy Burtsev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: