{"action":"created","issue":{"url":"https://api.github.com/repos/apache/libcloud/issues/1202","repository_url":"https://api.github.com/repos/apache/libcloud","labels_url":"https://api.github.com/repos/apache/libcloud/issues/1202/labels{/name}","comments_url":"https://api.github.com/repos/apache/libcloud/issues/1202/comments","events_url":"https://api.github.com/repos/apache/libcloud/issues/1202/events","html_url":"https://github.com/apache/libcloud/pull/1202","id":314842702,"number":1202,"title":"Fix hash value in azure blob store","user":{"login":"daviskirk","id":1049817,"avatar_url":"https://avatars2.githubusercontent.com/u/1049817?v=4","gravatar_id":"","url":"https://api.github.com/users/daviskirk","html_url":"https://github.com/daviskirk","followers_url":"https://api.github.com/users/daviskirk/followers","following_url":"https://api.github.com/users/daviskirk/following{/other_user}","gists_url":"https://api.github.com/users/daviskirk/gists{/gist_id}","starred_url":"https://api.github.com/users/daviskirk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviskirk/subscriptions","organizations_url":"https://api.github.com/users/daviskirk/orgs","repos_url":"https://api.github.com/users/daviskirk/repos","events_url":"https://api.github.com/users/daviskirk/events{/privacy}","received_events_url":"https://api.github.com/users/daviskirk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-16T22:38:26Z","updated_at":"2018-05-02T06:33:35Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/apache/libcloud/pulls/1202","html_url":"https://github.com/apache/libcloud/pull/1202","diff_url":"https://github.com/apache/libcloud/pull/1202.diff","patch_url":"https://github.com/apache/libcloud/pull/1202.patch"},"body":"\r\n## Upgrade azure blob storage api\r\n\r\n### Description\r\n\r\n* Upgrade to minimum api version allowed by azure (see )\r\n\r\n* Return actual file (md5) hash instead of etag ('\"0xFFFFFFFFFFFFFFF\"')\r\n\r\nThe current trunk version of libcloud throws a Libcloud error also described in (https://issues.apache.org/jira/browse/LIBCLOUD-851)\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"...\", line 12, in <module>\r\n    c = d.list_containers()[1]\r\n  File \"libcloud/libcloud/storage/base.py\", line 209, in list_containers\r\n    return list(self.iterate_containers())\r\n  File \"libcloud/libcloud/storage/drivers/azure_blobs.py\", line 371, in iterate_containers\r\n    (response.status), driver=self)\r\nlibcloud.common.types.LibcloudError: <LibcloudError in <libcloud.storage.drivers.azure_blobs.AzureBlobsStorageDriver object at 0x7f7389bf1080> 'Unexpected status code: 400'>\r\n```\r\nand the corresponing response body of the failing request is:\r\n```\r\nresponse.body\r\n'<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP headers is not in the correct format.\\nRequestId:dd262993-501e-0030-6cd1-d58682000000\\nTime:2018-04-16T22:24:39.6566784Z</Message><HeaderName>x-ms-version</HeaderName><HeaderValue>2012-02-12</HeaderValue></Error>'\r\n```\r\n\r\nFrom looking at:\r\nhttps://docs.microsoft.com/en-us/rest/api/storageservices/versioning-for-the-azure-storage-services#for-blob-storage-accounts\r\n\r\nthe easiest fix is to upgrade the api version to the minumum supported version (2014-02-12).\r\n\r\nIn addition, the other cloud drivers all provide the actual md5 hash when uploading or getting an object.  This allows the user to check if a file has changed online compared to locally.  The current master version provides the etag value as the \"hash\" attribute (interestingly with literal quotes around the tag: `'\"0xFFFFFFFFFFFFFFF\"'`) which is not compatible with the other drivers.\r\n\r\nReplace this with the PR description (mention the changes you have made, why\r\nyou have made them, provide some background and any references to the provider\r\ndocumentation if needed, etc.).\r\n\r\nI am assuming that these are both bugs and not design decisions (if so feel free to close this request).\r\n\r\n### Status\r\n\r\n- done, ready for review\r\n\r\n### Checklist (tick everything that applies)\r\n\r\n- [x] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide) (required, can be done after the PR checks)\r\n- [ ] Documentation\r\n- [x] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)\r\n- [ ] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes) (required for bigger changes)\r\n"},"comment":{"url":"https://api.github.com/repos/apache/libcloud/issues/comments/385878061","html_url":"https://github.com/apache/libcloud/pull/1202#issuecomment-385878061","issue_url":"https://api.github.com/repos/apache/libcloud/issues/1202","id":385878061,"user":{"login":"pquentin","id":42327,"avatar_url":"https://avatars1.githubusercontent.com/u/42327?v=4","gravatar_id":"","url":"https://api.github.com/users/pquentin","html_url":"https://github.com/pquentin","followers_url":"https://api.github.com/users/pquentin/followers","following_url":"https://api.github.com/users/pquentin/following{/other_user}","gists_url":"https://api.github.com/users/pquentin/gists{/gist_id}","starred_url":"https://api.github.com/users/pquentin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pquentin/subscriptions","organizations_url":"https://api.github.com/users/pquentin/orgs","repos_url":"https://api.github.com/users/pquentin/repos","events_url":"https://api.github.com/users/pquentin/events{/privacy}","received_events_url":"https://api.github.com/users/pquentin/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T06:33:35Z","updated_at":"2018-05-02T06:33:35Z","author_association":"CONTRIBUTOR","body":"Thanks! So you tested the storage driver, but not the compute driver, right?\r\n\r\nTo trigger the real API, there's the secrets.py file, but it does not appear to be supported by the storage tests. I don't know if there's a way to automatically save the actual answers, but I don't think there is.\r\n\r\n@tetron @ldipenti @mermoldy Do you think you could help us to make sure that the Azure compute driver still works with the new API version? Thanks!\r\n"}}
{"actor":{"display_login":"pquentin"}}