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

"Incompatible element" with Strict Crumb Issuer and JCasC

XMLWordPrintable

      Hi, using the Jenkins Docker image (jenkins/jenkins:2.235.2), tried with configuration-as-code:1.41 or 1.42, and strict-crumb-issuer:2.1.0.

      If I add the following to my CasC YAML:

      jenkins:
        crumbIssuer:
          strict:
            checkSessionMatch: false
            hoursValid: 1
      

      and start up Jenkins, I get

      io.jenkins.plugins.casc.ConfiguratorException: Found incompatible configuration elements YamlSource: /etc/jenkins_casc/shared.yml  in /etc/jenkins_casc/shared.yml, line 12, column 5:
              strict:
              ^
           at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:102)
           at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:125)
           at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:125)
           at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:52)
      Caused: io.jenkins.plugins.casc.ConfiguratorException: Failed to read YamlSource: /etc/jenkins_casc/shared.yml
           at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:56)
           at io.jenkins.plugins.casc.yaml.YamlUtils.loadFrom(YamlUtils.java:150)
           at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:616)
           at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:298)
           at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:290)
      Caused: java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
      Caused: java.lang.Error
           at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
           at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
           at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
           at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
           at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
           at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
           at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
           at java.lang.Thread.run(Thread.java:748)

      When I start Jenkins up without that snippet, I can configure the plugin manually

      and view the CasC config, which is showing me I'm adding the snippet to my YAML correctly:

      Am aware of this previous issue - https://issues.jenkins-ci.org/browse/JENKINS-60523 - as well as this - https://github.com/jenkinsci/configuration-as-code-plugin/issues/1191 - which suggests everything should be working with these plugin versions, but unfortunately...

      (First time. Really hope I haven't been stupid anywhere. )

        1. image-2020-08-03-12-53-11-598.png
          23 kB
          Nathan Costello
        2. image-2020-08-03-12-53-48-746.png
          16 kB
          Nathan Costello

            wfollonier Wadeck Follonier
            ncostello Nathan Costello
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: