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

Storage table insert_entity should have an echo_content option #5

Closed
crwilcox opened this issue Aug 19, 2015 · 3 comments
Closed

Storage table insert_entity should have an echo_content option #5

crwilcox opened this issue Aug 19, 2015 · 3 comments

Comments

@crwilcox
Copy link

Description:

Controls whether the service returns the entity that was added or not.

It's the 'prefer' header: https://msdn.microsoft.com/en-us/library/azure/dd179433.aspx

Original Issue: Azure/azure-sdk-for-python#381

Comments (4):

@coffenbacher commented on 2015-07-03 16:19:22:

Yes, just came here to add this issue! It definitely should =) I'm getting hammered with those responses.

@coffenbacher commented on 2015-07-03 17:55:37:

I spent quite some time trying to implement this myself (for batch requests specifically), but no luck. I keep getting 201 responses with the echo, even though my requests look (I think) exactly like the examples here (https://msdn.microsoft.com/en-us/library/azure/dd894038.aspx).

--changeset_dc541eaa-21a8-11e5-a70f-0242ac110b34
Content-Type: application/http
Content-Transfer-Encoding: binary

POST http://xxx.table.core.windows.net/xxxHTTP/1.1
Content-ID: 1
Content-Type: application/atom+xml;type=entry
Prefer: return-no-content
Content-Length: 732

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom" >
<title /><updated>2015-07-03T17:28:03.937876+00:00</updated><author><name /></author><id />
<content type="application/xml">
    <m:properties xml:space="preserve">xxx</m:properties></content></entry>

returns 201, along with the associated body echo

ipdb> p responses[0].status
201

@huguesv commented on 2015-07-08 01:37:41:

Yeah, sometimes it's a lot harder than it should be :(
Is it behaving the same in non-batch mode?

@emgerner-msft commented on 2015-07-08 16:53:22:

Could you provide not just the headers for the changeset entry, but for the batch operation as a whole? If you see the document on Prefer Headers, the request service version must be above 2013-08-15 and the request OData data service version above 3.0 which would be one of the first things to check.

@jehine-MSFT
Copy link
Contributor

Hello @huguesv & @coffenbacher,

For the next major release we have decided to turn off echo content for all insert_entity and create_table operations for perf and bandwidth reasons. Can you think of a valid scenario in which customers would want echo content on for these operations?

Thanks so much!

@coffenbacher
Copy link

Great news, @jehine-MSFT ! My company's use-cases certainly never involve needing echoed requests on successful transactions, and I can't think of a valid reason why they ever would.

@jehine-MSFT
Copy link
Contributor

@coffenbacher ,

We have released the 0.30 version (#132) which addressed this feature request. If you have issues with the new version in regards to this issue, please reopen it and continue the discussion.

Thanks!

zezha-msft added a commit to zezha-msft/azure-storage-python that referenced this issue Jul 13, 2017
Fixed several failing tests which verify create_from* methods on blob…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants