There were two issues preventing the build history from updating properly:
1) The next build number being fetched wasn't taking into account running builds, so any builds already running when the page is refreshed would be ignored. The fix was to use nextBuildNumberToFetch if it is available (which is the case if there are running builds) and to fall back to the next build otherwise.
2) The first transient build key (used to clear out builds from the history that are being updated) wasn't being set when the page first loads. This was fixed by making getHistoryPageFilter calculate the value so that it happens in all cases rather than just during the ajax call.
* [JENKINS-10912] Use setInterval in refreshPart
The current implementation of refreshPart creates a new closure every 5
seconds, which, in combination with XMLHttpRequest objects, results in a
significant memory leak in all major browsers. By using
window.setInterval to schedule periodic refreshes, only one closure per
id is created. Please see issue #10912 in the Jenkins tracker for
further details.
* Stop periodical calls if we can't find the div
* Don't check if isRunAsTest changed after page load
* [FIXED JENKINS-37731] Change symbol and constructor for SCMTrigger.
Using "scm" as the @Symbol led to collisions with the "scm" global
variable in Pipeline, so that had to go. Changed it to "pollScm". Also
moved the @DataBoundConstructor to the single-parameter constructor,
deprecated the two-parameter constructor, created a @DataBoundSetter
for ignorePostCommitHooks, and added a getter for "scmpoll_spec" to
fix snippet generator and general syntactic goodness.
So now, with this, it's possible to do:
properties([
pipelineTriggers([
pollScm('@daily')
])
])
Tada.
Tests for the snippet generator and job property stuff will be landing
in a separate PR for workflow-multibranch.
* Review comments.
* Updating @since to 2.22
* Test Windows junctions before Java 7 symlink
Apparently Java 7 (and later) do not count Windows junctions as
symlinks. When you drill down into the BasicFileAttributes structure,
reparse points are only counted under isOther. So, since we already
have code that properly detects Windows Junctions, let's use that first
and then fallback to the Java 7 code.
* Add comment for change & link bug.
* Add test case
* Switch to Functions.isWindows().
* Use non-deprecated APIs for tmp file/dir mgmt
* Add better debugging.
* Allow spaces in junction name & dir name.
To do that, it was easier to use ProcessBuilder vs building up the correct
string in code to send to cmd.exe.
Also, I'll note that according to http://ss64.com/nt/syntax-internal.html,
mklink is in internal cmd.exe command. So, it must be invoked through
"cmd.exe /c" for it to work.
* Remove comment mentioning bug number.
* Remove debugging output, per Baptiste's request
* Add newline at end of file.
* Make sure that the junction was removed.
* Use assertEquals to show retcode of Process.waitFor.
* Fix compilation errors by importing functions
(cherry picked from commit f4edf91782)
* [JENKINS-36748] Add a test case and not process null specs
* [JENKINS-36748] Correct license and add a minor comment
* [JENKINS-36748] Add a Waning logger when spec is null
(cherry picked from commit 4278804582)
* [JENKINS-37332] - Improve diagnostics of non-closed streams during reading of the manifests in PluginManager
* [JENKINS-37332] - Leakless processing of JarUrlConnection during Manifest parsing
* [JENKINS-37332] - Also implement leak-safe method for retrieving file modification date
* [JENKINS-37332] - Add spotcheck methods for manifest file access + Javadoc
* [JENKINS-37332] - Also test multi-line and empty attributes in the test
(cherry picked from commit 96c97860b0)
* [JENKINS-37874] - Log SEVERE messages if Jenkins does not reach COMPLETED stage during startup or reload
* [JENKINS-37874] - Add Administrative monitor for the COMPLETED state
* [JENKINS-37874] - Polish log messages