Skip to content

Update Dropwizard version to 4.0.7 - #3037

Closed
ratrun wants to merge 6 commits into
graphhopper:masterfrom
ratrun:dropwizard4
Closed

ratrun wants to merge 6 commits into
graphhopper:masterfrom
ratrun:dropwizard4

Conversation

@ratrun

@ratrun ratrun commented Aug 2, 2024

Copy link
Copy Markdown
Contributor

As we now depend on Java 17 I updated the used dropwizard dependency to the current version 4.0.7.

The upgrade documentation used for the upgrade can be found here:

https://www.dropwizard.io/en/release-3.0.x/manual/upgrade-notes/upgrade-notes-3_0_x.html
https://www.dropwizard.io/en/stable/manual/upgrade-notes/upgrade-notes-4_0_x.html

The upgrade to version 3.0.7 was pretty straightforward.
In the 4.0.x upgrade documentation there is no description about the need for implementing the MessageBodyReader class. I found this out by studying the debug logs when using the mapmatching endpoint.

@karussell

karussell commented Aug 6, 2024 •

Copy link
Copy Markdown
Member

Thanks.

See also this comment: #2920 (comment) where we observed strange behaviour of the new version. But maybe it is a bug or problem in the http client they are using internally for >=3.x? Unfortunately we did not get an official response from any dropwizard developer.

@ratrun

ratrun commented Aug 6, 2024

Copy link
Copy Markdown
Contributor Author

I didn't see that you already upgraded to version 3.0 ! But I also didn't notice any strange behavior with my version. Is it possible to trigger a build action in order to see if the same problem occurs also on this branch?

@ratrun

ratrun commented Aug 8, 2024

Copy link
Copy Markdown
Contributor Author

I was able to reproduce the hang problem with the Dropwizard3Test.java test on version 4.0.7. As there is no response from the dropwizard developers a solution would be to add the line

app.client().property(Apache5ClientProperties.REUSE_STRATEGY, (ConnectionReuseStrategy) (request, response, context) -> false);

to our TestUtils.java. Shouldn't we do simply that instead of waiting for a response?

@karussell

Copy link
Copy Markdown
Member

Thanks for trying this out!

Shouldn't we do simply that instead of waiting for a response?

Good question. Initially my fear was that this is more a server-side problem and so a change for the client settings would just hide the underlying problem. But the more I investigated this issue the more I thought this is a client-only problem and solution you showed is the way we could go. But I'm not 100% sure. Was hoping for an "official" reply from the dropwizard devs :)

@karussell

Copy link
Copy Markdown
Member

I created a dropwizard issue here: dropwizard/dropwizard#9246

@joschi

joschi commented Sep 3, 2024

Copy link
Copy Markdown

@ratrun @karussell Could you please retry with the latest release (Dropwizard 4.0.8) which contains Jersey 3.0.15?

That hopefully will address the issue.

@karussell

Copy link
Copy Markdown
Member

(Have updated the original issue)

@easbar

easbar commented Sep 24, 2024

Copy link
Copy Markdown
Member

We updated Dropwizard to version 3 here: #2920 Is there any good reason we should use version 4?

@ratrun

ratrun commented Sep 28, 2024 •

Copy link
Copy Markdown
Contributor Author

We updated Dropwizard to version 3 here: #2920 Is there any good reason we should use version 4?

According the upgrade notes I expect dropwizard 4.0.x will include additional features that are not included in Dropwizard 3.0.x, but other than that currently there is no difference for us.

@easbar

easbar commented Sep 30, 2024

Copy link
Copy Markdown
Member

Ok, I think we can keep dropwizard 3 for some time then.

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.

4 participants