You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by GitBox <gi...@apache.org> on 2020/01/10 20:58:33 UTC
[GitHub] [libcloud] c-w opened a new pull request #1408: Implement SAS URL
generation for Azure Storage
c-w opened a new pull request #1408: Implement SAS URL generation for Azure Storage
URL: https://github.com/apache/libcloud/pull/1408
## Implement SAS URL generation for Azure Storage
### Description
As discussed in https://github.com/apache/libcloud/issues/1403, this pull request implements `StorageDriver.get_object_cdn_url` via a [service SAS](https://docs.microsoft.com/en-us/rest/api/storageservices/create-service-sas#construct-a-service-sas).
### Status
- done, ready for review
### Checklist
- [x] Code linting ([build passed](https://travis-ci.org/CatalystCode/libcloud/builds/635449613))
- [ ] Documentation (**TODO: update changelog**)
- [x] Tests ([e2e tests passed](https://clewolff.visualstudio.com/libcloud-tests/_build/results?buildId=682))
- [x] ICLA ([committer](https://people.apache.org/phonebook.html?uid=clewolff))
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [libcloud] c-w merged pull request #1408: Implement SAS URL
generation for Azure Storage
Posted by GitBox <gi...@apache.org>.
c-w merged pull request #1408: Implement SAS URL generation for Azure Storage
URL: https://github.com/apache/libcloud/pull/1408
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [libcloud] c-w commented on a change in pull request #1408:
Implement SAS URL generation for Azure Storage
Posted by GitBox <gi...@apache.org>.
c-w commented on a change in pull request #1408: Implement SAS URL generation for Azure Storage
URL: https://github.com/apache/libcloud/pull/1408#discussion_r366350129
##########
File path: libcloud/storage/drivers/azure_blobs.py
##########
@@ -489,6 +503,70 @@ def get_object(self, container_name, object_name):
raise ObjectDoesNotExistError(value=None, driver=self,
object_name=object_name)
+ def get_object_cdn_url(self, obj,
+ ex_expiry=AZURE_STORAGE_CDN_URL_EXPIRY_HOURS):
Review comment:
I'll take a note to work on a follow-up PR with type annotations for the storage API.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [libcloud] codecov-io edited a comment on issue #1408: Implement
SAS URL generation for Azure Storage
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #1408: Implement SAS URL generation for Azure Storage
URL: https://github.com/apache/libcloud/pull/1408#issuecomment-573204439
# [Codecov](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=h1) Report
> Merging [#1408](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=desc) into [trunk](https://codecov.io/gh/apache/libcloud/commit/435d82b89665c265b76744760152059f713e3b3c?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/libcloud/pull/1408/graphs/tree.svg?width=650&token=PYoduksh69&height=150&src=pr)](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## trunk #1408 +/- ##
==========================================
+ Coverage 86.44% 86.45% +<.01%
==========================================
Files 366 366
Lines 76767 76785 +18
Branches 7529 7529
==========================================
+ Hits 66365 66383 +18
Misses 7534 7534
Partials 2868 2868
```
| [Impacted Files](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [libcloud/test/storage/test\_azure\_blobs.py](https://codecov.io/gh/apache/libcloud/pull/1408/diff?src=pr&el=tree#diff-bGliY2xvdWQvdGVzdC9zdG9yYWdlL3Rlc3RfYXp1cmVfYmxvYnMucHk=) | `94.34% <100%> (+0.07%)` | :arrow_up: |
| [libcloud/storage/drivers/azure\_blobs.py](https://codecov.io/gh/apache/libcloud/pull/1408/diff?src=pr&el=tree#diff-bGliY2xvdWQvc3RvcmFnZS9kcml2ZXJzL2F6dXJlX2Jsb2JzLnB5) | `85.62% <100%> (+0.53%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=footer). Last update [435d82b...885bc52](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [libcloud] codecov-io commented on issue #1408: Implement SAS URL
generation for Azure Storage
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #1408: Implement SAS URL generation for Azure Storage
URL: https://github.com/apache/libcloud/pull/1408#issuecomment-573204439
# [Codecov](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=h1) Report
> Merging [#1408](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=desc) into [trunk](https://codecov.io/gh/apache/libcloud/commit/f176f5b8b2b50162f68d4a1f1cb456b8d09e70a2?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/libcloud/pull/1408/graphs/tree.svg?width=650&token=PYoduksh69&height=150&src=pr)](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## trunk #1408 +/- ##
==========================================
+ Coverage 86.44% 86.45% +<.01%
==========================================
Files 366 366
Lines 76767 76785 +18
Branches 7529 7529
==========================================
+ Hits 66365 66383 +18
Misses 7534 7534
Partials 2868 2868
```
| [Impacted Files](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [libcloud/test/storage/test\_azure\_blobs.py](https://codecov.io/gh/apache/libcloud/pull/1408/diff?src=pr&el=tree#diff-bGliY2xvdWQvdGVzdC9zdG9yYWdlL3Rlc3RfYXp1cmVfYmxvYnMucHk=) | `94.34% <100%> (+0.07%)` | :arrow_up: |
| [libcloud/storage/drivers/azure\_blobs.py](https://codecov.io/gh/apache/libcloud/pull/1408/diff?src=pr&el=tree#diff-bGliY2xvdWQvc3RvcmFnZS9kcml2ZXJzL2F6dXJlX2Jsb2JzLnB5) | `85.62% <100%> (+0.53%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=footer). Last update [f176f5b...dfc2321](https://codecov.io/gh/apache/libcloud/pull/1408?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [libcloud] Kami commented on a change in pull request #1408:
Implement SAS URL generation for Azure Storage
Posted by GitBox <gi...@apache.org>.
Kami commented on a change in pull request #1408: Implement SAS URL generation for Azure Storage
URL: https://github.com/apache/libcloud/pull/1408#discussion_r366147905
##########
File path: libcloud/storage/drivers/azure_blobs.py
##########
@@ -489,6 +503,70 @@ def get_object(self, container_name, object_name):
raise ObjectDoesNotExistError(value=None, driver=self,
object_name=object_name)
+ def get_object_cdn_url(self, obj,
+ ex_expiry=AZURE_STORAGE_CDN_URL_EXPIRY_HOURS):
Review comment:
Going forward, we can also start adding type annotations for various method arguments in the drivers when we introduce new functionality.
We now don't support Python 2.7 anymore, but perhaps we should still start with type annotations in the comments and move to putting them directly into the method signatures in the future.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services