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

When triggering a new build from current build page, 'Next Build' isn't shown after reloading page

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • 1.532.1-rc1, 1.540, 1.533, 1.500

      1. Create a freestyle project 'foo' with a shell build step that executes sleep 30 and save.
      2. Click 'Build Now'
      3. Go to the build's page (/job/foo/1) and wait until the build finishes.
      4. From the breadcrumb bar, select 'Build Now' from the 'foo' job's context menu.
      5. Wait a second (so the build is actually started), then reload.

      Expected result: 'Next Build' link is shown
      Actual result: It's not

      If you open the job's main page at /job/foo e.g. in another tab, then reload the build page again, the 'Next Build' link appears after reloading.

          [JENKINS-20662] When triggering a new build from current build page, 'Next Build' isn't shown after reloading page

          Daniel Beck created issue -
          Daniel Beck made changes -
          Environment Original: 1.532.1-rc1, 1.540 New: 1.532.1-rc1, 1.540, 1.533, 1.500

          In the lastest code for jenkins i am not seeing that problem. Do you have auto enable on? Previous and next build appear. using 1.54. followed your exact instruction which were good.

          first one even works for me.

          martin naughton added a comment - In the lastest code for jenkins i am not seeing that problem. Do you have auto enable on? Previous and next build appear. using 1.54. followed your exact instruction which were good. first one even works for me.

          any update?

          martin naughton added a comment - any update?

          Daniel Beck added a comment - - edited

          Reproduced every time on newly created Jenkins instances with empty Jenkins home. Just now verified in 1.544.

          Auto enable is disabled (which is the default anyway I believe). It takes until the build is finished, or the /job/foo page is reloaded, for the build to show up as 'Next Build' on the previously completed build's page.

          Daniel Beck added a comment - - edited Reproduced every time on newly created Jenkins instances with empty Jenkins home. Just now verified in 1.544. Auto enable is disabled (which is the default anyway I believe). It takes until the build is finished, or the /job/foo page is reloaded, for the build to show up as 'Next Build' on the previously completed build's page.

          Daniel Beck added a comment -

          Weirdly enough, an existing instance (RHEL Linux, OpenJDK 1.6, Jenkins installed as service) is not affected by this. So far, all systems I reproduced this with seem to have been OS X 10.8.6 with Oracle Java 1.7, Jenkins launched from the command line using java -jar jenkins.war.

          Daniel Beck added a comment - Weirdly enough, an existing instance (RHEL Linux, OpenJDK 1.6, Jenkins installed as service) is not affected by this. So far, all systems I reproduced this with seem to have been OS X 10.8.6 with Oracle Java 1.7, Jenkins launched from the command line using java -jar jenkins.war .

          martin naughton added a comment - - edited

          Works for me when auto refresh is enabled.

          So it also work for you on RHEL Linux, OpenJDK 1.6, Jenkins installed as service even when you have auto refresh is disabled. Could it be your browser? I am using firefox nghtly which is the latest build of firefox.

          martin naughton added a comment - - edited Works for me when auto refresh is enabled. So it also work for you on RHEL Linux, OpenJDK 1.6, Jenkins installed as service even when you have auto refresh is disabled. Could it be your browser? I am using firefox nghtly which is the latest build of firefox.

          Daniel Beck added a comment - - edited
          • I used the same web browser Firefox 26 on OS X for both the affected instance (localhost test instance, OS X 10.8, Oracle Java 7) and the instance that isn't affected (RHEL 6 server, OpenJDK 6). No suspicious headers (e.g. Cache-Control) are sent after reloading the page in step 5 AFAICT.
          • New: I set up a new, manually launched (java -jar jenkins.war) instance of 1.544 on the RHEL 6 server with OpenJDK 6. Accessed it using the same browser and client system, and the issue was successfully reproduced. So it's neither the JVM nor the host OS!

          I assume that you're doing something differently when trying to reproduce the issue. The steps to reproduce I provide usually assume you're on a pristine install with no customized preferences. As I have no idea about the cause, any customization on your side could cause reproducing this to fail on your install.

          1. Use a new Jenkins instance without additional plugins and customized configuration. I reproduced it every time on pristine instances with no additional plugins and no configuration changes.
          2. Disable auto-refresh (which isn't enabled by default anyway, hence a preference change not outlined in the issue!). The reload in step 5 is just pressing Ctrl-R/F5/Cmd-R.
          3. Don't have multiple browser tabs open (especially none with auto-refresh!) and don't use an instance with other users accessing it.

          Daniel Beck added a comment - - edited I used the same web browser Firefox 26 on OS X for both the affected instance ( localhost test instance, OS X 10.8, Oracle Java 7) and the instance that isn't affected (RHEL 6 server, OpenJDK 6). No suspicious headers (e.g. Cache-Control) are sent after reloading the page in step 5 AFAICT. New: I set up a new, manually launched ( java -jar jenkins.war ) instance of 1.544 on the RHEL 6 server with OpenJDK 6. Accessed it using the same browser and client system, and the issue was successfully reproduced. So it's neither the JVM nor the host OS! I assume that you're doing something differently when trying to reproduce the issue. The steps to reproduce I provide usually assume you're on a pristine install with no customized preferences. As I have no idea about the cause, any customization on your side could cause reproducing this to fail on your install. Use a new Jenkins instance without additional plugins and customized configuration. I reproduced it every time on pristine instances with no additional plugins and no configuration changes. Disable auto-refresh (which isn't enabled by default anyway, hence a preference change not outlined in the issue!). The reload in step 5 is just pressing Ctrl-R/F5/Cmd-R. Don't have multiple browser tabs open ( especially none with auto-refresh!) and don't use an instance with other users accessing it.

          Daniel Beck added a comment -

          This seems to be a bug in core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java's getNextBuild():

          The first call to that method (step 3) sets nextBuildR to none().

          Subsequent calls (step 5) check for null (false), then check for none() (true), and then return null.

          Daniel Beck added a comment - This seems to be a bug in core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java 's getNextBuild() : The first call to that method (step 3) sets nextBuildR to none() . Subsequent calls (step 5) check for null ( false ), then check for none() ( true ), and then return null .
          Daniel Beck made changes -
          Link New: This issue is related to JENKINS-22052 [ JENKINS-22052 ]

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

              Created:
              Updated:
              Resolved: