Skip to content

Jetty 10 based JenkinsRule - #453

Merged
basil merged 5 commits into
jenkinsci:masterfrom
basil:jetty10
Dec 7, 2022
Merged

Jetty 10 based JenkinsRule#453
basil merged 5 commits into
jenkinsci:masterfrom
basil:jetty10

Conversation

@basil

@basil basil commented Jul 5, 2022

Copy link
Copy Markdown
Member

Now that the test harness requires Java 11, we can move to a Jetty 10 baed JenkinsRule. To test this I ran the Swarm plugin tests as well as a subset of core tests with this PR. I also verified that this PR, once widely adopted, will allow us to remove Jetty 9 support from core.

context.setConfigurations(new Configuration[]{new WebXmlConfiguration()});
context.addBean(new NoListenerConfiguration(context));
server.setHandler(context);
JettyWebSocketServletContainerInitializer.configure(context, null);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@jglick jglick mentioned this pull request Dec 2, 2022
@basil
basil marked this pull request as ready for review December 7, 2022 15:20
@basil

basil commented Dec 7, 2022

Copy link
Copy Markdown
Member Author

Still need to move hpi:run to Jetty 10 but I see no reason not to get the ball rolling on this in the meantime.

@basil
basil merged commit 0cdf154 into jenkinsci:master Dec 7, 2022
@basil
basil deleted the jetty10 branch December 7, 2022 15:24
context.setConfigurations(new Configuration[]{new WebXmlConfiguration()});
context.addBean(new NoListenerConfiguration(context));
server.setHandler(context);
JettyWebSocketServletContainerInitializer.configure(context, null);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@basil FYI this JTH release breaks a WebSocket test in the kubernetes plugin:

java.lang.NullPointerException: Cannot invoke "org.eclipse.jetty.websocket.server.JettyWebSocketServerContainer.upgrade(org.eclipse.jetty.websocket.server.JettyWebSocketCreator, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)" because the return value of "org.eclipse.jetty.websocket.server.JettyWebSocketServerContainer.getContainer(javax.servlet.ServletContext)" is null
	at jenkins.websocket.Jetty10Provider.handle(Jetty10Provider.java:61)
	at jenkins.websocket.WebSockets.lambda$upgrade$0(WebSockets.java:70)

I am still trying to understand why; in the meantime, jenkinsci/kubernetes-plugin@dcc8137

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, never mind, I think this is due to a stale copy in that plugin (#289 (comment)).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Glad to hear it, especially given that I tested this case by running the Swarm plugin's JenkinsRule-based tests (which use WebSocket) against this PR prior to its merge and release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants