-
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
feature/INTERLOK-3579 - Interlok AWS - use the AWS SDK v2 #698
base: develop
Are you sure you want to change the base?
Conversation
Some classes are now the new hotness of AWS SDK 2 in the interlok-aws2-common project, but many things are still broken.
There doesn't seem to be anything sensible that replaces QueueBufferConfig
Most of the tests have been updated, although a few are (currently) commented out because it's not immediately clear which direction to go with them.
I think there is still more to do with S3, but another pair of eyes might be useful at this time.
Build fails on Github (but annoyingly not locally) in ApacheSigningInterceptor#build() and the only likely issue I can see is with Region#of(String), so we'll see...
Still trying totrack down why everything works locally but not on Github; the search continues...
The common reason for failure seems to be missing credentials.
Codecov Report
@@ Coverage Diff @@
## develop #698 +/- ##
=============================================
- Coverage 99.01% 95.03% -3.99%
- Complexity 508 911 +403
=============================================
Files 81 154 +73
Lines 1421 2678 +1257
Branches 64 118 +54
=============================================
+ Hits 1407 2545 +1138
- Misses 11 118 +107
- Partials 3 15 +12
Continue to review full report at Codecov.
|
@albinoloverats -> I bumped mockito to 4.0.0, this might break some of your tests, probably worth merging develop into this. |
We should document what v1 and v2 supports and doesn't support, with a few config examples. |
@Setter | ||
private String secretKey; | ||
|
||
public AWSKeysAuthentication() { |
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.
We could use @NoArgsConstructor instead?
public class ClientConfigurationBuilder { | ||
|
||
private static transient Logger log = LoggerFactory.getLogger(ClientConfigurationBuilder.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.
Do we need this? Do you see it being useful soon?
@Setter | ||
private String signingRegion; | ||
|
||
public CustomEndpoint() { |
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.
Same, maybe we should use lombok @NoArgsConstructor everytime we have an empty no args constructor?
|
Motivation
Currently use AWS SDK 1 for Java, however it's worth getting started on using AWS SDK 2. I had created a new project but it was decided to keep everything AWS together.
NB There are lots of changes: https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/home.html
including their package names, class names, method names, ways of doing things etc. Including features that are not yet present: S3 Transfer manager, S3 Encryption Client, DynamoDB document APIs, DynamoDB Encryption Client and SQS Client-side Buffering; plus Progress Listeners.
Modification
Pretty much everything.
PR Checklist
Result
Most things should be the same, although I've noticed that there are going to be config differences around any authentication.
Testing
You will need an existing AWS/Adapter config that can be migrated to the new AWS2 components. This config will upload a file to S3 using both v1 and v2 of the AWS SDK. (You will need to supply the bucket, as well as the access token and secret key.)