Skip to content

Dp fix jetty 12.1#6390

Closed
duncdrum wants to merge 3 commits into
eXist-db:developfrom
duncdrum:dp-fix-jetty
Closed

Dp fix jetty 12.1#6390
duncdrum wants to merge 3 commits into
eXist-db:developfrom
duncdrum:dp-fix-jetty

Conversation

@duncdrum
Copy link
Copy Markdown
Contributor

@duncdrum duncdrum commented May 20, 2026

There are two issues uncovered by the jetty bump.

The first is a change affecting win path construction. Which puts : from eg. D:\Documents... into urls. Making them plain broken.

The second is a hardened availability status check. Exist is running into, because we never checked for availability proper, just readiness.

This is quite messy. I would like to have this cleaner. But so far my attempts at cleaning all lead to new test failures. So looking for help

Bumps the jetty group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| org.eclipse.jetty:jetty-server | `12.0.33` | `12.1.9` |
| org.eclipse.jetty:jetty-xml | `12.0.33` | `12.1.9` |
| org.eclipse.jetty:jetty-util | `12.0.33` | `12.1.9` |
| org.eclipse.jetty:jetty-jmx | `12.0.33` | `12.1.9` |
| org.eclipse.jetty:jetty-security | `12.0.33` | `12.1.9` |
| org.eclipse.jetty:jetty-http | `12.0.33` | `12.1.9` |
| org.eclipse.jetty:jetty-deploy | `12.0.33` | `12.1.9` |

Updates `org.eclipse.jetty:jetty-server` from 12.0.33 to 12.1.9

Updates `org.eclipse.jetty:jetty-xml` from 12.0.33 to 12.1.9

Updates `org.eclipse.jetty:jetty-util` from 12.0.33 to 12.1.9

Updates `org.eclipse.jetty:jetty-jmx` from 12.0.33 to 12.1.9

Updates `org.eclipse.jetty:jetty-security` from 12.0.33 to 12.1.9

Updates `org.eclipse.jetty:jetty-http` from 12.0.33 to 12.1.9

Updates `org.eclipse.jetty:jetty-deploy` from 12.0.33 to 12.1.9

Updates `org.eclipse.jetty:jetty-xml` from 12.0.33 to 12.1.9

Updates `org.eclipse.jetty:jetty-util` from 12.0.33 to 12.1.9

Updates `org.eclipse.jetty:jetty-jmx` from 12.0.33 to 12.1.9

Updates `org.eclipse.jetty:jetty-security` from 12.0.33 to 12.1.9

Updates `org.eclipse.jetty:jetty-http` from 12.0.33 to 12.1.9

Updates `org.eclipse.jetty:jetty-deploy` from 12.0.33 to 12.1.9

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-server
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
- dependency-name: org.eclipse.jetty:jetty-xml
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
- dependency-name: org.eclipse.jetty:jetty-util
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
- dependency-name: org.eclipse.jetty:jetty-jmx
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
- dependency-name: org.eclipse.jetty:jetty-security
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
- dependency-name: org.eclipse.jetty:jetty-http
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
- dependency-name: org.eclipse.jetty:jetty-deploy
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
- dependency-name: org.eclipse.jetty:jetty-xml
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
- dependency-name: org.eclipse.jetty:jetty-util
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
- dependency-name: org.eclipse.jetty:jetty-jmx
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
- dependency-name: org.eclipse.jetty:jetty-security
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
- dependency-name: org.eclipse.jetty:jetty-http
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
- dependency-name: org.eclipse.jetty:jetty-deploy
  dependency-version: 12.1.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jetty
...

Signed-off-by: dependabot[bot] <support@github.com>
/**
* Jetty may accept TCP connections and report {@link WebAppContext#isStarted()} before the context
* is {@link org.eclipse.jetty.server.handler.ContextHandler#isAvailable()}, in which case HTTP
* clients see {@code 503 Service Unavailable} (observed on Windows CI).
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.

I see same issues on MacOS

@duncdrum duncdrum force-pushed the dp-fix-jetty branch 4 times, most recently from d38303f to 801da08 Compare May 21, 2026 11:19
duncdrum added 2 commits May 21, 2026 15:26
Jetty 12.1 resolves sub-paths with path.resolve(uri.getPath()), which
throws InvalidPathException on Windows when the URI path is /D:/...
Exploded test webapps hit this in WebAppContext.getWebInf().

Wrap PathResource with WindowsPathResource on eXist WebAppContext (Windows
only), restoring Jetty 12.0 resolve behaviour via Paths.get(resolvedUri).

Enable throwUnavailableOnStartupException in deploy configs so webapp
startup failures fail fast instead of leaving the context permanently
unavailable (503 on every path).
Block in JettyStart until required contexts are isAvailable(); fail fast
from ExistWebServer when startup fails. Set exist.jetty.portal.dir for
distribution-mode tests.

Add direct servlet mappings in shared test web.xml where rewrite-only
routing breaks REST/XML-RPC tests. Simplify LoginModuleIT now that Jetty
startup is reliable.

Fix IndexController index worker chain order (structural before Lucene).
@duncdrum duncdrum force-pushed the dp-fix-jetty branch 2 times, most recently from 769d733 to d5c1d9c Compare May 21, 2026 16:11
@duncdrum duncdrum marked this pull request as ready for review May 21, 2026 16:55
@duncdrum duncdrum requested a review from a team as a code owner May 21, 2026 16:55
@duncdrum
Copy link
Copy Markdown
Contributor Author

Ok I need help here. I m not 100% happy with this yet, but so far this is the only consistently green patch I could come up with

@duncdrum duncdrum changed the title [WIP] Dp fix jetty 12.1 Dp fix jetty 12.1 May 21, 2026
}

private final Map<String, IndexWorker> indexWorkers = new HashMap<>();
/**
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.

Is this the correct PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes something that came up during the 20 or so runs leading up to this changeset.

Basically when running tests we can have a racy situation based on jetty saying I'm ready and indexing starting.

But as I said happy for ways to make this cleaner.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I ll restructure the commits to make this cleaner, and push some cleanups in a few

@dizzzz
Copy link
Copy Markdown
Member

dizzzz commented May 21, 2026

Based on a remark you wrote, waiting for an upstream update might be wise too?
For the other code changes.... I need to find the time to understand them

@dizzzz
Copy link
Copy Markdown
Member

dizzzz commented May 21, 2026

Green build is already impressive :-)

@duncdrum
Copy link
Copy Markdown
Contributor Author

Yes upstream will likely address the problem fixed by the first commit.

The available != ready is here to stay, and will need some adjustments on our side.

@duncdrum
Copy link
Copy Markdown
Contributor Author

I m going to close. This is not it. I have another attempt that should be able to land soon.

@duncdrum duncdrum closed this May 22, 2026
@duncdrum duncdrum mentioned this pull request May 22, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants