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-68933] Update to Jetty 10, with WebSocket #6785

Closed
wants to merge 29 commits into from

Conversation

jglick
Copy link
Member

@jglick jglick commented Jul 5, 2022

Subsumes #6780; reverts #6781, reapplying #6694.

See JENKINS-68933.

Development loop:

mvnd -Pquick-build install -pl websocket/spi,websocket/jetty9,websocket/jetty10,core,war
mvnd -pl test test -Dtest=JNLPLauncherRealTest\#webSocket

Proposed changelog entries

  • Upgrading the bundled Jetty to version 10, via Winstone 6.0.

Proposed upgrade guidelines

N/A

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There are at least 2 approvals for the pull request and no outstanding requests for change
  • Conversations in the pull request are over OR it is explicit that a reviewer does not block the change
  • Changelog entries in the PR title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood
  • Proper changelog labels are set so that the changelog can be generated automatically
  • If the change needs additional upgrade steps from users, upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the PR title. (example)
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

Copy link
Member

@basil basil left a comment

Choose a reason for hiding this comment

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

I was exploring this logic earlier today and came to a similar conclusion about isUpgradeRequest. I had been thinking about inlining it, but I guess retaining only the first check as you did here is probably good enough.

This looks good pending a few remaining tasks:

Happy to help with these tasks, so let me know how we can best drive this forward together.

@jglick
Copy link
Member Author

jglick commented Jul 6, 2022

help with these tasks

I think the first three are now covered, so in principle this PR should now be ready as far as WebSocket support is concerned as soon as the Winstone change is released. If you want to set up a separate draft PR for testing against jenkinsci/jenkins-test-harness#453 that would certainly increase our confidence.

(There are apparently other regressions like #6694 (comment) and #6694 (comment) which could be addressed as well. I was not planning to look into those, so if you want to look into them, it may make more sense to file a fresh PR subsuming this one which is truly production-ready. My interest was in restoring WS functionality, especially since I was responsible for the reflection tech debt that made it tricky to understand where Jetty 10 was not working; I guess it did not even occur to me at the time that Jetty would change their APIs incompatibly.)

@jglick
Copy link
Member Author

jglick commented Jul 6, 2022

Interactively verified wsecho/ (in both text and binary modes, incl. ping visible after 30s with websocat -vv); Pipeline builds on a WS agent; CLI in -webSocket mode.

Otherwise closing connections sometimes produces stack traces

```
WARNING	j.websocket.WebSocketSession#error: unhandled WebSocket service error
java.nio.channels.ClosedChannelException
	at org.eclipse.jetty.websocket.core.internal.WebSocketSessionState.onEof(WebSocketSessionState.java:169)
	at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.onEof(WebSocketCoreSession.java:253)
	at org.eclipse.jetty.websocket.core.internal.WebSocketConnection.fillAndParse(WebSocketConnection.java:482)
	at org.eclipse.jetty.websocket.core.internal.WebSocketConnection.onFillable(WebSocketConnection.java:340)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319)
	at …
```

or

```
WARNING	j.agents.WebSocketAgents$Session#error
java.nio.channels.ClosedChannelException
	at org.eclipse.jetty.websocket.core.internal.WebSocketSessionState.onEof(WebSocketSessionState.java:169)
	at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.onEof(WebSocketCoreSession.java:253)
	at …
```

though I am not sure if that is actually new behavior.
Otherwise closing connections sometimes produces stack traces

```
WARNING	j.websocket.WebSocketSession#error: unhandled WebSocket service error
java.nio.channels.ClosedChannelException
	at org.eclipse.jetty.websocket.core.internal.WebSocketSessionState.onEof(WebSocketSessionState.java:169)
	at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.onEof(WebSocketCoreSession.java:253)
	at org.eclipse.jetty.websocket.core.internal.WebSocketConnection.fillAndParse(WebSocketConnection.java:482)
	at org.eclipse.jetty.websocket.core.internal.WebSocketConnection.onFillable(WebSocketConnection.java:340)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319)
	at …
```

or

```
WARNING	j.agents.WebSocketAgents$Session#error
java.nio.channels.ClosedChannelException
	at org.eclipse.jetty.websocket.core.internal.WebSocketSessionState.onEof(WebSocketSessionState.java:169)
	at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.onEof(WebSocketCoreSession.java:253)
	at …
```

though I am not sure if that is actually new behavior.
@jglick
Copy link
Member Author

jglick commented Jul 6, 2022

FYI I was topologically merging in the upstream branch, which Git tracks better than cherry-picks. (Until you squash-merge the upstream PR. One reason I prefer to use true merges.)

Copy link
Member

@basil basil left a comment

Choose a reason for hiding this comment

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

I was not planning to look into those, so if you want to look into them, it may make more sense to file a fresh PR subsuming this one which is truly production-ready.

Sure, let's get a green CI build for #6785 and let's get #6780 merged and then I can file a new PR for the final reintegration. Many thanks for the collaboration thus far. I plan to do two sets of core PRs (one with regular test harness and one with Jetty 10 test harness) and two corresponding BOM/PCT runs.

war/pom.xml Show resolved Hide resolved
@github-actions github-actions bot added the unresolved-merge-conflict There is a merge conflict with the target branch. label Jul 7, 2022
@github-actions
Copy link

github-actions bot commented Jul 7, 2022

Please take a moment and address the merge conflicts of your pull request. Thanks!

@basil
Copy link
Member

basil commented Jul 7, 2022

Continuing in #6801

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants