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

no known implementation of interface jenkins.tasks.SimpleBuildStep is named MSTestPublisher

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: mstest-plugin
    • Environment:
    • Similar Issues:

      Description

      I have a job that produces *.trx test reports which has been picked for reporting by running the following step:  

       

      step([$class: 'MSTestPublisher', testResultsFile:"**/*.trx", failOnError: true, keepLongStdio: true])
      

       

      After upgrading the plugins in environment description the following error occurs when running the step using latest pipeline API as of 2019-02-15. This worked well before the plugin update which makes me think that the plugin is outdated in terms of the pipeline API. 

      java.lang.UnsupportedOperationException: no known implementation of interface jenkins.tasks.SimpleBuildStep is named MSTestPublisher at org.jenkinsci.plugins.structs.describable.DescribableModel.resolveClass(DescribableModel.java:478) at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:402) at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:341) at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:282) at org.jenkinsci.plugins.workflow.steps.StepDescriptor.newInstance(StepDescriptor.java:202) at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:262) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) at sun.reflect.GeneratedMethodAccessor899.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:155) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)Caused: java.lang.IllegalArgumentException: Could not instantiate {delegate={$class=MSTestPublisher, testResultsFile=**/*.trx, failOnError=true, keepLongStdio=true}} for 
      

       

      I intend to have a look at what i can fix in the plugin and provide a pull-request when able. But until then, perhaps you find people have an idea on what needs to be done. 

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Not sure, the code is okay. There was no changes for almost 2 years there: https://github.com/jenkinsci/mstest-plugin/blob/master/src/main/java/hudson/plugins/mstest/MSTestPublisher.java#L36 .

          Mikael Östberg maybe you could try a full class patch. 

           

          Also CC Andrew Bayer Devin Nusbaum just in case this is a pipeline regression

          Show
          oleg_nenashev Oleg Nenashev added a comment - Not sure, the code is okay. There was no changes for almost 2 years there: https://github.com/jenkinsci/mstest-plugin/blob/master/src/main/java/hudson/plugins/mstest/MSTestPublisher.java#L36  . Mikael Östberg maybe you could try a full class patch.    Also CC Andrew Bayer Devin Nusbaum just in case this is a pipeline regression
          Hide
          dnusbaum Devin Nusbaum added a comment -

          Maybe related to a change in the structs plugin? Mikael Östberg What version of structs were you running before the upgrade? I am not aware of any changes offhand that might have broken this, but here is the changelog for that plugin.

          Show
          dnusbaum Devin Nusbaum added a comment - Maybe related to a change in the structs plugin? Mikael Östberg What version of structs were you running before the upgrade? I am not aware of any changes offhand that might have broken this, but here is the changelog for that plugin.
          Hide
          kitain Mikael Östberg added a comment -

          I'll try to awaken an old snapshot of the instance and figure out the previous plugin versions. Unless there is an easier way to see previous versions somehow, then feel free to let me know.

          Show
          kitain Mikael Östberg added a comment - I'll try to awaken an old snapshot of the instance and figure out the previous plugin versions. Unless there is an easier way to see previous versions somehow, then feel free to let me know.

            People

            • Assignee:
              nilleb Ivo Bellin Salarin
              Reporter:
              kitain Mikael Östberg
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: