-
Notifications
You must be signed in to change notification settings - Fork 2
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
Upgrade to java11 #102
Upgrade to java11 #102
Conversation
project/dependencies.scala
Outdated
val jacksonDataFormat = | ||
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-cbor" % jacksonVersion | ||
val jacksonJdk8DataType = | ||
"com.fasterxml.jackson.datatype" % "jackson-datatype-jdk8" % jacksonVersion |
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.
I think this may be removed
@lindseydew I noticed a few additional changes linked to this upgrade which I have directly added as additional commits..but the build is now breaking 😢! I think this is because Anyway once this is fixed, the upgrade to |
Great thank you, I'll take a look at the build |
@@ -0,0 +1,84 @@ | |||
# This AWS SAM template has been generated from your function's configuration. If |
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.
Is it the cloudformation for mobile-save-for-later? Why do we need this one when there is "conf/cfn.yaml"?
@@ -0,0 +1,97 @@ | |||
# This AWS SAM template has been generated from your function's configuration. If |
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.
I think CDK is used to define the cloudformation stack for this service? Is it used for another purpose?
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.
Yeah, we are using the CDK for the cfn stack definition. This is used to be able to run the lambda functions locally using aws sam. Instructions here: https://github.com/guardian/mobile-save-for-later/pull/102/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R86
case "META-INF/MANIFEST.MF" => MergeStrategy.discard | ||
case "META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat" => | ||
new MergeFilesStrategy | ||
case PathList(ps @ _*) if ps.last equalsIgnoreCase "Log4j2Plugins.dat" => |
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.
You may have explained this in our snyk session, but I am not sure why we change the implementation of merge strategy here? The previous one does not work?
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.
yeah, I was getting an error with instantiating the MergeFilesStrategy class.
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 for the great work, I am happy to approve.
As an aside, I suppose that I need a docker desktop license if I want to run this service locally? (I see your name on the docker desktop license spreadsheet)
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.
I've only quickly skimmed through the diff of this PR, as I'm a bit short of time today!
I think the diff might be a bit bigger than it needs to be, I think because scalafmt
formatting changes are being included - that makes it a bit harder to concentrate on the significant code changes? If scalafmt is desired, it might be worth doing a separate scalafmt PR and then rebasing this one on top of that.
@lindseydew, you suggested that maybe should merge this PR, and then merge #105, which is understandable because #105 talks about Java 21, and this PR is for Java 11!
However, #105 only allows mobile-save-for-later
to build under Java 21, doesn't require it, and doesn't even attempt to update mobile-save-for-later
up from Java 8 - consequently, it's a much smaller PR, easier to review, and therefore, I would say, much lower risk!
So personally, I would prefer to merge #105 immediately, and then look at rebasing this PR on top of main - maybe even separating out a scalafmt run into it's own PR first. I'd be really happy to pair tomorrow on those stages of the operation if that would help?
Ok sounds good. Yes I'm happy for you to merge your branch first. Agree with separating the PR. A pairing session would be great. When would you be free? |
A few changes: - update to latest checkout action - update to latest configure-aws-credentials action - update to latest setup-jave - use corretto recommended distribution
a340321
to
f115e24
Compare
Co-authored-by: Roberto Tyley <[email protected]>
What does this change?
This upgrades the lambdas that serve the Save For Later functionality from Java8 to Java11
How to test
Tested Save for Later on CODE:
Tested User Deletion CODE:
Note I wasn't able to test the full interaction on CODE as I have been unable to find the exact string the app is expecting to parse. I think the json parsing logic needs a bit of an update too, so I'll make a note to do that and this should make it possible to test an example event.
For now, we have alarms set up on PROD if the delete interaction is unable to complete.
How can we measure success?
Have we considered potential risks?
Images
Accessibility