AWS SDK for Java v1 will soon be EOL, and as teams update their codebases to use AWS SDK v2, it'll become troublesome that facia-json pulls in AWS SDK v1, even if you're using it with AWS SDK v2:
|
awsS3SdkV1, // ideally, this would be pushed out to a separate FAPI artifact, or just not used directly at all |
So long as all consumers of fapi-client/facia-json are updated to use the new constructor of com.gu.facia.client.ApiClient (ie ApiClient.withCaching()) we can get rid of the legacy ApiClient() constructor that requires a dependency on AWS SDK v1:
|
/** |
|
* Legacy constructor for creating a client that does not support caching. Use `ApiClient.withCaching()` instead. |
|
*/ |
|
def apply( |
|
bucket: String, |
|
environment: String, // e.g., CODE, PROD, DEV ... |
|
s3Client: S3Client |
|
)(implicit executionContext: ExecutionContext): ApiClient = new ApiClient { |
Usages of com.gu.facia.client.ApiClient()
See also
AWS SDK for Java v1 will soon be EOL, and as teams update their codebases to use AWS SDK v2, it'll become troublesome that
facia-jsonpulls in AWS SDK v1, even if you're using it with AWS SDK v2:facia-scala-client/build.sbt
Line 68 in 220ab4b
So long as all consumers of
fapi-client/facia-jsonare updated to use the new constructor ofcom.gu.facia.client.ApiClient(ieApiClient.withCaching()) we can get rid of the legacyApiClient()constructor that requires a dependency on AWS SDK v1:facia-scala-client/facia-json/src/main/scala/com/gu/facia/client/ApiClient.scala
Lines 21 to 28 in 220ab4b
Usages of
com.gu.facia.client.ApiClient()apple-newshttps://github.com/guardian/apple-news/pull/398frontendEnable ETag-caching & AWS SDK v2 on Facia API requests frontend#27715ophanhttps://github.com/guardian/ophan/pull/6741facia-toolstory-packagesmobile-fastly-cache-purger- concerningly, this is currently limited to v7.0.0 of this library at the moment: https://github.com/guardian/mobile-fastly-cache-purger/pull/63mobile-apps-api- there's a wrinkle here, because this project has its ownCachedApiClientthat's probably unnecessary now that etag-caching is provided withApiClient.withCaching()- ultimately, the upgrade should allow us to deleteCachedApiClient.See also