Skip to content

Commit

Permalink
Merge branch 'master' into OptionHandlerExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
timja authored Dec 8, 2024
2 parents a1c8c83 + 9965f04 commit 33d8280
Show file tree
Hide file tree
Showing 22 changed files with 378 additions and 285 deletions.
10 changes: 5 additions & 5 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ THE SOFTWARE.

<properties>
<commons-fileupload2.version>2.0.0-M2</commons-fileupload2.version>
<stapler.version>1922.v3f3302a_7f16f</stapler.version>
<stapler.version>1928.v9115fe47607f</stapler.version>
<groovy.version>2.4.21</groovy.version>
</properties>

Expand Down Expand Up @@ -70,7 +70,7 @@ THE SOFTWARE.
<!-- https://docs.spring.io/spring-security/reference/6.3/getting-spring-security.html#getting-maven-no-boot -->
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-bom</artifactId>
<version>6.3.4</version>
<version>6.4.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -129,7 +129,7 @@ THE SOFTWARE.
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.17.0</version>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>commons-jelly</groupId>
Expand Down Expand Up @@ -295,7 +295,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jvnet.hudson</groupId>
<artifactId>commons-jelly-tags-define</artifactId>
<version>1.1-jenkins-20240903</version>
<version>1.1-jenkins-20241115</version>
</dependency>
<dependency>
<groupId>org.jvnet.localizer</groupId>
Expand Down Expand Up @@ -335,7 +335,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>json-lib</artifactId>
<version>2.4-jenkins-7</version>
<version>2.4-jenkins-8</version>
</dependency>
<dependency>
<groupId>org.kohsuke.stapler</groupId>
Expand Down
6 changes: 6 additions & 0 deletions core/src/main/java/hudson/model/Descriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,12 @@ public void calcAutoCompleteSettings(String field, Map<String, Object> attribute
if (method == null)
return; // no auto-completion

// build query parameter line by figuring out what should be submitted
List<String> depends = buildFillDependencies(method, new ArrayList<>());
if (!depends.isEmpty()) {

Check warning on line 479 in core/src/main/java/hudson/model/Descriptor.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 479 is only partially covered, one branch is missing
attributes.put("fillDependsOn", String.join(" ", depends));
}

attributes.put("autoCompleteUrl", String.format("%s/%s/autoComplete%s", getCurrentDescriptorByNameUrl(), getDescriptorUrl(), capitalizedFieldName));
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/UpdateSite.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public long getDataTimestamp() {
return updateData(DownloadService.loadJSON(new URL(getUrl() + "?id=" + URLEncoder.encode(getId(), StandardCharsets.UTF_8) + "&version=" + URLEncoder.encode(Jenkins.VERSION, StandardCharsets.UTF_8))), signatureCheck);
}

private FormValidation updateData(String json, boolean signatureCheck)
protected FormValidation updateData(String json, boolean signatureCheck)
throws IOException {

dataTimestamp = System.currentTimeMillis();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,10 @@ public Details newInstance(StaplerRequest2 req, JSONObject formData) throws Form
throw new FormException("Please confirm the password by typing it twice", "user.password2");
}

if (FIPS140.useCompliantAlgorithms() && pwd.length() < FIPS_PASSWORD_LENGTH) {
throw new FormException(Messages.HudsonPrivateSecurityRealm_CreateAccount_FIPS_PasswordLengthInvalid(), "user.password");
}

// will be null if it wasn't encrypted
String data = Protector.unprotect(pwd);
String data2 = Protector.unprotect(pwd2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* newer than {@link RemotingVersionInfo#getMinimumSupportedVersion}.
* (Core and plugin APIs will be identical to those run inside the controller.)
* @param <V> the return type; note that this must either be defined in your plugin or included in the stock JEP-200 whitelist
* @since TODO
* @since 2.485
*/
public interface ControllerToAgentCallable<V, T extends Throwable> extends Callable<V, T> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* {@link FilePath.FileCallable} meant to be serialized then run on an agent.
* Like {@link ControllerToAgentCallable} this will typically be a {@link Record}.
* @param <T> the return type; note that this must either be defined in your plugin or included in the stock JEP-200 whitelist
* @since TODO
* @since 2.485
*/
public interface ControllerToAgentFileCallable<T> extends FilePath.FileCallable<T> {

Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/jenkins/model/Nodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ public void setNodes(final @NonNull Collection<? extends Node> nodes) throws IOE
toRemove.putAll(Nodes.this.nodes);
for (var node : nodes) {
final var name = node.getNodeName();
Nodes.this.nodes.put(name, node);
node.onLoad(Nodes.this, name);
var oldNode = toRemove.get(name);
if (oldNode != null) {
NodeListener.fireOnUpdated(oldNode, node);
toRemove.remove(name);
} else {
NodeListener.fireOnCreated(node);
}
Nodes.this.nodes.put(name, node);
node.onLoad(Nodes.this, name);
}
Nodes.this.nodes.keySet().removeAll(toRemove.keySet());
jenkins.updateComputerList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ THE SOFTWARE.
<j:otherwise>
<j:set var="changelog_url" value="${app.CHANGELOG_URL}"/>
${%NewVersionAvailable(ucData.core.version,ucData.core.url,changelog_url)}
<j:if test="${ucData.canUpgrade()}">
<form method="post" action="${rootURL}/updateCenter/upgrade">
<f:submit value="${%Or Upgrade Automatically}"/>
</form>
</j:if>
<l:isAdmin>
<j:if test="${ucData.canUpgrade()}">
<form method="post" action="${rootURL}/updateCenter/upgrade">
<f:submit value="${%Or Upgrade Automatically}"/>
</form>
</j:if>
</l:isAdmin>
</j:otherwise>
</j:choose>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def listWarnings(warnings, boolean core) {
}
}
}
if (fixables == warnings.size) {
if (fixables == warnings.size()) {
dd {
if (fixables == 1) {
raw(_(core ? "allFixable1Core" : "allFixable1", rootURL))
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/helpLink.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ THE SOFTWARE.
</st:documentation>
<j:choose>
<j:when test="${attrs.url!=null}">
<j:set var="altText" value="${attrs.featureName != null ? '%Help for feature:' + ' ' + h.escape(attrs.featureName) : '%Help'}" />
<j:set var="altText" value="${attrs.featureName != null ? '%Help for feature:' + ' ' + attrs.featureName : '%Help'}" />
<a href="#" class="jenkins-help-button" tooltip="${altText}" helpURL="${rootURL}${attrs.url}">
<!-- .jenkins-help-button span element is required as it's restyled in CSS -->
<span>?</span>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/layout/card.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ THE SOFTWARE.
<div class="jenkins-card__title">
${attrs.title}
<div class="jenkins-card__controls">
<j:out value="${controls}"/>
<j:out value="${attrs.controls}"/>
<j:if test="${attrs.expandable != null}">
<a href="${attrs.expandable}" class="jenkins-card__reveal" tooltip="${%Expand}">
<l:icon src="symbol-expand" />
Expand Down
2 changes: 2 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module.exports = [
object: "readonly",
objectToUrlFormEncoded: "readonly",
onSetupWizardInitialized: "readonly",
qs: "readonly",
refillOnChange: "readonly",
refreshPart: "readonly",
registerSortableDragDrop: "readonly",
Expand All @@ -72,6 +73,7 @@ module.exports = [
shortenName: "readonly",
Sortable: "readonly",
toQueryString: "readonly",
TryEach: "readonly",
ts_refresh: "readonly",
updateOptionalBlock: "readonly",
Utilities: "readonly",
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@
"@babel/cli": "7.25.9",
"@babel/core": "7.26.0",
"@babel/preset-env": "7.26.0",
"@eslint/js": "9.14.0",
"@eslint/js": "9.16.0",
"babel-loader": "9.2.1",
"clean-webpack-plugin": "4.0.0",
"css-loader": "7.1.2",
"css-minimizer-webpack-plugin": "7.0.0",
"eslint": "9.14.0",
"eslint": "9.16.0",
"eslint-config-prettier": "9.1.0",
"eslint-formatter-checkstyle": "8.40.0",
"globals": "15.12.0",
"globals": "15.13.0",
"handlebars-loader": "1.7.3",
"mini-css-extract-plugin": "2.9.2",
"postcss": "8.4.49",
"postcss-loader": "8.1.1",
"postcss-preset-env": "10.1.0",
"postcss-preset-env": "10.1.1",
"postcss-scss": "4.0.9",
"prettier": "3.3.3",
"sass": "1.80.6",
"sass-loader": "16.0.3",
"prettier": "3.4.2",
"sass": "1.82.0",
"sass-loader": "16.0.4",
"style-loader": "4.0.0",
"stylelint": "16.10.0",
"stylelint": "16.11.0",
"stylelint-checkstyle-reporter": "1.0.0",
"stylelint-config-standard": "36.0.1",
"webpack": "5.96.1",
"webpack": "5.97.0",
"webpack-cli": "5.1.4",
"webpack-remove-empty-scripts": "1.0.4"
},
Expand All @@ -57,7 +57,7 @@
"hotkeys-js": "3.12.2",
"jquery": "3.7.1",
"lodash": "4.17.21",
"sortablejs": "1.15.3",
"sortablejs": "1.15.6",
"tippy.js": "6.3.7",
"window-handle": "1.0.1"
},
Expand All @@ -68,5 +68,5 @@
"engines": {
"node": ">=20.0.0"
},
"packageManager": "[email protected].1"
"packageManager": "[email protected].3"
}
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ THE SOFTWARE.
</issueManagement>

<properties>
<revision>2.486</revision>
<revision>2.489</revision>
<changelist>-SNAPSHOT</changelist>
<project.build.outputTimestamp>2024-11-12T13:58:29Z</project.build.outputTimestamp>
<project.build.outputTimestamp>2024-12-03T13:54:11Z</project.build.outputTimestamp>

<!-- configuration for patch tracker plugin -->
<project.patchManagement.system>github</project.patchManagement.system>
Expand All @@ -98,7 +98,7 @@ THE SOFTWARE.
<spotless.check.skip>false</spotless.check.skip>
<!-- Make sure to keep the jetty-ee9-maven-plugin version in war/pom.xml in sync with the Jetty release in Winstone: -->
<winstone.version>8.2</winstone.version>
<node.version>20.18.0</node.version>
<node.version>20.18.1</node.version>
</properties>

<!--
Expand Down Expand Up @@ -281,7 +281,7 @@ THE SOFTWARE.
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.20.1</version>
<version>10.20.2</version>
</dependency>
</dependencies>
<executions>
Expand Down
27 changes: 24 additions & 3 deletions src/main/js/components/dropdowns/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,30 @@ function init() {
}
return;
}
const url =
e.getAttribute("autoCompleteUrl") + "?value=" + encodeURIComponent(word);
fetch(url)

const url = e.getAttribute("autoCompleteUrl");

const depends = e.getAttribute("fillDependsOn");
const q = qs(e).addThis();
if (depends && depends.length > 0) {
depends.split(" ").forEach(
TryEach(function (n) {
q.nearBy(n);
}),
);
}

const queryString = q.toString();
const idx = queryString.indexOf("?");
const parameters = queryString.substring(idx + 1);

fetch(url, {
method: "post",
headers: crumb.wrap({
"Content-Type": "application/x-www-form-urlencoded",
}),
body: parameters,
})
.then((rsp) => (rsp.ok ? rsp.json() : {}))
.then((response) => createAndShowDropdown(e, response.suggestions || []));
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/scss/abstracts/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ $semantics: (
:root,
.app-theme-picker__picker[data-theme="none"] {
// Font related properties
--font-family-sans: system-ui, "Segoe UI", roboto, "Noto Sans", oxygen, ubuntu,
cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", arial, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
--font-family-sans: system-ui, "Segoe UI", roboto, "Noto Sans", oxygen,
ubuntu, cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", arial,
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
--font-family-mono: ui-monospace, sfmono-regular, sf mono, jetbrainsmono,
consolas, monospace;
--font-size-base: 1rem; // 16px
Expand Down
8 changes: 4 additions & 4 deletions test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ THE SOFTWARE.
<!-- Required by plugin-util-api -->
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-support</artifactId>
<version>932.vb_555de1b_a_b_94</version>
<version>936.v9fa_77211ca_e1</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down Expand Up @@ -178,7 +178,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>2353.ve3f890c6eea_f</version>
<version>2364.v163897b_238b_3</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -218,7 +218,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cloudbees-folder</artifactId>
<version>6.955.v81e2a_35c08d3</version>
<version>6.959.v4ed5cc9e2dd4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -344,7 +344,7 @@ THE SOFTWARE.
<artifactItem>
<groupId>io.jenkins.plugins</groupId>
<artifactId>design-library</artifactId>
<version>323.v301efa_39c6eb_</version>
<version>325.v40b_a_ccf974db_</version>
<type>hpi</type>
<outputDirectory>${project.build.outputDirectory}/plugins</outputDirectory>
<destFileName>design-library.jpi</destFileName>
Expand Down
Loading

0 comments on commit 33d8280

Please sign in to comment.