fix: Update S3 client usage in BaseConfigService#1215
Conversation
This has been broken since upgrading to AWS SDK v3 (#1201). The object body is no longer returned as a `Buffer` but as a `Readable`. Jira: [ENG-3796]
SDK v3 error objects seem to have capitalised field names.
|
Can you explain a bit further about the test you mention, I can't imagine exactly what you mean - was it bumping up the Node version and then seeing if it runs? Also, the other changes seen in the yarn lock, do you know what those other than |
Sure: I took the changes in this PR in
Good spot, I hadn't checked |
|
Another question, the capitalisation of the error names: is that a style choice of our own, or is that in some way necessary owing to the bumped node version/AWS SDK? |
It's a change in AWS SDK v3; that's where the errors that we're handling come from. From a quick search I wasn't able to find something that clearly says "in v2 it was Just for clarity, the update of Reminds me, I meant to set a minimum supported Node version in |
|
Actually, scrap that last point! I just came across this AWS page on migrating S3 clients to v3, which demonstrates a built-in method for transforming the object body streams to strings. No need to depend on newer Node types yet 🙂 |
|
Given that Node v14 is no longer supported, we might be doing ourselves a small favour by keeping that version bumpup here. So long as you don't see any huge complexity being introduced in the process here, perhaps it would be worth trying? |
You're right, however it's not necessary for this bugfix. I'm going to do another PR soonish to update to Node 20 (maybe even 22) as we need to get |
corinja
left a comment
There was a problem hiding this comment.
I encountered same issue with some work I was doing streaming files from S3 for PAF updates. This looks like a good fix.
|
🎉 This PR is included in version 2.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
BaseConfigServicehas been broken since upgrading to AWS SDK v3 (#1201).Buffer, but as aStreamingBlobPayloadOutputTypesCodekey, which impacts handling of missing config objectsI've tested the fix in this PR by patching
node_modulesin an affected application.Jira: ENG-3796