-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
fix: Upgrade to AWS JS SDK v3 #218
Conversation
Thanks for opening this pull request! |
@mman Did you try |
@mtrezza So I made some good progress on making 1/ The interface for However notes on migration to v3 mention that there is no sync method to generate pre-signed URL anymore (https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/migrating/notable-changes/). My JS experience is lacking in what to do now. Basically all remaining tests now fail because I was not able to make 2/ Using V3 The original V2 V3 returns https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-types/TypeAlias/NodeJsRuntimeStreamingBlobPayloadOutputTypes/ which is basically a http response wrapper that can be converted to byte array or string (https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-types/TypeAlias/SdkStream/). I have for now used conversion to string, but I feel it is not appropriate. The Need some help here to make progress. |
@@ -190,22 +190,23 @@ describe('S3Adapter tests', () => { | |||
}); | |||
|
|||
it('should accept endpoint as an override option in args', () => { |
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.
Looks like the AWS.Endpoint
API simply disappeared and I am not sure what to do here.
// if (!this._baseUrl) { | ||
// return presignedUrl; | ||
// } | ||
// } | ||
|
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 have disabled this test as I do not know how to properly migrate to AWS SDK v3 which does not offer a sync version of getSignedUrl
anymore.
@@ -165,7 +178,7 @@ class S3Adapter { | |||
if (data && !data.Body) { | |||
return reject(data); | |||
} | |||
return resolve(data.Body); |
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.
Here I cast data.Body
to string
which is most probably wrong as we should pass up a stream?
Hi @mman Did you get time to fix this? |
See #220 |
Closes: #197
The changes appear to be rather minimal and for now working in my staging environment.
Need a way to actually run proper tests and fix any remaining issues.
@mtrezza Could you help me understand how to run the tests? Or will they run automatically on PR?