• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • matrix-project-plugin
    • None

      For improved test-ability and upgrades, upgrade the parent pom to the 2.x line. The jenkins.version might also be a candidate for upgrades since it's on a line that's old.

          [JENKINS-36630] Migrate matrix-project to parent pom

          This PR has been in development/hiatus/redevelopment for a while. I'm stuck on a few tests with a variation on the failure of matrix creation within a matrix job:
          Jul 11, 2016 9:24:04 PM com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl runSingleJob
          SEVERE: Job run failed with unexpected RuntimeException: TypeError: Cannot find function on in object [object HTMLSpanElement]. (http://localhost:46836/jenkins/static/b7504d27/scripts/hudson-behavior.js#2806)
          ======= EXCEPTION START ========
          Exception class=[net.sourceforge.htmlunit.corejs.javascript.JavaScriptException]
          com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function on in object [object HTMLSpanElement]. (http://localhost:46836/jenkins/static/b7504d27/scripts/hudson-behavior.js#2806)
          at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:865)
          at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:628)
          at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513)
          at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:796)
          at com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.setState(XMLHttpRequest.java:224)
          at com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.doSend(XMLHttpRequest.java:775)
          at com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.access$000(XMLHttpRequest.java:105)
          at com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest$1.run(XMLHttpRequest.java:630)
          at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:628)
          at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513)
          at com.gargoylesoftware.htmlunit.javascript.background.JavascriptXMLHttpRequestJob.run(JavascriptXMLHttpRequestJob.java:37)
          at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl.runSingleJob(JavaScriptJobManagerImpl.java:428)
          at com.gargoylesoftware.htmlunit.javascript.background.DefaultJavaScriptExecutor.run(DefaultJavaScriptExecutor.java:168)
          at java.lang.Thread.run(Thread.java:745)
          Caused by: net.sourceforge.htmlunit.corejs.javascript.JavaScriptException: TypeError: Cannot find function on in object [object HTMLSpanElement]. (http://localhost:46836/jenkins/static/b7504d27/scripts/hudson-behavior.js#2806)
          at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1006)
          at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
          at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
          at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
          at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:310)
          at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3286)
          at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:789)
          at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:850)
          ... 13 more
          JavaScriptException value = TypeError: Cannot find function on in object [object HTMLSpanElement].
          == CALLING JAVASCRIPT ==
          function ()

          { var a = merge(args, arguments); return __method.apply(context, a); }

          ======= EXCEPTION END ========

          While this error makes sense, I'm not sure how to solve it. I know it's tied to how the selection is made on the page, and think it's something in the processing of the "onClick" function. Disabling Javascript isn't helpful since the entire creation process is handled in Javascript.

          The real goal for this plugin change is to make testing easier. If the parent is changed to the jenkins-test-harness things like the plugin-compat-test would be able to check it against other versions of Jenkins fairly easily.

          If anyone knows a good way around the above error or have a suggestion, please let me know. All comments are welcome.

          Kristin Whetstone added a comment - This PR has been in development/hiatus/redevelopment for a while. I'm stuck on a few tests with a variation on the failure of matrix creation within a matrix job: Jul 11, 2016 9:24:04 PM com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl runSingleJob SEVERE: Job run failed with unexpected RuntimeException: TypeError: Cannot find function on in object [object HTMLSpanElement] . ( http://localhost:46836/jenkins/static/b7504d27/scripts/hudson-behavior.js#2806 ) ======= EXCEPTION START ======== Exception class= [net.sourceforge.htmlunit.corejs.javascript.JavaScriptException] com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function on in object [object HTMLSpanElement] . ( http://localhost:46836/jenkins/static/b7504d27/scripts/hudson-behavior.js#2806 ) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:865) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:628) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:796) at com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.setState(XMLHttpRequest.java:224) at com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.doSend(XMLHttpRequest.java:775) at com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.access$000(XMLHttpRequest.java:105) at com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest$1.run(XMLHttpRequest.java:630) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:628) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) at com.gargoylesoftware.htmlunit.javascript.background.JavascriptXMLHttpRequestJob.run(JavascriptXMLHttpRequestJob.java:37) at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl.runSingleJob(JavaScriptJobManagerImpl.java:428) at com.gargoylesoftware.htmlunit.javascript.background.DefaultJavaScriptExecutor.run(DefaultJavaScriptExecutor.java:168) at java.lang.Thread.run(Thread.java:745) Caused by: net.sourceforge.htmlunit.corejs.javascript.JavaScriptException: TypeError: Cannot find function on in object [object HTMLSpanElement] . ( http://localhost:46836/jenkins/static/b7504d27/scripts/hudson-behavior.js#2806 ) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1006) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:310) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3286) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:789) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:850) ... 13 more JavaScriptException value = TypeError: Cannot find function on in object [object HTMLSpanElement] . == CALLING JAVASCRIPT == function () { var a = merge(args, arguments); return __method.apply(context, a); } ======= EXCEPTION END ======== While this error makes sense, I'm not sure how to solve it. I know it's tied to how the selection is made on the page, and think it's something in the processing of the "onClick" function. Disabling Javascript isn't helpful since the entire creation process is handled in Javascript. The real goal for this plugin change is to make testing easier. If the parent is changed to the jenkins-test-harness things like the plugin-compat-test would be able to check it against other versions of Jenkins fairly easily. If anyone knows a good way around the above error or have a suggestion, please let me know. All comments are welcome.

          So after not working on this to eventually come back, I essentially discovered the same thing I ran into before, just now it's much more accurate. There was a subtle change in the htmlunit abilities which led to the input

          INFO: TESTING repeatable:INPUT.repeatable-delete @0 on 1 elements
          Nov 22, 2016 5:38:23 AM com.gargoylesoftware.htmlunit.WebConsole$DefaultLogger info
          INFO: @http://localhost:38685/jenkins/adjuncts/15a08f22/lib/form/repeatable/repeatable.js:131
          @http://localhost:38685/jenkins/static/15a08f22/scripts/behavior.js:116
          @http://localhost:38685/jenkins/static/15a08f22/scripts/behavior.js:107
          @http://localhost:38685/jenkins/static/15a08f22/scripts/behavior.js:93
          @http://localhost:38685/jenkins/adjuncts/15a08f22/lib/form/hetero-list/hetero-list.js:107
          @http://localhost:38685/jenkins/static/15a08f22/scripts/hudson-behavior.js:558
          next()@http://localhost:38685/jenkins/static/15a08f22/scripts/hudson-behavior.js:597
          sequencer()@http://localhost:38685/jenkins/static/15a08f22/scripts/hudson-behavior.js:600
          evalInnerHtmlScripts()@http://localhost:38685/jenkins/static/15a08f22/scripts/hudson-behavior.js:585
          @http://localhost:38685/jenkins/static/15a08f22/scripts/hudson-behavior.js:556
          @http://localhost:38685/jenkins/adjuncts/15a08f22/org/kohsuke/stapler/bind.js:57
          @http://localhost:38685/jenkins/static/15a08f22/scripts/prototype.js:1655
          @http://localhost:38685/jenkins/static/15a08f22/scripts/prototype.js:1600
          @http://localhost:38685/jenkins/static/15a08f22/scripts/prototype.js:414
          

          I spent some time trying to determine if this is a jQuery thing since the physical act of issuing "on" falls in that section. However, really, the exact code that's failing the entire page render is for hover actions. Which is incredibly useless from the perspective of this situation. I'm currently investigating catching the failing script, and just continuing the render without setting the "hover" options.

          Kristin Whetstone added a comment - So after not working on this to eventually come back, I essentially discovered the same thing I ran into before, just now it's much more accurate. There was a subtle change in the htmlunit abilities which led to the input INFO: TESTING repeatable:INPUT.repeatable-delete @0 on 1 elements Nov 22, 2016 5:38:23 AM com.gargoylesoftware.htmlunit.WebConsole$DefaultLogger info INFO: @http: //localhost:38685/jenkins/adjuncts/15a08f22/lib/form/repeatable/repeatable.js:131 @http: //localhost:38685/jenkins/ static /15a08f22/scripts/behavior.js:116 @http: //localhost:38685/jenkins/ static /15a08f22/scripts/behavior.js:107 @http: //localhost:38685/jenkins/ static /15a08f22/scripts/behavior.js:93 @http: //localhost:38685/jenkins/adjuncts/15a08f22/lib/form/hetero-list/hetero-list.js:107 @http: //localhost:38685/jenkins/ static /15a08f22/scripts/hudson-behavior.js:558 next()@http: //localhost:38685/jenkins/ static /15a08f22/scripts/hudson-behavior.js:597 sequencer()@http: //localhost:38685/jenkins/ static /15a08f22/scripts/hudson-behavior.js:600 evalInnerHtmlScripts()@http: //localhost:38685/jenkins/ static /15a08f22/scripts/hudson-behavior.js:585 @http: //localhost:38685/jenkins/ static /15a08f22/scripts/hudson-behavior.js:556 @http: //localhost:38685/jenkins/adjuncts/15a08f22/org/kohsuke/stapler/bind.js:57 @http: //localhost:38685/jenkins/ static /15a08f22/scripts/prototype.js:1655 @http: //localhost:38685/jenkins/ static /15a08f22/scripts/prototype.js:1600 @http: //localhost:38685/jenkins/ static /15a08f22/scripts/prototype.js:414 I spent some time trying to determine if this is a jQuery thing since the physical act of issuing "on" falls in that section. However, really, the exact code that's failing the entire page render is for hover actions. Which is incredibly useless from the perspective of this situation. I'm currently investigating catching the failing script, and just continuing the render without setting the "hover" options.

          Daniel Beck added a comment -

          Unrelated to matrix-auth.

          Daniel Beck added a comment - Unrelated to matrix-auth.

            amuniz Antonio Muñiz
            kwhetstone Kristin Whetstone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: