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

Upgrade LTS 2.387.1-JDK11 to LTS 2.440.2-JDK17 - error on CasC 'assignments' is deprecated

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • core
    • Trying to upgrade current LTS 2.387.1-JDK11 to LTS 2.440.2-JDK17 on AWS EC2

      Hi, I am trying to upgrade my current Jenkins from current LTS 2.387.1-JDK11 to LTS 2.440.2-JDK17
      The following error shown when I did the token reload

      1. curl  -f -X POST http://localhost:8080/reload-configuration-as-code/?casc-reload-token="jenkins123"
        curl: (22) The requested URL returned error: 500

      and here is the docker log:

      2024-04-05 23:55:06.183+0000 [id=40]    WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID b7ff88ce-9d41-403f-a8b8-c8fc0369e55c
      io.jenkins.plugins.casc.ConfiguratorException: 'assignments' is deprecated
              at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:330)
              at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:283)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.configure(DataBoundConfigurator.java:81)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.tryConstructor(DataBoundConfigurator.java:156)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.instance(DataBoundConfigurator.java:75)
              at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:274)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.configure(DataBoundConfigurator.java:81)
              at org.jenkinsci.plugins.rolestrategy.casc.RoleBasedAuthorizationStrategyConfigurator.instance(RoleBasedAuthorizationStrategyConfigurator.java:64)
              at org.jenkinsci.plugins.rolestrategy.casc.RoleBasedAuthorizationStrategyConfigurator.instance(RoleBasedAuthorizationStrategyConfigurator.java:40)
              at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:274)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$doConfigure$16668e2$1(HeteroDescribableConfigurator.java:311)
              at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:247)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.doConfigure(HeteroDescribableConfigurator.java:311)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$2(HeteroDescribableConfigurator.java:88)
              at io.vavr.control.Option.map(Option.java:392)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$3(HeteroDescribableConfigurator.java:88)
              at io.vavr.Tuple2.apply(Tuple2.java:238)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:86)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:94)
              at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:57)
              at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:360)
              at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:293)
              at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$9(ConfigurationAsCode.java:830)
              at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:773)
              at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:830)
              at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:816)
              at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:695)
              at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:352)
              at io.jenkins.plugins.casc.TokenReloadAction.doIndex(TokenReloadAction.java:60)
              at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source)
              at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
              at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:409)
              at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:78)
              at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
              at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:207)
              at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:140)
              at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:28)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:770)
      Caused: javax.servlet.ServletException
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:818)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:900)

       here is the snippet of my yaml file, and I don't have the "assignments" in "authorizationStrategy" tho..

      jenkins:
        log:
          recorders:
          - loggers:
            - level: "FINE"
              name: "org.jenkinsci.plugins.workflow.job.WorkflowRun"
            name: "workflowRun"
        agentProtocols:
        - "JNLP4-connect"
        - "Ping"
        authorizationStrategy: "loggedInUsersCanDoAnything"
        crumbIssuer:
          standard:
            excludeClientIPFromCrumb: false

      Do I miss anything?
      thanks,

            Unassigned Unassigned
            jordarlu Jeff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: