[DataLake][SetExpiry]Set Expiry of DataLake File#11629
Closed
xiafu-msft wants to merge 5 commits intoAzure:feature/storage-stg73from
Closed
[DataLake][SetExpiry]Set Expiry of DataLake File#11629xiafu-msft wants to merge 5 commits intoAzure:feature/storage-stg73from
xiafu-msft wants to merge 5 commits intoAzure:feature/storage-stg73from
Conversation
* [Blob][Swagger]Regenerate Swagger Code * fix container test failure caused by list_containers include type change
* initial avro parser
* try fixing test...
* falling in love with python compatibility...
* make linter happy.
* raise StopIteration when there is no more bytes instead of tracking file length.
* async avro parser
* fix syntax for Python 3.5
* get rid of 'readers_schema' as we only honor schema that has been written to file ('writer_schema').
* pr feedback
* trim unused code.
* pr feedback.
* simplify skip sync in next.
* move avro tests from _shared.
* wip * initial test coverage. * wip. * wip * single upload. * add async tests. * disable 50k block tests. * datalake append. * async datalake * disable tests that send large payload over network. * pr feedback.
rakshith91
reviewed
May 27, 2020
| process_storage_error(error) | ||
| blob_props.name = self.blob_name | ||
| blob_props.container = self.container_name | ||
| if isinstance(blob_props, BlobProperties): |
Contributor
There was a problem hiding this comment.
Please use
try:
##
except AttributeError:
###
If mypy is complaining, use cast()
rakshith91
reviewed
May 27, 2020
| process_storage_error(error) | ||
| blob_props.name = self.blob_name | ||
| blob_props.container = self.container_name | ||
| if isinstance(blob_props, BlobProperties): |
Contributor
There was a problem hiding this comment.
same here
interesting read about why - Easier to ask for forgiveness than permission
rakshith91
reviewed
May 27, 2020
| return self._get_path_properties(cls=FileProperties._deserialize_file_properties, **kwargs) # pylint: disable=protected-access | ||
|
|
||
| def set_file_expiry(self, expiry_options, expires_on=None, **kwargs): | ||
| # type: (**Any) -> None |
rakshith91
reviewed
May 27, 2020
| self.lease = None | ||
| self.last_modified = None | ||
| self.creation_time = None | ||
| self.metadata = kwargs.get('metadata') |
Contributor
There was a problem hiding this comment.
should these all be kwargs.get('metadata', None)
Member
There was a problem hiding this comment.
That's not needed - get already returns None by default.
rakshith91
reviewed
May 27, 2020
| self.state = None | ||
| self.duration = None | ||
| def __init__(self, **kwargs): | ||
| super(LeaseProperties, self).__init__( |
Contributor
There was a problem hiding this comment.
i dont think this init is needed to just call the super
rakshith91
reviewed
May 27, 2020
| return await self._get_path_properties(cls=FileProperties._deserialize_file_properties, **kwargs) # pylint: disable=protected-access | ||
|
|
||
| async def set_file_expiry(self, expiry_options, expires_on=None, **kwargs): | ||
| # type: (**Any) -> None |
rakshith91
suggested changes
May 27, 2020
Contributor
rakshith91
left a comment
There was a problem hiding this comment.
Thanks, just a few minor comments :)
a4f697b to
60ada0b
Compare
Merged
openapi-sdkautomation bot
pushed a commit
to AzureSDKAutomation/azure-sdk-for-python
that referenced
this pull request
Nov 15, 2020
openapi-sdkautomation bot
pushed a commit
to AzureSDKAutomation/azure-sdk-for-python
that referenced
this pull request
Nov 15, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.