Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-73278] Migrate core from EE 8 to EE 9 #9672

Merged
merged 62 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
fdc46ed
[JENKINS-73278] Migrate core from EE 8 to EE 9
basil Aug 27, 2024
ac39015
Merge branch 'master' into jakarta
basil Aug 28, 2024
066b83e
New incremental
basil Aug 28, 2024
18e6f92
Fix deprecated method
basil Aug 30, 2024
8c73deb
Merge branch 'master' into jakarta
basil Aug 30, 2024
1bdf821
Update incrementals
basil Aug 30, 2024
159977e
Merge branch 'master' into jakarta
basil Aug 30, 2024
56524fa
Merge branch 'master' into jakarta
basil Sep 1, 2024
8e348cc
Update core/src/main/java/hudson/security/SecurityRealm.java
basil Sep 2, 2024
ec2de4c
Update core/src/main/java/hudson/model/Job.java
basil Sep 2, 2024
9e66c79
Update core/src/main/java/hudson/model/Descriptor.java
basil Sep 2, 2024
fd88bb5
Update core/src/main/java/hudson/model/Api.java
basil Sep 2, 2024
da5da53
Update core/src/main/java/hudson/model/Api.java
basil Sep 2, 2024
ebe3c01
Update core/src/main/java/hudson/model/Actionable.java
basil Sep 2, 2024
61129e7
Update core/src/main/java/jenkins/model/Jenkins.java
basil Sep 2, 2024
6f537e5
Update core/src/main/java/jenkins/model/Jenkins.java
basil Sep 2, 2024
d74b057
Update core/src/main/java/hudson/PluginManager.java
basil Sep 2, 2024
cc2d615
Update core/src/main/java/hudson/util/Graph.java
basil Sep 2, 2024
abd2c08
Update core/src/main/java/hudson/util/Graph.java
basil Sep 2, 2024
e6ad0e3
Update core/src/main/java/hudson/search/Search.java
basil Sep 2, 2024
9e6a1a7
Update core/src/main/java/jenkins/model/Jenkins.java
basil Sep 2, 2024
829894e
Update core/src/main/java/jenkins/model/Jenkins.java
basil Sep 2, 2024
93033e1
Update core/src/main/java/jenkins/model/ModelObjectWithChildren.java
basil Sep 2, 2024
133504b
Update core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java
basil Sep 2, 2024
41f79c7
Update core/src/main/java/jenkins/model/ParameterizedJobMixIn.java
basil Sep 2, 2024
4039c7a
Update core/src/main/java/hudson/console/AnnotatedLargeText.java
basil Sep 2, 2024
e7025d0
Update core/src/main/java/hudson/model/AbstractItem.java
basil Sep 2, 2024
0c219e9
Update core/src/main/java/hudson/model/AbstractItem.java
basil Sep 2, 2024
ce2a6b7
Update core/src/main/java/hudson/Plugin.java
basil Sep 2, 2024
8a8be78
Update core/src/main/java/hudson/scm/AbstractScmTagAction.java
basil Sep 2, 2024
4ca29c4
Update core/src/main/java/hudson/model/AbstractItem.java
basil Sep 2, 2024
ae770e3
Update core/src/main/java/hudson/model/Run.java
basil Sep 2, 2024
addd785
Update core/src/main/java/hudson/model/Run.java
basil Sep 2, 2024
22d0ca6
Update core/src/main/java/hudson/model/UpdateCenter.java
basil Sep 2, 2024
f971ab6
Update core/src/main/java/hudson/model/View.java
basil Sep 2, 2024
5aaba6f
Update core/src/main/java/hudson/model/View.java
basil Sep 2, 2024
179ea54
Update core/src/main/java/hudson/model/View.java
basil Sep 2, 2024
604db9f
Add imports
basil Sep 2, 2024
b68c552
https://github.com/jenkinsci/jenkins/pull/9672#issuecomment-2324945196
basil Sep 2, 2024
ff8986f
Fast incremental
basil Aug 12, 2024
a26e478
Revert "Update core/src/main/java/hudson/model/View.java"
basil Sep 2, 2024
497b651
Revert "Fast incremental"
basil Sep 2, 2024
d923825
Different CSRF fix
basil Sep 2, 2024
4f67784
Fast incremental
basil Aug 12, 2024
b536707
Revert "Fast incremental"
basil Sep 2, 2024
c3ec4a1
Released versions
basil Sep 3, 2024
520776a
https://github.com/jenkinsci/jenkins/pull/9672#issuecomment-2326277011
basil Sep 3, 2024
cc07404
Fix build
basil Sep 3, 2024
3a6a576
Fast incremental
basil Aug 12, 2024
4f31577
Revert "Fast incremental"
basil Sep 3, 2024
fe998fb
Update core/src/main/java/hudson/model/Descriptor.java
basil Sep 3, 2024
75120d8
https://github.com/jenkinsci/jenkins/pull/9672#discussion_r1738887508
basil Sep 3, 2024
6315119
https://github.com/jenkinsci/jenkins/pull/9672#discussion_r1742018013
basil Sep 3, 2024
f735fdc
https://github.com/jenkinsci/jenkins/pull/9672#discussion_r1742029487
basil Sep 3, 2024
de29558
https://github.com/jenkinsci/jenkins/pull/9672#discussion_r1742071739
basil Sep 3, 2024
10f333f
https://github.com/jenkinsci/jenkins/pull/9672#discussion_r1742082679
basil Sep 3, 2024
96797e9
https://github.com/jenkinsci/jenkins/pull/9672#discussion_r1742273929
basil Sep 3, 2024
715c02c
More fixes
basil Sep 3, 2024
6cae674
The original problem was issueCrumb (probably validateCrumb too)
daniel-beck Sep 3, 2024
a42ed07
Two more calls to wrap
basil Sep 3, 2024
2a4870c
Fast incremental
basil Aug 12, 2024
90659fe
Revert "Fast incremental"
basil Sep 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 0 additions & 11 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,6 @@
"org.jfree:jfreechart"
]
},
{
"description": "Starting with 6.x, Spring requires Java 17 at a minimum.",
"matchManagers": [
"maven"
],
"allowedVersions": "<6.0.0",
"matchPackageNames": [
"org.springframework:spring-framework-bom",
"org.springframework.security:spring-security-bom"
]
},
{
"description": "Starting with 7.x, Guice switches from javax.* to jakarta.* bindings. See https://github.com/google/guice/wiki/Guice700",
"matchManagers": [
Expand Down
9 changes: 3 additions & 6 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ THE SOFTWARE.

<properties>
<commons-fileupload2.version>2.0.0-M2</commons-fileupload2.version>
<stapler.version>1896.v8170998149d0</stapler.version>
<!-- TODO JENKINS-73258 https://github.com/jenkinsci/stapler/pull/482 -->
<stapler.version>1903.vc3c8b_63dda_41</stapler.version>
<groovy.version>2.4.21</groovy.version>
</properties>

Expand All @@ -62,15 +63,15 @@ THE SOFTWARE.
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>5.3.39</version>
<version>6.1.12</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<!-- https://docs.spring.io/spring-security/site/docs/5.5.4/reference/html5/#getting-maven-no-boot -->
<!-- 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>5.8.14</version>
<version>6.3.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -154,12 +155,12 @@ THE SOFTWARE.
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>4.0.4</version>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>1.2.7</version>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>jaxen</groupId>
Expand Down
20 changes: 19 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,20 @@ THE SOFTWARE.
<!-- needed by Jelly -->
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jaxen</groupId>
Expand Down Expand Up @@ -288,7 +302,7 @@ THE SOFTWARE.
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-fileupload2-javax</artifactId>
<artifactId>commons-fileupload2-jakarta-servlet5</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
Expand Down Expand Up @@ -427,6 +441,10 @@ THE SOFTWARE.
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<exclusions>
<exclusion>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-observation</artifactId>
</exclusion>
Comment on lines +444 to +447
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excluded to avoid increasing API surface area, as this seems to be unused.

<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jcl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/DescriptorExtensionList.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public T newInstanceFromRadioList(JSONObject config) throws FormException {
if (config.isNullObject())
return null; // none was selected
int idx = config.getInt("value");
return get(idx).newInstance(Stapler.getCurrentRequest(), config);
return get(idx).newInstance(Stapler.getCurrentRequest2(), config);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/ExpressionFactory2.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.apache.commons.jelly.expression.ExpressionSupport;
import org.apache.commons.jexl.JexlContext;
import org.kohsuke.stapler.Stapler;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerRequest2;
import org.springframework.security.access.AccessDeniedException;

/**
Expand Down Expand Up @@ -78,7 +78,7 @@ public Object evaluate(JellyContext context) {
// let the security exception pass through
throw e;
} catch (Exception e) {
StaplerRequest currentRequest = Stapler.getCurrentRequest();
StaplerRequest2 currentRequest = Stapler.getCurrentRequest2();
LOGGER.log(Level.WARNING, "Caught exception evaluating: " + expression + " in " + (currentRequest != null ? currentRequest.getOriginalRequestURI() : "?") + ". Reason: " + e, e);
return null;
} finally {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/FilePath.java
Original file line number Diff line number Diff line change
Expand Up @@ -3510,7 +3510,7 @@
}

private static void checkPermissionForValidate() {
AccessControlled subject = Stapler.getCurrentRequest().findAncestorObject(AbstractProject.class);
AccessControlled subject = Stapler.getCurrentRequest2().findAncestorObject(AbstractProject.class);

Check warning on line 3513 in core/src/main/java/hudson/FilePath.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 3513 is not covered by tests
if (subject == null)
Jenkins.get().checkPermission(Jenkins.MANAGE);
else
Expand Down
Loading
Loading