-
-
Notifications
You must be signed in to change notification settings - Fork 793
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
fix: Do not pass allowCache
to java-invoke-local
server
#1349
fix: Do not pass allowCache
to java-invoke-local
server
#1349
Conversation
Hi @pgrzesik, I'm wondering if anyone could help review this one line change? Thank.🙏 |
Hello @AlbertXingZhang - it looks like there are some issues with the change - could you please take a look into the output of CI runs? |
dc13d46
to
5050d35
Compare
Hi @pgrzesik, I have amended the change. Could you please help check if it looks better now? Thanks. |
Hello @AlbertXingZhang - there's some issue with CI builds at the moment - after it will be resolved I will review it again |
Hey @AlbertXingZhang - could you please push your changes again (e.g. by amending the commit and pushing it again)? It seems like it has be to triggered once again or otherwise the CI doesn't start |
73d0fb8
to
178071a
Compare
178071a
to
ef5e02d
Compare
I'm sorry I tried it twice since I'm not sure if it is triggered properly. |
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.
Thank you @AlbertXingZhang 🙇
allowCache
to java-invoke-local
server
Thanks for merging. 🎉 |
Description
We were running "java-invoke-local --server" and "serverless offline" as suggested for faster local invocations to the java lambda functions. But every single request we made ended with the following exception.
groovy.lang.MissingPropertyException: No such property: allowCache for class: serverless.jvm.plugin.InvokeRequest
After taking a look at both source codes, I think it is because the java runner sends the unsupported property "allowCache" to the java-invoke-local server accidentally.
Motivation and Context
java-invoke-local doesn't support the property "allowCache".
https://github.com/bytekast/serverless-toolkit/blob/44d94008c5f0e7b6953d7d010f26e0490cd3814a/libs/java-invoke-local/src/main/groovy/serverless/jvm/plugin/InvokeRequest.groovy#L9
But JavaRunner.js sends it as a part of the body data to the java-invoke-local server.
serverless-offline/src/lambda/handler-runner/java-runner/JavaRunner.js
Line 79 in 353b6c6
It causes exceptions that prevent us from testing the java lambda functions with faster local invocations. So we made this simple change to just remove "allowCache" from the sending object.
How Has This Been Tested?
We made this change to serverless offline and try it again along with running "java-invoke-local --server" as before. Everything works as expected. We also ran "npm run test:unit" and we don't see it affects any other area.
Screenshots (if appropriate):