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

'undefined method `extensions'' on processing Multiple SCMs projects

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: gitlab-hook-plugin
    • Labels:
      None
    • Environment:
      jenkins: 1.614
      gitlab-hook-plugin: 1.4.0
      multiple-scms: 0.4

      (also occurs on)
      jenkins: 1.609.1
      gitlab-hook-plugin: 1.4.0
      multiple-scms: 0.5
    • Similar Issues:

      Description

      Since gitlab-hook-plugin 1.4.0 when processing projects that contain Multiple SCMs as Source Code Management, the following exception occurred:

        undefined method `extensions' for # <Java::OrgJenkinsciPluginsMultiplescms::MultiSCM:0x6889f57f>
      org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `extensions' for #<Java::OrgJenkinsciPluginsMultiplescms::MultiSCM:0x6889f57f>
              at GitlabWebHook::Project.pre_build_merge(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/values/project.rb:112)
              at GitlabWebHook::Project.pre_build_merge?(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/values/project.rb:63)
              at GitlabWebHook::Project.merge_to?(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/values/project.rb:67)
              at GitlabWebHook::Project.matches?(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/values/project.rb:55)
              at RUBY.get_projects_to_process(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/use_cases/process_commit.rb:36)
              at org.jruby.RubyArray.select!(org/jruby/RubyArray.java:2435)
              at RUBY.get_projects_to_process(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/use_cases/process_commit.rb:35)
              at RUBY.with(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/use_cases/process_commit.rb:15)
              at RUBY.process_projects(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/api.rb:46)
              at RUBY.POST /build_now(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/api.rb:30)
      ....
      

      It worked ok in 1.3.1

        Attachments

          Activity

          Hide
          bullhornrelease Bullhorn RelEng added a comment -

          I see the same issue.

          Show
          bullhornrelease Bullhorn RelEng added a comment - I see the same issue.
          Hide
          rymndhng Ray H added a comment -

          I am seeing this issue as well.

          Show
          rymndhng Ray H added a comment - I am seeing this issue as well.
          Hide
          celeblung Luis Ehlen added a comment -

          +1
          Thanks

          Show
          celeblung Luis Ehlen added a comment - +1 Thanks
          Hide
          javiplx Javier Palacios added a comment -

          Could someone post a config.xml for a multi-scm project?

          Show
          javiplx Javier Palacios added a comment - Could someone post a config.xml for a multi-scm project?
          Hide
          ilpianista Andrea Scarpino added a comment -

          Multi-SCM project config

          Show
          ilpianista Andrea Scarpino added a comment - Multi-SCM project config
          Hide
          javiplx Javier Palacios added a comment -

          I've found the bug, so I expect to get it fully fixed soon. In the meantime, there is a fast workaround (assuming that you have no merged branches configured in your projects). Take the file and line producing the exception (/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/values/project.rb:112), and replace with '@pre_build_merge = false' (it's line 115 on current release).

          The reason behind is that the merged branches are checked, so that the project is triggered not only if the push is for the main branch but also if it is for any merged branch. So with the workaround these secondary triggers will not happen.

          Show
          javiplx Javier Palacios added a comment - I've found the bug, so I expect to get it fully fixed soon. In the meantime, there is a fast workaround (assuming that you have no merged branches configured in your projects). Take the file and line producing the exception ( /var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/values/project.rb:112 ), and replace with '@pre_build_merge = false' (it's line 115 on current release). The reason behind is that the merged branches are checked, so that the project is triggered not only if the push is for the main branch but also if it is for any merged branch. So with the workaround these secondary triggers will not happen.
          Hide
          javiplx Javier Palacios added a comment -

          Fix available on current snapshot, downloadable from
          http://maven.jenkins-ci.org/content/repositories/snapshots/org/jenkins-ci/ruby-plugins/gitlab-hook/1.4.2-SNAPSHOT.
          The new (very basic) acceptance tests do succeed, but please confirm whether it works or not.

          Show
          javiplx Javier Palacios added a comment - Fix available on current snapshot, downloadable from http://maven.jenkins-ci.org/content/repositories/snapshots/org/jenkins-ci/ruby-plugins/gitlab-hook/1.4.2-SNAPSHOT . The new (very basic) acceptance tests do succeed, but please confirm whether it works or not.

            People

            • Assignee:
              javiplx Javier Palacios
              Reporter:
              velma911 Anton Velma
            • Votes:
              10 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: