azure-sdk-for-python
azure-sdk-for-python copied to clipboard
[Storage] Matching `_shared` folder contents across all packages
This PR aims to unify all the contents of the _shared folders for the blob, datalake, queue, and file-share packages.
In general, my process was to use blob's _shared folder as the "source of truth" for most things as it is where most new changes will be added (and then not uniformly added to the other _shared folders)
Things to callout when unifying:
- Biggest change came from: Support for Oauth import/export managed disks here. I am assuming this will go everywhere eventually so most of the work was getting the shared folders to all contain these changes (please correct me if this won't go everywhere, then I will have to make all the packages look similar to each other excluding this change 😢)
shared_access_signature.pywill be different for file-share and queue since they do not support encryption scopeparser.pyis mostly barren except for in blob -- I opted to copy blob'sparser.pyto every other file (which is likely overkill) just because I anticipate most new features in blob that require these parser changes will eventually trickle down to other packages- In
response_handlers.pymetadata parsing went fromresponse.headers.itemstoresponse.http_reponse.headers.items. Not sure how this will play out because I'm assuming if it works in its current state, will the same information be contained inresponse.http_responsevsresponse.headers? Pending pipeline run for the answer 😄 - In
policies.pyspecifically theon_requestmethod, thequeuepackage is the only file with this workaround (and thus will differ from other files):
# Hack to fix generated code adding '/messages' after SAS parameters
includes_messages = request.http_request.url.endswith('/messages')
if includes_messages:
request.http_request.url = request.http_request.url[:-(len('/messages'))]
request.http_request.url = urljoin(request.http_request.url, 'messages')
Therefore, the only differences in the _shared folders now is:
- Queue generated code hack
shared_access_signature.pydifferences for packages that don't support encryption scope (file-share & queue)- Docstring differences that callout the package name
API change check
API changes are not detected in this pull request.