-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Cannot get an EC2 request ID #1038
Comments
Thanks for the report and details, will take a look at why this is happening. |
Okay, pretty clear on things now, and can certainly see that the block is no longer being hit anywhere. I'm looking in to the right fix now. |
trevorrowe
added a commit
that referenced
this issue
Jan 14, 2016
This is a regression from when we switched to stream parsing the XML. Older versions of the SDK parsed the entire XML document into a DOM, and then walked that DOM to parse the values. Because the entire document was no longer available in memory, the parser could no longer yield it as a hash. This caused the EC2 protocol handler to silently fail, no longer able to populate the request ID. This update adds a callback to the XML parser that yields when un-modeled/un-handled XML values are present in the response. The EC2 handler registers a callback and checks the context/path of the unhandled value and captures it if it is the request id. To prevent a regression in the future, a unit test was added to ensure the EC2 client correctly extracts the request id from the HTTP response body and stores it in the response context. Fixes #1038
I've submitted a PR that addresses this issue and adds a supporting test. |
This has been merged and will be part of our next release. |
Thank you for fixing this issue. 😄 |
awood45
added a commit
that referenced
this issue
Jan 14, 2016
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code cannot get an EC2 request ID.
Aws::Plugins::Protocols::EC2#parse_xml
method passes a block toAws::Xml::Parser#parse
method.https://github.com/aws/aws-sdk-ruby/blob/master/aws-sdk-core/lib/aws-sdk-core/plugins/protocols/ec2.rb#L12-L21
But
Aws::Xml::Parser#parse
method does not treat a block.https://github.com/aws/aws-sdk-ruby/blob/master/aws-sdk-core/lib/aws-sdk-core/xml/parser.rb#L23-L31
52f3efa#diff-91359190dca8b9e40db446ea5c1a5654
The text was updated successfully, but these errors were encountered: