guardian / media-atom-maker

A tool for creating media atoms, including a UI specifically for managing video
https://video.gutools.co.uk/videos
4 stars 3 forks source link

Upgrade to latest Scanamo version (1.0.0-M28) #1143

Closed rtyley closed 7 months ago

rtyley commented 8 months ago

This is a necessary precursor to the Scala 2.13 upgrade in PR https://github.com/guardian/media-atom-maker/pull/1147, as Scanamo 1.0.0-M9 only supports Scala 2.11 & 2.12.

Here we're moving up from Scanamo 1.0.0-M9 to 1.0.0-M28, which involves several changes to requirements:

The AWS SDK v1 → v2 requirement of Scanamo was the tricky one to handle- a lot of code media-atom-maker also makes AWS SDK calls to lots of other services, and I didn't want to have to fix all of it to use AWS SDK v2 in this change.

Instead, this change introduces com.gu.media.aws.CredentialsForBothSdkVersions, which makes a choice of AWS SDK v1 or v2 credentials available in the already-existing com.gu.media.aws.AwsCredentials class. This allows a partial move to AWS SDK v2, while other parts of the code remain on AWS SDK v1 for now. Notably, we need both v1 and v2 versions of the DynamoDB client, as the atom-maker libraries in guardian/atom-maker still use AWS SDK v1.

Testing

This deploys successfully to CODE, and https://video.code.dev-gutools.co.uk/videos is still accessible:

image

I was able to make a small metadata change without any obvious problems:

image

I'd need to pair with someone on the Content Production team to double check that all functionality, including the AWS lambdas, are working correctly!

prout-bot commented 7 months ago

Seen on PROD (merged by @rtyley 5 minutes and 22 seconds ago) Please check your changes!