mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 05:22:22 +00:00
dbb100da58a084fb0a6ce129d3f2b7ad827e87ee
Unlike [JENKINS-14514] this is a true fix rather than a workaround (now removed), and is more general. cjo9900 discovered that behaviors were being redundantly registered (as of 1.474 the monolithic JS is broken up); this caused some behaviors to be run repeatedly on the same elements, breaking reasonable expectations of some behaviors. The ideal fix would be to change Behavior.register to be idempotent: for example, key it by selector, then maintain a set of distinct behavior functions for each. Unfortunately some adjuncts directly call Behavior.list.unshift, bypassing register(...), which would be tricky to intercept (would need to make a mock of Array). The known one cases are in core, but it is possible plugin adjuncts do this too, in which case it would be incompatible to (say) change the Array<Map<String,Behavior>> to a Map<String,Array<Behavior>>. Instead, permitting redundant registrations as before, and just silently skipping all but the first at runtime when applying behaviors. Beware that since adjuncts are loaded from multiple places, different JS function objects are registered each time, so a naive set of behavior functions does not work; have to identify functions by their toString in order to ensure that each is run only once. (Currently once _per selector_, conceivably >1x per element; could if necessary be refined to make sure a given behavior is only run once on a given element during one call to applySubtree even if the element matches multiple selectors.)
Jenkins CI
Copyright © 2004-, Kohsuke Kawaguchi, Sun Microsystems, Inc., and a number of other of contributers. Licensed under MIT License.
About
In a nutshell Jenkins CI is the leading open-source continuous integration server. Built with Java, it provides over 300 plugins to support building and testing virtually any project.
Downloads
Non-source downloads such as WAR file and several Linux packages can be found on our Mirrors.
Source
Our latest and greatest source of Jenkins CI can be found on GitHub. Fork us!
News and Website
All about Jenkins CI can be found on our website. Follow us on Twitter @jenkinsci.
Description
No description provided
cicdcontinuous-deliverycontinuous-deploymentcontinuous-integrationdevopsgroovyhacktoberfestjavajenkinspipelines-as-code
Readme
MIT
339 MiB
0 Stars
1 Watchers
0 Forks
Languages
Java
87.1%
HTML
6.4%
JavaScript
3.3%
SCSS
2.3%
Groovy
0.3%
Other
0.5%
