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

Update the sample projects to the latest release #691

Merged
merged 27 commits into from Apr 26, 2023

Conversation

claj
Copy link
Contributor

@claj claj commented Oct 18, 2021

I did go through all the sample projects to upgrade them. I did not reproduce everything in every README-file (I have not tried out capstan, not deployed things to AWS etc).

I had problems with some functionality, mostly http2, without conscrypt, which are known bugs. I did not put a lot of effort into finding a decently old JVM to get these working.

I have updated all the occurences of the alpn-agent, event in out commented project.clj files, and of course updated all the other deps to reasonable versions.

some notes:

aws-codestar-lambda - I have not tested to deploy this to AWS. There are many reflection warnings, mainly related to boxing. The backported reduce-kv on java.util.Map is not removed since we use latest stable Clojure 1.10.3.
fast-pedestal- disabled several deprecated JVM options meant to optimize the speed. Works with JDK 17 but I did not do any speed measurments.
helloworld-metrics - it is not clear to me if the reported metrics are complete.
http2 fails because it is missing ALPN handlers for JDK 17, but also for JVMs like 8.0.302-zulu.
http2-conscrypt- works using 8.0.302-zulu
tracing and tracing-interceptor- had to make exclusion in the updated deps. Works nicely.
tracing-interceptor-aws - tried with local xray-daemon and I can see the traces on AWS.
war-example- I have not tried running the generated .war-file.

Please let me know if it something should be changed in the apporach, like a test matrix for different jvm:s (probably using sdkman) and/or some test scripts based on the instructions in the READMEs.

testing with lein run-dev.

did not test jetty-alpn-agent 2.0.10.
Many of the options suggested in project.clj for fast-pedestal are either
deprecated or probably not state-of-the-art given the development of the JVM.

This commit makes it possible to run the samples in JDK-17, but they are not
informedly selected by any benchmarking or anything like it.
note: the ring-cors library seems to have been forked.

https://github.com/frenchy64/ring-cors/commits/frenchy64-bug shows som recent development.
buddy-auth is upgraded from 2.1.0 to 3.0.1 but seems to work.
A lot of boxed math warnings.

Did leave the reduce-kv workaround for now.
removed the explicit core-async dependency.
exclusions for core.async and tools.analyzer.jvm with pedestal.service 0.5.9
had to make exclusion for jaeger-thrift
did NOT test the resulting WAR-container.
@hlship hlship changed the title Issue 685 Update the sample projects to the latest release Nov 1, 2022
@bonkydog bonkydog self-assigned this Feb 10, 2023
# Conflicts:
#	samples/aws-codestar-lambda/project.clj
#	samples/buddy-auth/project.clj
#	samples/chain-providers/project.clj
#	samples/cors/project.clj
#	samples/fast-pedestal/project.clj
#	samples/hello-world/project.clj
#	samples/helloworld-metrics/project.clj
#	samples/http2-conscrypt/project.clj
#	samples/immutant/project.clj
#	samples/jetty-web-sockets/project.clj
#	samples/json-api/project.clj
#	samples/nio/project.clj
#	samples/override-logging/project.clj
#	samples/ring-middleware/project.clj
#	samples/server-sent-events/project.clj
#	samples/server-with-links/project.clj
#	samples/servlet-filters-gzip/project.clj
#	samples/tracing-interceptor-aws/project.clj
#	samples/tracing-interceptor/project.clj
#	samples/tracing/project.clj
#	samples/war-example/project.clj
@bonkydog
Copy link
Contributor

OK, I've updated this branch and tested that all the samples still start and respond with a 200.
Had to update a jetty-servlet dependency.

Copy link
Contributor

@bonkydog bonkydog left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

@bonkydog bonkydog merged commit 707745d into pedestal:master Apr 26, 2023
1 check passed
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.

None yet

2 participants