Skip to content

Apps that depend on facia-json shouldn't be forced to include AWS SDK v1 #363

Description

@rtyley

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions