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

folder-auth-plugin causes ConfigurationAsCode.init to fail after LTS 2.303.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: core
    • Environment:
      Jenkins: 2.303.1
      folder-auth: 1.3
      configuration-as-code: 1.52
    • Similar Issues:
    • Released As:
      2.313

      Description

      After upgrading to LTS 2.303.1, Jenkins fails to start at ConfigurationAsCode.init.

      Log excerpt:

      2021-08-27 11:36:49.205+0000 [id=30]	SEVERE	jenkins.InitReactorRunner$1#onTaskFailed: Failed ConfigurationAsCode.init
      java.lang.IllegalArgumentException: Unable to infer permission from the given Id: View/Configure
      	at io.jenkins.plugins.folderauth.misc.PermissionWrapper.checkPermission(PermissionWrapper.java:100)
      	at io.jenkins.plugins.folderauth.misc.PermissionWrapper.<init>(PermissionWrapper.java:49)
      Caused: java.lang.reflect.InvocationTargetException
      	at jdk.internal.reflect.GeneratedConstructorAccessor27.newInstance(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
      	at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.tryConstructor(DataBoundConfigurator.java:173)
      Caused: io.jenkins.plugins.casc.ConfiguratorException: permissionWrapper: Failed to construct instance of class io.jenkins.plugins.folderauth.misc.PermissionWrapper.
      ...

      (See attached file for full startup log)

       

      Further information about my environment:
      I have a docker image pulling latest (jenkins/jenkins:lts-jdk11) and that installs a couple of plugins (including configuration-as-code and folder-auth). I noticed my configuration as code config file stopped working after the release of 2.303.1.

      I've tested downgrading my image to the previous LTS image (jenkins/jenkins:2.289.3-jdk11) and all errors disappear, making me believe the issue is caused by an incompatibility between the two plugins and the 2.303.1 LTS release.

      Removing my entire 'folderBased:' section from my JCasC yaml file also circumvents the errors on LTS 2.303.1.

       

       

       

        Attachments

          Issue Links

            Activity

            Hide
            edfa Malin added a comment -

            I did some testing and created a repo with a "minimal" install where I get a solid repo of this issue. Maybe it will help: https://github.com/vonEdfa/test-jenkins-66470

            Show
            edfa Malin added a comment - I did some testing and created a repo with a "minimal" install where I get a solid repo of this issue. Maybe it will help: https://github.com/vonEdfa/test-jenkins-66470
            Hide
            abhyudaya Abhyudaya Sharma added a comment -

            Thanks Malin! I can see the error now. On attaching a remote debugger, I can see that the `View` PermissionGroup is not loaded.

            However, during the tests, the `View` PermissionGroup is present.

            Show
            abhyudaya Abhyudaya Sharma added a comment - Thanks Malin ! I can see the error now. On attaching a remote debugger, I can see that the `View` PermissionGroup is not loaded. However, during the tests, the `View` PermissionGroup is present.
            Hide
            edfa Malin added a comment -

            Any idea what might cause this behavior?

            Show
            edfa Malin added a comment - Any idea what might cause this behavior?
            Hide
            abhyudaya Abhyudaya Sharma added a comment -
            Show
            abhyudaya Abhyudaya Sharma added a comment - Malin this issue is being discussed here:  https://github.com/jenkinsci/configuration-as-code-plugin/issues/1638  
            Hide
            timja Tim Jacomb added a comment -

            This has been fixed on master and is being backported to 2.303.2 as well

            Show
            timja Tim Jacomb added a comment - This has been fixed on master and is being backported to 2.303.2 as well

              People

              Assignee:
              basil Basil Crow
              Reporter:
              edfa Malin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: