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

Invalid parameter "removeLastBuild", did you mean "numToKeepStr"?

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major Major
    • pipeline
    • None

      LogRotator.setRemoveLastBuild(boolean) method is annotated with DataBoundSetter, but it can't be set from a pipeline (neither declarative, nor scripted):

      options {
             buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
      }
      WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
         Str: '2', daysToKeepStr: '7', removeLast 

      This makes multibranch pipelines unusable, as builds for stale branches are never discarded.

      Discovered in JENKINS-36364

      Environment

      Jenkins 4.462

      Pipeline: Multibranch Version 795.ve0cb_1f45ca_9a_

      GitLab Branch Source Version 704.vc7f1202d7e14

          [JENKINS-73864] Invalid parameter "removeLastBuild", did you mean "numToKeepStr"?

          Vasili Gulevich created issue -
          Vasili Gulevich made changes -
          Link New: This issue blocks JENKINS-36364 [ JENKINS-36364 ]
          Vasili Gulevich made changes -
          Description Original: [LogRotator.setRemoveLastBuild(boolean)|https://github.com/jenkinsci/jenkins/blob/77c3d7ac843d3d5756eca3139a65f450a38b7a48/core/src/main/java/hudson/tasks/LogRotator.java#L150] method has DataBoundSetter annotation, but it can't be set from a pipeline (neither declarative, nor scripted):
          {code:java}
          options {
                 buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7'))
                 disableConcurrentBuilds()
          }{code}
          {code:java}
          WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
             Str: '2', daysToKeepStr: '7', removeLast {code}
          Discovered in JENKINS-36364
          New: [LogRotator.setRemoveLastBuild(boolean)|https://github.com/jenkinsci/jenkins/blob/77c3d7ac843d3d5756eca3139a65f450a38b7a48/core/src/main/java/hudson/tasks/LogRotator.java#L150] method has DataBoundSetter annotation, but it can't be set from a pipeline (neither declarative, nor scripted):
          {code:java}
          options {
                 buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
                 disableConcurrentBuilds()
          }{code}
          {code:java}
          WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
             Str: '2', daysToKeepStr: '7', removeLast {code}
          Discovered in JENKINS-36364

          This makes multibranch pipelines unusable, as builds for old branches are never discarded.
          Vasili Gulevich made changes -
          Description Original: [LogRotator.setRemoveLastBuild(boolean)|https://github.com/jenkinsci/jenkins/blob/77c3d7ac843d3d5756eca3139a65f450a38b7a48/core/src/main/java/hudson/tasks/LogRotator.java#L150] method has DataBoundSetter annotation, but it can't be set from a pipeline (neither declarative, nor scripted):
          {code:java}
          options {
                 buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
                 disableConcurrentBuilds()
          }{code}
          {code:java}
          WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
             Str: '2', daysToKeepStr: '7', removeLast {code}
          Discovered in JENKINS-36364

          This makes multibranch pipelines unusable, as builds for old branches are never discarded.
          New: [LogRotator.setRemoveLastBuild(boolean)|https://github.com/jenkinsci/jenkins/blob/77c3d7ac843d3d5756eca3139a65f450a38b7a48/core/src/main/java/hudson/tasks/LogRotator.java#L150] method has DataBoundSetter annotation, but it can't be set from a pipeline (neither declarative, nor scripted):
          {code:java}
          options {
                 buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
                 disableConcurrentBuilds()
          }{code}
          {code:java}
          WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
             Str: '2', daysToKeepStr: '7', removeLast {code}
          Discovered in JENKINS-36364

          This makes multibranch pipelines unusable, as builds for stale branches are never discarded.
          Vasili Gulevich made changes -
          Description Original: [LogRotator.setRemoveLastBuild(boolean)|https://github.com/jenkinsci/jenkins/blob/77c3d7ac843d3d5756eca3139a65f450a38b7a48/core/src/main/java/hudson/tasks/LogRotator.java#L150] method has DataBoundSetter annotation, but it can't be set from a pipeline (neither declarative, nor scripted):
          {code:java}
          options {
                 buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
                 disableConcurrentBuilds()
          }{code}
          {code:java}
          WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
             Str: '2', daysToKeepStr: '7', removeLast {code}
          Discovered in JENKINS-36364

          This makes multibranch pipelines unusable, as builds for stale branches are never discarded.
          New: [LogRotator.setRemoveLastBuild(boolean)|https://github.com/jenkinsci/jenkins/blob/77c3d7ac843d3d5756eca3139a65f450a38b7a48/core/src/main/java/hudson/tasks/LogRotator.java#L150] method has DataBoundSetter annotation, but it can't be set from a pipeline (neither declarative, nor scripted):
          {code:java}
          options {
                 buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
                 disableConcurrentBuilds()
          }{code}
          {code:java}
          WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
             Str: '2', daysToKeepStr: '7', removeLast {code}
          This makes multibranch pipelines unusable, as builds for stale branches are never discarded.

          Discovered in JENKINS-36364
          Vasili Gulevich made changes -
          Description Original: [LogRotator.setRemoveLastBuild(boolean)|https://github.com/jenkinsci/jenkins/blob/77c3d7ac843d3d5756eca3139a65f450a38b7a48/core/src/main/java/hudson/tasks/LogRotator.java#L150] method has DataBoundSetter annotation, but it can't be set from a pipeline (neither declarative, nor scripted):
          {code:java}
          options {
                 buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
                 disableConcurrentBuilds()
          }{code}
          {code:java}
          WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
             Str: '2', daysToKeepStr: '7', removeLast {code}
          This makes multibranch pipelines unusable, as builds for stale branches are never discarded.

          Discovered in JENKINS-36364
          New: [LogRotator.setRemoveLastBuild(boolean)|https://github.com/jenkinsci/jenkins/blob/77c3d7ac843d3d5756eca3139a65f450a38b7a48/core/src/main/java/hudson/tasks/LogRotator.java#L150] method has DataBoundSetter annotation, but it can't be set from a pipeline (neither declarative, nor scripted):
          {code:java}
          options {
                 buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
          }{code}
          {code:java}
          WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
             Str: '2', daysToKeepStr: '7', removeLast {code}
          This makes multibranch pipelines unusable, as builds for stale branches are never discarded.

          Discovered in JENKINS-36364
          Vasili Gulevich made changes -
          Description Original: [LogRotator.setRemoveLastBuild(boolean)|https://github.com/jenkinsci/jenkins/blob/77c3d7ac843d3d5756eca3139a65f450a38b7a48/core/src/main/java/hudson/tasks/LogRotator.java#L150] method has DataBoundSetter annotation, but it can't be set from a pipeline (neither declarative, nor scripted):
          {code:java}
          options {
                 buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
          }{code}
          {code:java}
          WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
             Str: '2', daysToKeepStr: '7', removeLast {code}
          This makes multibranch pipelines unusable, as builds for stale branches are never discarded.

          Discovered in JENKINS-36364
          New: [LogRotator.setRemoveLastBuild(boolean)|https://github.com/jenkinsci/jenkins/blob/77c3d7ac843d3d5756eca3139a65f450a38b7a48/core/src/main/java/hudson/tasks/LogRotator.java#L150] method is annotated with DataBoundSetter, but it can't be set from a pipeline (neither declarative, nor scripted):
          {code:java}
          options {
                 buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
          }{code}
          {code:java}
          WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
             Str: '2', daysToKeepStr: '7', removeLast {code}
          This makes multibranch pipelines unusable, as builds for stale branches are never discarded.

          Discovered in JENKINS-36364
          Vasili Gulevich made changes -
          Link New: This issue is caused by JENKINS-68822 [ JENKINS-68822 ]
          Vasili Gulevich made changes -
          Link New: This issue is caused by JENKINS-2417 [ JENKINS-2417 ]
          Vasili Gulevich made changes -
          Description Original: [LogRotator.setRemoveLastBuild(boolean)|https://github.com/jenkinsci/jenkins/blob/77c3d7ac843d3d5756eca3139a65f450a38b7a48/core/src/main/java/hudson/tasks/LogRotator.java#L150] method is annotated with DataBoundSetter, but it can't be set from a pipeline (neither declarative, nor scripted):
          {code:java}
          options {
                 buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
          }{code}
          {code:java}
          WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
             Str: '2', daysToKeepStr: '7', removeLast {code}
          This makes multibranch pipelines unusable, as builds for stale branches are never discarded.

          Discovered in JENKINS-36364
          New: [LogRotator.setRemoveLastBuild(boolean)|https://github.com/jenkinsci/jenkins/blob/77c3d7ac843d3d5756eca3139a65f450a38b7a48/core/src/main/java/hudson/tasks/LogRotator.java#L150] method is annotated with DataBoundSetter, but it can't be set from a pipeline (neither declarative, nor scripted):
          {code:java}
          options {
                 buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
          }{code}
          {code:java}
          WorkflowScript: 30: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"? @ line 30, column 73.
             Str: '2', daysToKeepStr: '7', removeLast {code}
          This makes multibranch pipelines unusable, as builds for stale branches are never discarded.

          Discovered in JENKINS-36364
          h1. Environment

          Jenkins 4.462

          [Pipeline: Multibranch Version 795.ve0cb_1f45ca_9a_ |https://plugins.jenkins.io/workflow-multibranch]

          [GitLab Branch Source Version 704.vc7f1202d7e14 |https://plugins.jenkins.io/gitlab-branch-source]
          Vasili Gulevich made changes -
          Summary Original: LogRotator.removeLastBuild can't be set New: Invalid parameter "removeLastBuild", did you mean "numToKeepStr"?

            Unassigned Unassigned
            basilevs Vasili Gulevich
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: