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

      I just upgraded from Jenkins 2.462 to 2.471. Now I am observing issues with loading the "Builds" section when opening a job in a new tab or scheduling/configuring a new build in a new tab, as the corresponding box will show "No builds". I am using Firefox 115.6.0esr in this case.

      Reproducing this is not completely reliable. Some jobs seem to work fine, most of the jobs work fine after having it opened the first time.

      Debugging is hard as opening a new tab will usually not work with the development tools of the web browser. The only thing I could discover is that in these cases the Apache web server (which proxies the actual Jenkins server) does not have the corresponding 

      buildHistory/ajax

       entry for the job.

          [JENKINS-73592] buildHistory widget not refreshing reliably

          Markus Winter added a comment - - edited

          When opening the page in a new tab (ctrl+click), the document is initially hidden. The code in javascript exits early when the document is hidden to avoid fetching the build history unnecessarily. But this also prevents that the timeout is set to refresh the widget.

          So another effect is that when the page loses focus, e.g. by bringing another tab in the foreground, then once the tab is put into foreground again the buildHistory widget no longer refreshes itself.

          This can be easily reproduced:

          1. create a job without parameters and save it
          2. run the job once by clicking on "Build Now" (the widget should refresh)
          3. switch to another tab and wait minimum 5 seconds
          4. switch back to job tab
          5. run the job once by clicking on "Build Now", the widget will not refresh.

          Markus Winter added a comment - - edited When opening the page in a new tab (ctrl+click), the document is initially hidden. The code in javascript exits early when the document is hidden to avoid fetching the build history unnecessarily. But this also prevents that the timeout is set to refresh the widget. So another effect is that when the page loses focus, e.g. by bringing another tab in the foreground, then once the tab is put into foreground again the buildHistory widget no longer refreshes itself. This can be easily reproduced: create a job without parameters and save it run the job once by clicking on "Build Now" (the widget should refresh) switch to another tab and wait minimum 5 seconds switch back to job tab run the job once by clicking on "Build Now", the widget will not refresh.

            mawinter69 Markus Winter
            stefan6419846 Stefan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: