Skip to content

Commit 8bf9643

Browse files
authored
Merge branch 'master' into fix-chevron-click
2 parents 037497d + 622dab2 commit 8bf9643

File tree

199 files changed

+5129
-4985
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+5129
-4985
lines changed

.github/renovate.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@
106106
],
107107
"enabled": false,
108108
"description": "maven-metadata.xml is missing for this really old package which is required by renovate"
109+
},
110+
{
111+
"description": "Jackson 2.19.0 causes issues with Kubernetes client. See https://github.com/jenkinsci/bom/pull/5114",
112+
"matchManagers": [
113+
"maven"
114+
],
115+
"allowedVersions": "<2.19.0",
116+
"matchPackageNames": [
117+
"org.jenkins-ci.plugins:jackson2-api"
118+
]
109119
}
110120
],
111121
"customManagers": [

.github/workflows/require-changelog-label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
issues: write
1212
pull-requests: write
1313
steps:
14-
- uses: mheap/github-action-required-labels@388fd6af37b34cdfe5a23b37060e763217e58b03 # v5
14+
- uses: mheap/github-action-required-labels@fb29a14a076b0f74099f6198f77750e8fc236016 # v5
1515
with:
1616
mode: minimum
1717
count: 1

ath.sh

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -o xtrace
66
cd "$(dirname "$0")"
77

88
# https://github.com/jenkinsci/acceptance-test-harness/releases
9-
export ATH_VERSION=6180.v889d0fe56785
9+
export ATH_VERSION=6250.v4a_41b_57c8a_84
1010

1111
if [[ $# -eq 0 ]]; then
1212
export JDK=17
@@ -26,33 +26,46 @@ fi
2626
mkdir -p target/ath-reports
2727
chmod a+rwx target/ath-reports
2828

29+
curl \
30+
--fail \
31+
--silent \
32+
--show-error \
33+
--output /tmp/ath.yml \
34+
--location "https://raw.githubusercontent.com/jenkinsci/acceptance-test-harness/refs/tags/${ATH_VERSION}/docker-compose.yml"
35+
36+
sed -i -e "s/jenkins\/ath:latest/jenkins\/ath:${ATH_VERSION}/g" /tmp/ath.yml
37+
2938
# obtain the groupId to grant to access the docker socket to run tests needing docker
30-
dockergid=$(docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ubuntu:noble stat -c %g /var/run/docker.sock)
39+
if [[ -z ${DOCKER_GID:-} ]]; then
40+
DOCKER_GID=$(docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ubuntu:noble stat -c %g /var/run/docker.sock) || exit 1
41+
export DOCKER_GID
42+
fi
43+
44+
trap 'docker-compose --file /tmp/ath.yml kill && docker-compose --file /tmp/ath.yml down' EXIT
3145

32-
exec docker run --rm \
46+
exec docker-compose \
47+
--file /tmp/ath.yml \
48+
run \
3349
--env JDK \
3450
--env ATH_VERSION \
3551
--env BROWSER \
36-
--shm-size 2g `# avoid selenium.WebDriverException exceptions like 'Failed to decode response from marionette' and webdriver closed` \
37-
--group-add ${dockergid} \
52+
--name mvn \
53+
--no-TTY \
54+
--rm \
3855
--volume "$(pwd)"/war/target/jenkins.war:/jenkins.war:ro \
39-
--volume /var/run/docker.sock:/var/run/docker.sock:rw \
4056
--volume "$(pwd)"/target/ath-reports:/reports:rw \
41-
--interactive \
42-
jenkins/ath:"$ATH_VERSION" \
57+
mvn \
4358
bash <<-'INSIDE'
4459
set -o errexit
4560
set -o nounset
4661
set -o pipefail
4762
set -o xtrace
4863
cd
4964
set-java.sh "${JDK}"
50-
# Start the VNC system provided by the image from the default user home directory
51-
eval "$(vnc.sh)"
5265
env | sort
53-
git clone --branch "$ATH_VERSION" --depth 1 https://github.com/jenkinsci/acceptance-test-harness
66+
git clone --branch "${ATH_VERSION}" --depth 1 https://github.com/jenkinsci/acceptance-test-harness
5467
cd acceptance-test-harness
55-
run.sh "$BROWSER" /jenkins.war \
68+
run.sh "remote-webdriver-${BROWSER}" /jenkins.war \
5669
-Dmaven.test.failure.ignore \
5770
-DforkCount=1 \
5871
-Dgroups=org.jenkinsci.test.acceptance.junit.SmokeTest

bom/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ THE SOFTWARE.
3838
<description>The module contains dependencies that are used by a specific Jenkins version</description>
3939

4040
<properties>
41-
<commons-fileupload2.version>2.0.0-M2</commons-fileupload2.version>
41+
<commons-fileupload2.version>2.0.0-M3</commons-fileupload2.version>
4242
<groovy.version>2.4.21</groovy.version>
4343
<jelly.version>1.1-jenkins-20250108</jelly.version>
4444
<stapler.version>1983.v93c53e94b_c04</stapler.version>
@@ -71,7 +71,7 @@ THE SOFTWARE.
7171
<!-- https://docs.spring.io/spring-security/reference/6.3/getting-spring-security.html#getting-maven-no-boot -->
7272
<groupId>org.springframework.security</groupId>
7373
<artifactId>spring-security-bom</artifactId>
74-
<version>6.4.5</version>
74+
<version>6.5.0</version>
7575
<type>pom</type>
7676
<scope>import</scope>
7777
</dependency>

core/pom.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ THE SOFTWARE.
3939
<url>https://github.com/jenkinsci/jenkins</url>
4040

4141
<properties>
42-
<xmlunit.version>2.10.0</xmlunit.version>
4342
<!-- Minimum Remoting version, which is tested for API compatibility, duplicated so that renovate only updates the latest remoting version property -->
4443
<remoting.minimum.supported.version>3107.v665000b_51092</remoting.minimum.supported.version>
4544
<!-- Filled in by jacoco-maven-plugin -->
@@ -55,6 +54,13 @@ THE SOFTWARE.
5554
<type>pom</type>
5655
<scope>import</scope>
5756
</dependency>
57+
<dependency>
58+
<groupId>org.xmlunit</groupId>
59+
<artifactId>xmlunit-bom</artifactId>
60+
<version>2.10.2</version>
61+
<type>pom</type>
62+
<scope>import</scope>
63+
</dependency>
5864
</dependencies>
5965
</dependencyManagement>
6066

@@ -447,7 +453,7 @@ THE SOFTWARE.
447453
</dependency>
448454
<dependency>
449455
<groupId>org.mockito</groupId>
450-
<artifactId>mockito-core</artifactId>
456+
<artifactId>mockito-junit-jupiter</artifactId>
451457
<scope>test</scope>
452458
</dependency>
453459
<dependency>
@@ -458,13 +464,11 @@ THE SOFTWARE.
458464
<dependency>
459465
<groupId>org.xmlunit</groupId>
460466
<artifactId>xmlunit-core</artifactId>
461-
<version>${xmlunit.version}</version>
462467
<scope>test</scope>
463468
</dependency>
464469
<dependency>
465470
<groupId>org.xmlunit</groupId>
466471
<artifactId>xmlunit-matchers</artifactId>
467-
<version>${xmlunit.version}</version>
468472
<scope>test</scope>
469473
</dependency>
470474
</dependencies>

core/src/main/java/hudson/model/DirectoryBrowserSupport.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,6 @@ public void serveFile(StaplerRequest req, StaplerResponse rsp, FilePath root, St
203203
}
204204

205205
private void serveFile(StaplerRequest2 req, StaplerResponse2 rsp, VirtualFile root, String icon, boolean serveDirIndex) throws IOException, ServletException, InterruptedException {
206-
// handle form submission
207-
String pattern = req.getParameter("pattern");
208-
if (pattern == null)
209-
pattern = req.getParameter("path"); // compatibility with Hudson<1.129
210-
if (pattern != null && Util.isSafeToRedirectTo(pattern)) { // avoid open redirect
211-
rsp.sendRedirect2(pattern);
212-
return;
213-
}
214-
215206
String path = getPath(req);
216207
if (path.replace('\\', '/').contains("/../")) {
217208
// don't serve anything other than files in the artifacts dir

core/src/main/java/hudson/model/Executor.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
import java.util.Arrays;
5151
import java.util.Collection;
5252
import java.util.Collections;
53+
import java.util.LinkedHashSet;
5354
import java.util.List;
5455
import java.util.Vector;
5556
import java.util.concurrent.Callable;
@@ -284,7 +285,14 @@ public void recordCauseOfInterruption(Run<?, ?> build, TaskListener listener) {
284285
lock.writeLock().unlock();
285286
}
286287

287-
build.addAction(new InterruptedBuildAction(r));
288+
InterruptedBuildAction action = build.getAction(InterruptedBuildAction.class);
289+
if (action != null) {
290+
Collection<CauseOfInterruption> combinedCauses = new LinkedHashSet<>(action.getCauses());
291+
combinedCauses.addAll(r);
292+
build.replaceAction(new InterruptedBuildAction(combinedCauses));
293+
} else {
294+
build.addAction(new InterruptedBuildAction(r));
295+
}
288296
for (CauseOfInterruption c : r)
289297
c.print(listener);
290298
}

core/src/main/java/hudson/model/MyViewsProperty.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import hudson.security.ACL;
3535
import hudson.util.FormValidation;
3636
import hudson.util.ListBoxModel;
37+
import hudson.views.DefaultViewsTabBar;
3738
import hudson.views.MyViewsTabBar;
3839
import hudson.views.ViewsTabBar;
3940
import jakarta.servlet.ServletException;
@@ -81,6 +82,8 @@ public class MyViewsProperty extends UserProperty implements ModifiableViewGroup
8182
@CheckForNull
8283
private String primaryViewName;
8384

85+
private ViewsTabBar viewsTabBar = new DefaultViewsTabBar();
86+
8487
/**
8588
* Always hold at least one view.
8689
*/
@@ -124,6 +127,9 @@ public Object readResolve() {
124127
protected void primaryView(String name) { primaryViewName = name; }
125128
};
126129

130+
if (viewsTabBar == null) {
131+
viewsTabBar = new DefaultViewsTabBar();
132+
}
127133
return this;
128134
}
129135

@@ -284,6 +290,7 @@ public ListBoxModel doFillPrimaryViewNameItems(@AncestorInPath User user) throws
284290
MyViewsProperty property = user.getProperty(MyViewsProperty.class);
285291
if (property == null) {
286292
property = new MyViewsProperty();
293+
property.readResolve();
287294
user.addProperty(property);
288295
}
289296
for (View view : property.views) {
@@ -303,7 +310,11 @@ public UserProperty reconfigure(StaplerRequest2 req, JSONObject form) throws For
303310

304311
@Override
305312
public ViewsTabBar getViewsTabBar() {
306-
return Jenkins.get().getViewsTabBar();
313+
return viewsTabBar;
314+
}
315+
316+
public void setViewsTabBar(ViewsTabBar viewsTabBar) {
317+
this.viewsTabBar = viewsTabBar;
307318
}
308319

309320
@Override

core/src/main/java/hudson/model/Queue.java

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
import java.util.GregorianCalendar;
9494
import java.util.HashMap;
9595
import java.util.HashSet;
96-
import java.util.Iterator;
9796
import java.util.LinkedHashSet;
9897
import java.util.List;
9998
import java.util.Map;
@@ -1541,7 +1540,7 @@ public void maintain() {
15411540

15421541
{ // blocked -> buildable
15431542
// copy as we'll mutate the list and we want to process in a potentially different order
1544-
List<BlockedItem> blockedItems = new ArrayList<>(blockedProjects.values());
1543+
List<BlockedItem> blockedItems = new ArrayList<>((blockedProjects));
15451544
// if facing a cycle of blocked tasks, ensure we process in the desired sort order
15461545
if (s != null) {
15471546
s.sortBlockedItems(blockedItems);
@@ -2954,29 +2953,8 @@ public boolean containsKey(Task task) {
29542953
return get(task) != null;
29552954
}
29562955

2957-
public T remove(Task task) {
2958-
Iterator<T> it = iterator();
2959-
while (it.hasNext()) {
2960-
T t = it.next();
2961-
if (t.task.equals(task)) {
2962-
it.remove();
2963-
return t;
2964-
}
2965-
}
2966-
return null;
2967-
}
2968-
2969-
public void put(Task task, T item) {
2970-
assert item.task.equals(task);
2971-
add(item);
2972-
}
2973-
2974-
public ItemList<T> values() {
2975-
return this;
2976-
}
2977-
29782956
/**
2979-
* Works like {@link #remove(Task)} but also marks the {@link Item} as cancelled.
2957+
* Removes a task and marks the {@link Item} as cancelled.
29802958
*/
29812959
public T cancel(Task p) {
29822960
T x = get(p);

core/src/main/java/hudson/model/ViewGroup.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.util.LinkedHashSet;
3434
import java.util.List;
3535
import jenkins.model.Jenkins;
36+
import jenkins.views.ViewsTabBarUserProperty;
3637

3738
/**
3839
* Container of {@link View}s.
@@ -159,4 +160,23 @@ default List<Action> getViewActions() {
159160
return Jenkins.get().getActions();
160161
}
161162

163+
/**
164+
* Returns the ViewsTabBar that the user has configured.
165+
*
166+
* @return users TabBar
167+
* @since TODO
168+
*/
169+
default ViewsTabBar getUserViewsTabBar() {
170+
User user = User.current();
171+
if (user != null) {
172+
ViewsTabBarUserProperty viewsTabBarUserProperty = user.getProperty(ViewsTabBarUserProperty.class);
173+
if (viewsTabBarUserProperty != null) {
174+
ViewsTabBar userViewTabsBars = viewsTabBarUserProperty.getViewsTabBar();
175+
if (userViewTabsBars != null) {
176+
return userViewTabsBars;
177+
}
178+
}
179+
}
180+
return getViewsTabBar();
181+
}
162182
}

0 commit comments

Comments
 (0)