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
Jetty 10 based JenkinsRule
#453
Conversation
@@ -543,6 +546,7 @@ protected ServletContext createWebServer() throws Exception { | |||
context.setConfigurations(new Configuration[]{new WebXmlConfiguration()}); | |||
context.addBean(new NoListenerConfiguration(context)); | |||
server.setHandler(context); | |||
JettyWebSocketServletContainerInitializer.configure(context, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b4f70c0
to
371410d
Compare
Still need to move |
@@ -796,6 +799,7 @@ public static ImmutablePair<Server, ServletContext> _createWebServer(String cont | |||
context.setConfigurations(new Configuration[]{new WebXmlConfiguration()}); | |||
context.addBean(new NoListenerConfiguration(context)); | |||
server.setHandler(context); | |||
JettyWebSocketServletContainerInitializer.configure(context, null); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)).
There was a problem hiding this comment.
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.
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.