Skip to content
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

botocore: switch setter for injecting headers into propagator #264

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
def _patched_endpoint_prepare_request(wrapped, instance, args, kwargs):
request = args[0]
headers = request.headers
propagators.inject(type(headers).__setitem__, headers)
propagators.inject(type(headers).add_header, headers)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a lot of context on this, but we should probably add at least a test for the case you're running into.

From #262, it sounds like the most relevant part is the DyanamoDB API call. have you tried adding a mock DynamiDB api call (moto looks to support dynamodb)? It seems like a call that maps what you're executing in your service should trigger the error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking a closer look, the part I'm a little unclear on is, as you mentioned, what is actually causing this. I have a feeling something was injected that should not have been by the propagator. I'll comment more on the issue.

return wrapped(*args, **kwargs)


Expand Down