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

Role based stratedy can't be showed in Config as Code - java null ptr exeption

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Environment:
    • Similar Issues:

      Description

      I want to try out config as code plugin.
      I went to Manage Jenkins -> Configuration as Code and then I clicked "View configuration"

      This is yaml output:

        authorizationStrategy:
          roleBased:
            roles:
              global: |-
                FAILED TO EXPORT
                org.jenkinsci.plugins.rolestrategy.casc.GrantedRoles#global: java.lang.NullPointerException
                  at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
                  at java.util.regex.Matcher.reset(Matcher.java:309)
                  at java.util.regex.Matcher.<init>(Matcher.java:229)
                  at java.util.regex.Pattern.matcher(Pattern.java:1093)
                  at org.jenkinsci.plugins.rolestrategy.casc.PermissionFinder.findPermissionId(PermissionFinder.java:42)
                  at org.jenkinsci.plugins.rolestrategy.casc.RoleDefinition.getRole(RoleDefinition.java:48)
                  at org.jenkinsci.plugins.rolestrategy.casc.RoleDefinition.<init>(RoleDefinition.java:41)
                Caused: java.lang.reflect.InvocationTargetException
                  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
                  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
                  at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:309)
                  at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:329)
                  at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:258)
                  at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:317)
                  at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:329)
                  at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:265)
                  at io.jenkins.plugins.casc.BaseConfigurator.compare(BaseConfigurator.java:392)
                  at org.jenkinsci.plugins.rolestrategy.casc.RoleBasedAuthorizationStrategyConfigurator.describe(RoleBasedAuthorizationStrategyConfigurator.java:92)
                  at org.jenkinsci.plugins.rolestrategy.casc.RoleBasedAuthorizationStrategyConfigurator.describe(RoleBasedAuthorizationStrategyConfigurator.java:32)
                  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$convertToNode$de0cd4f8$1(HeteroDescribableConfigurator.java:282)
                  at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:247)
                  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.convertToNode(HeteroDescribableConfigurator.java:282)
                  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$describe$5(HeteroDescribableConfigurator.java:107)
                  at io.vavr.control.Option.map(Option.java:392)
                  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:107)
                  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:55)
                  at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:329)
                  at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:265)
                  at io.jenkins.plugins.casc.Configurator.describe(Configurator.java:181)
      

        Attachments

          Activity

          Hide
          thunderhead RAT thx added a comment -

          I am seeing the same issue.  Would be nice if we could get a temporary workaround. Oleg Nenashev

          Show
          thunderhead RAT thx added a comment - I am seeing the same issue.  Would be nice if we could get a temporary workaround. Oleg Nenashev

            People

            • Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              dumam Bartosz Nowak
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: