Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into war
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Oct 7, 2024
2 parents 207c6f6 + 7dfdceb commit b67d18c
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This page provides information about contributing code to the Jenkins core codeb
3. Install the necessary development tools. In order to develop Jenkins, you need the following:
- Java Development Kit (JDK) 17 or 21.
In the Jenkins project we usually use [Eclipse Temurin](https://adoptium.net/) or [OpenJDK](https://openjdk.java.net/), but you can use other JDKs as well.
- Apache Maven 3.8.1 or above. You can [download Maven here](https://maven.apache.org/download.cgi).
- Apache Maven 3.9.6 or above. You can [download Maven here](https://maven.apache.org/download.cgi).
In the Jenkins project we usually use the most recent Maven release.
- Any IDE which supports importing Maven projects.
4. Set up your development environment as described in [Preparing for Plugin Development](https://www.jenkins.io/doc/developer/tutorial/prepare/)
Expand Down
6 changes: 6 additions & 0 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,12 @@ THE SOFTWARE.
<artifactId>stapler-groovy</artifactId>
<version>${stapler.version}</version>
</dependency>
<!-- Override the outdated managed dependency on asm in guice-parent -->
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.7.1</version>
</dependency>
<dependency>
<groupId>org.samba.jcifs</groupId>
<artifactId>jcifs</artifactId>
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/jenkins/cli/SafeRestartCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.args4j.Option;
import org.kohsuke.stapler.StaplerRequest2;

/**
* Safe Restart Jenkins - do not accept any new jobs and try to pause existing.
Expand All @@ -53,7 +54,7 @@ public String getShortDescription() {

@Override
protected int run() throws Exception {
Jenkins.get().doSafeRestart(null, message);
Jenkins.get().doSafeRestart((StaplerRequest2) null, message);
return 0;
}
}
16 changes: 15 additions & 1 deletion core/src/main/java/jenkins/model/Jenkins.java
Original file line number Diff line number Diff line change
Expand Up @@ -4673,7 +4673,7 @@ public HttpResponse doSafeRestart(StaplerRequest req) throws IOException, Servle
/**
* Queues up a safe restart of Jenkins. Jobs have to finish or pause before it can proceed. No new jobs are accepted.
*
* @since 2.414
* @since 2.475
*/
public HttpResponse doSafeRestart(StaplerRequest2 req, @QueryParameter("message") String message) throws IOException, ServletException, RestartNotSupportedException {
checkPermission(MANAGE);
Expand All @@ -4692,6 +4692,20 @@ public HttpResponse doSafeRestart(StaplerRequest2 req, @QueryParameter("message"
return HttpResponses.redirectToDot();
}

/**
* @deprecated use {@link #doSafeRestart(StaplerRequest2, String)}
* @since 2.414
*/
@Deprecated
@StaplerNotDispatchable
public HttpResponse doSafeRestart(StaplerRequest req, @QueryParameter("message") String message) throws IOException, javax.servlet.ServletException, RestartNotSupportedException {
try {
return doSafeRestart(StaplerRequest.toStaplerRequest2(req), message);
} catch (ServletException e) {
throw ServletExceptionWrapper.fromJakartaServletException(e);
}
}

private static Lifecycle restartableLifecycle() throws RestartNotSupportedException {
if (Main.isUnitTest) {
throw new RestartNotSupportedException("Restarting the controller JVM is not supported in JenkinsRule-based tests");
Expand Down
4 changes: 1 addition & 3 deletions core/src/main/java/jenkins/model/queue/ItemDeletion.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,10 @@ public static void cancelBuildsInProgress(@NonNull Item initiatingItem) throws F
// comparison with executor.getCurrentExecutable() == executable currently should always be
// true as we no longer recycle Executors, but safer to future-proof in case we ever
// revisit recycling.
if (!entry.getKey().isAlive()
if (!entry.getKey().isActive()
|| entry.getValue() != entry.getKey().getCurrentExecutable()) {
iterator.remove();
}
// I don't know why, but we have to keep interrupting
entry.getKey().interrupt(Result.ABORTED);
}
Thread.sleep(50L);
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/js/components/dropdowns/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const SELECTED_ITEM_CLASS = "jenkins-dropdown__item--selected";
* @param callback - called to retrieve the list of dropdown items
*/
function generateDropdown(element, callback, immediate) {
if (element._tippy && element._tippy.props.theme === "dropdown") {
element._tippy.destroy();
}

tippy(
element,
Object.assign({}, Templates.dropdown(), {
Expand Down
4 changes: 2 additions & 2 deletions test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>2299.v7e8d22e797d3</version>
<version>2307.v10e5d0701b_e5</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -230,7 +230,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<version>1302.va_b_878c32eb_b_5</version>
<version>1303.v05e2505656b_7</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ THE SOFTWARE.
<host>localhost</host>
<!-- HTTP listener port -->
<port>8080</port>
<mina-sshd-api.version>2.14.0-131.v04e9b_6b_e0362</mina-sshd-api.version>
<mina-sshd-api.version>2.14.0-133.vcc091215a_358</mina-sshd-api.version>
<!-- Minimum Remoting version, which is tested for API compatibility, duplicated so that renovate only updates the latest remoting version property -->
<remoting.minimum.supported.version>3107.v665000b_51092</remoting.minimum.supported.version>

Expand Down Expand Up @@ -314,7 +314,7 @@ THE SOFTWARE.
<!-- detached after 1.577 -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<version>1302.va_b_878c32eb_b_5</version>
<version>1303.v05e2505656b_7</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
Expand Down Expand Up @@ -502,7 +502,7 @@ THE SOFTWARE.
<!-- dependency of scm-api -->
<groupId>io.jenkins.plugins</groupId>
<artifactId>asm-api</artifactId>
<version>9.7-33.v4d23ef79fcc8</version>
<version>9.7.1-95.v9f552033802a_</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
Expand Down

0 comments on commit b67d18c

Please sign in to comment.