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

Gitlab hook plugin breaks on folded jobs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • gitlab-hook-plugin
    • None
    • Gitlab hook plugin v1.4.2 (snapshot 1.4.2-20160327.215747-10.hpi)
      Cloudbees Folders plugin v5.7
      Jenkins ver. 1.642.3
      GitLab Community Edition 8.5.1 8b7080d

      Description

      Gitlab hook plugin (hereinafter the plugin) v1.4.2 installed from hpi. Merge Requests processing works fine for a normal plain job.

      With the Folders plugin created folder and a job inside the folder, it gives wrong behaviour. For the given explanation I will use a folder named 'folder' and a parent job named 'parent_job' inside the folder.

      • The plugin creates two jobs for a new merge request instead of one. One of the jobs is empty, has no configuration at all, named with the folder name, like: 'folder/parent_job-mr-123'. This job is never touched again and literally do nothing. The second one is properly configured and named without a folder name, like: 'parent-job-mr-123'. This one works fine.
      • When the merge request accepted the second one job is deleted properly, the first one is untouched.
      • After that, work of the plugin is blocked due to exception.
      • After manual deletion of the second job plugin starts to work again (until next child job deletion).

      Exception

      "action": "open"
      }
      Apr 04, 2016 3:39:36 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
      INFO: matching projects:

      • folder/parent_job
        Apr 04, 2016 3:39:36 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
        INFO: matching projects:
      • folder/parent_job
        Apr 04, 2016 3:39:36 PM org.eclipse.jetty.util.log.JavaUtilLog info
        INFO: NameError - no constructorfor arguments (java.lang.IllegalArgumentException) on Java::OrgJrubyExceptions::RaiseException:
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/models/api.rb:76:in `process_projects'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/models/api.rb:31:in `POST /build_now'
        org/jruby/RubyMethod.java:118:in `call'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in `compile!'
        org/jruby/RubyProc.java:249:in `call'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `route!'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:851:in `route_eval'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `route!'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:872:in `process_route'
        org/jruby/RubyKernel.java:1174:in `catch'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in `process_route'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:834:in `route!' org/jruby/RubyArray.java:1613:in `each'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in `route!'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:936:in `dispatch!'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in `call!'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `invoke'
        org/jruby/RubyKernel.java:1174:in `catch'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `invoke'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in `call!'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:755:in `call'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-1.4.1/lib/rack/nulllogger.rb:9:in `call'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/showexceptions.rb:21:in `call'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:99:in `call'
        /var/jenkins_home/plugins/gitlab-hook/WEB-INF/classes/models/root_action.rb:18:in `call'
        file:/var/jenkins_home/plugins/ruby-runtime/WEB-INF/lib/jruby-rack-1.1.13.1.jar!/rack/handler/servlet.rb:22:in `call'

      Steps to reproduce

      • install Folders plugin (cloudbees-folders, via update center)
      • install Gitlab Hook Plugin (snapshot v1.4.2)
      • Create a folder
      • Create a job inside the folder
      • Configure the job to be a parent job for the merge requests
      • Trigger Merge Request
      • Accept Merge Request

            javiplx Javier Palacios
            hadesarchitect Aleksandr Volochnev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: