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

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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • mstest-plugin

      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. 

          [JENKINS-56160] no known implementation of interface jenkins.tasks.SimpleBuildStep is named MSTestPublisher

          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 .

          kitain maybe you could try a full class patch. 

           

          Also CC abayer dnusbaum just in case this is a pipeline regression

          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  . kitain maybe you could try a full class patch.    Also CC abayer dnusbaum just in case this is a pipeline regression

          Devin Nusbaum added a comment -

          Maybe related to a change in the structs plugin? kitain 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.

          Devin Nusbaum added a comment - Maybe related to a change in the structs plugin? kitain 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.

          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.

          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.

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

              Created:
              Updated: