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

File parameters are not retained across Jenkins restarts

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None

      Steps to reproduce

      1. Create a freestyle job
      2. Configure it to have a file parameter
      3. Go to /job/…/build?delay=100sec (add to delay), specify a file and click Build Now
      4. Wait a few seconds to persist the queue (just in case)
      5. Restart Jenkins
      6. Wait until the build is started

      Expected results

      The build starts and successfully picks up the file parameter, behaving as if there was no restart while the build was queued

      Actual results

      The build fails with:

      Running as SYSTEM
      Building in workspace /var/jenkins_home/workspace/fs
      FATAL: Cannot invoke "org.apache.commons.fileupload.FileItem.getName()" because "this.this$0.file" is null
      java.lang.NullPointerException: Cannot invoke "org.apache.commons.fileupload.FileItem.getName()" because "this.this$0.file" is null
      	at hudson.model.FileParameterValue$1.setUp(FileParameterValue.java:159)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:158)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
      	at hudson.model.Run.execute(Run.java:1894)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
      	at hudson.model.ResourceController.execute(ResourceController.java:101)
      	at hudson.model.Executor.run(Executor.java:442)
      Finished: FAILURE 

      Notes

      May be a regression in 1.494 due to https://github.com/jenkinsci/jenkins/commit/4dde24e62037439b7b73addd7cefae83a254eb3c according to https://github.com/jenkinsci/jenkins/pull/9260#issue-2290484228

          [JENKINS-73161] File parameters are not retained across Jenkins restarts

          Jesse Glick added a comment -

          Jesse Glick added a comment - Compare https://github.com/jenkinsci/file-parameters-plugin/pull/190

            Unassigned Unassigned
            danielbeck Daniel Beck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: