-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
s3.createBucket method is mutating the object passed as parameter #3112
Comments
@ajredniwja issue is here, fwiw, Line 1318 in 534033a
Up to y'all on how to fix, depends if you want to allocate another object , and how you want to go about doing that. something like the below probably works, although it should be note that
|
I was able to reproduce this, while this is not potentially is not a bug with the SDK but something that can be improved, I marked this as a feature request, would be glad to take a PR, otherwise will let the team evaluate the priority and work on it later. |
@ajredniwja alrighty, thanks for taking a look and the feedback. I have made a PR to address this and also wrote a unit test to prevent a regression in future versions #3138 As an aside, i think marking this a feature request is not in line with my understanding of the term. |
@ericmustin I agree with you but I marked this as a feature request since its more of a behavior issue, which can be enhanced and not necessarily a bug, meaning not really a bug. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
This is the same bug previously reported here #3013 .
i've been testing my
s3.createBucket
calls using localstack, which requires me to modify the endpoint tolocalhost:4572
and for some reason this causes the parameter object that has been passed in to get mutated and aCreateBucketConfiguration
key gets erroneously added to it, which breaks future calls using that parameter object. There is probably a missingObject.assign
call somewhere but I haven't had the time to track it down, otherwise would just make the PR.Is the issue in the browser/Node.js?
Node.js
Details of the browser/Node.js version
v10.15.1
SDK version number
└── aws-sdk@2.624.0
To Reproduce (observed behavior)
Reproduction snippet below, please note it only appears to occur when modifying the
endpoint
config optionExpected behavior
parameters object passed into
s3.createObject
should not be mutated, as this can cause future calls that re-use that same parameters object to throw validation errorsScreenshots
Additional context
Given that this issue has been opened (and auto-closed 😐 ) before, as seen here #3013 it seems very likely there is a legitimate bug. If you are having trouble reproducing please
@
me and let me know and i'll be happy to provide any additional relevant context. And in general thanks for the great work y'all do maintaining this repo, it's great and very well documented!The text was updated successfully, but these errors were encountered: