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

vSphere cloud: Configuration-as-Code compatibility Export/Import fails

    Details

    • Similar Issues:

      Description

      Currently vSphere cloud plugin is not compatible due to retention strategy missing an extension marker and potential null pointer in their constructor

      [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.185 s <<< FAILURE! - in org.jenkinsci.plugins.vsphere.tools.ConfigurationAsCodeTest
      [ERROR] org.jenkinsci.plugins.vsphere.tools.ConfigurationAsCodeTest  Time elapsed: 1.182 s  <<< FAILURE!
      java.lang.AssertionError: Unexpected exception
              at io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule.before(JenkinsConfiguredWithCodeRule.java:37)
              at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:593)
              at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
              at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.IllegalArgumentException: No hudson.slaves.RetentionStrategy implementation found for runOnceCloud         at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$lookupDescriptor$11(HeteroDescribableConfigurator.java:212)
              at io.vavr.control.Option.orElse(Option.java:321)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lookupDescriptor(HeteroDescribableConfigurator.java:211)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$3(HeteroDescribableConfigurator.java:84)
              at io.vavr.Tuple2.apply(Tuple2.java:238)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:83)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:55)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.tryConstructor(DataBoundConfigurator.java:160)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.instance(DataBoundConfigurator.java:77)             at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:267)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.configure(DataBoundConfigurator.java:83)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.tryConstructor(DataBoundConfigurator.java:152)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.instance(DataBoundConfigurator.java:77)
              at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:267)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.configure(DataBoundConfigurator.java:83)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$doConfigure$16668e2$1(HeteroDescribableConfigurator.java:278)
              at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:247)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.doConfigure(HeteroDescribableConfigurator.java:278)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$null$2(HeteroDescribableConfigurator.java:86)
              at io.vavr.control.Option.map(Option.java:392)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$3(HeteroDescribableConfigurator.java:86)
              at io.vavr.Tuple2.apply(Tuple2.java:238)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:83)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:92)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:55)
              at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:344)
              at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:287)
              at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$7(ConfigurationAsCode.java:716)
              at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:666)
              at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:716)
              at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:701)
              at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:592)
              at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:562)
              at io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule.before(JenkinsConfiguredWithCodeRule.java:34)             ... 5 more
      

        Attachments

          Activity

          Hide
          bptacek Ben Ptacek added a comment -

          I am seeing this issue as well. Any solution to fix?

          Show
          bptacek Ben Ptacek added a comment - I am seeing this issue as well. Any solution to fix?
          Hide
          bptacek Ben Ptacek added a comment -

          The only workaround to not break Jenkins is to remove the retention strategy block. Unfortunately, it requires you to go in and change the values after JCasC deployment.

          Show
          bptacek Ben Ptacek added a comment - The only workaround to not break Jenkins is to remove the retention strategy block. Unfortunately, it requires you to go in and change the values after JCasC deployment.
          Hide
          pjdarton pjdarton added a comment - - edited

          It should be fixed in the next release.
          In the meantime, grab the as-yet-unreleased version from https://ci.jenkins.io/job/Plugins/job/vsphere-cloud-plugin/job/master/lastSuccessfulBuild/artifact/

          (and if that doesn't fix it, please do let me know)

          Show
          pjdarton pjdarton added a comment - - edited It should be fixed in the next release. In the meantime, grab the as-yet-unreleased version from https://ci.jenkins.io/job/Plugins/job/vsphere-cloud-plugin/job/master/lastSuccessfulBuild/artifact/ (and if that doesn't fix it, please do let me know)

            People

            • Assignee:
              Unassigned
              Reporter:
              casz Joseph Petersen
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: