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

feat(storage): add support of daysSinceNoncurrentTime and noncurrentTimeBefore #162

Merged
merged 21 commits into from Aug 25, 2020

Conversation

HemangChothani
Copy link
Contributor

Fixes #159

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 27, 2020
@HemangChothani HemangChothani changed the title Storage issue 159 feat(storage): add support of daysSinceNoncurrentTime and noncurrentTimeBefore May 27, 2020
@frankyn frankyn requested a review from jkwlui May 27, 2020 16:09
@frankyn frankyn added status: blocked Resolving the issue is dependent on other work. do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed status: blocked Resolving the issue is dependent on other work. labels May 27, 2020
@HemangChothani
Copy link
Contributor Author

@frankyn Should i change datetime object microsec to millisec as backend save the values in millisec? or any change expected from backend side.

@jkwlui
Copy link
Member

jkwlui commented Jun 4, 2020

@HemangChothani does the backend accept microsec? I think in general if the backend accepts it, we can take the easier path for our client and send the value directly.

Copy link
Member

@jkwlui jkwlui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please hold pending release.

@HemangChothani
Copy link
Contributor Author

HemangChothani commented Jun 5, 2020

@jkwlui The backend doesn't throw an error when time sent in microsecond, but when i have tried to retrieve the value it returned in millisecond.

@HemangChothani
Copy link
Contributor Author

@jkwlui PTAL! I have remove the custom method as backend accept and return the noncurrentTimeBefore value in microsecond.

Copy link
Member

@jkwlui jkwlui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please hold off from merging until we get approvals from the product side. Thank @HemangChothani!

google/cloud/storage/bucket.py Outdated Show resolved Hide resolved
tests/unit/test_bucket.py Outdated Show resolved Hide resolved
tests/unit/test_bucket.py Outdated Show resolved Hide resolved
@tseaver
Copy link
Contributor

tseaver commented Jul 21, 2020

@jkwlui The 1.29.0 release was made on 2020-06-11. Should this feature be unblocked?

@frankyn
Copy link
Member

frankyn commented Jul 21, 2020

Please don't merge this change. We have an adjustment for the requirements coming that need to be addressed both client side and server side before merging.

@busunkim96 busunkim96 closed this Jul 31, 2020
@busunkim96 busunkim96 reopened this Jul 31, 2020
Copy link
Member

@frankyn frankyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience @HemangChothani,

Update: The Cloud Storage team has updated type of noncurrent_time_before and custom_time to be a Date format (YYYY-mm-dd) instead of DateTime.

Discovery document with updated documentation with respect to these fields:
https://www.googleapis.com/discovery/v1/apis/storage/v1/rest

@HemangChothani
Copy link
Contributor Author

Update: The Cloud Storage team has updated type of noncurrent_time_before and custom_time to be a Date format (YYYY-mm-dd) instead of DateTime.

@frankyn That change has been already done.

@frankyn
Copy link
Member

frankyn commented Aug 14, 2020

Hey @HemangChothani I meant to say:

Update: The Cloud Storage team has updated type of noncurrentTimeBefore and customTimeBefore to be a Date format (YYYY-mm-dd) instead of DateTime.

Discovery document with updated documentation with respect to these fields:
https://www.googleapis.com/discovery/v1/apis/storage/v1/rest

Copy link
Member

@frankyn frankyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation nit, otherwise LGTM.

non current.

:type noncurrent_time_before: :class:`datetime.date`
:param noncurrent_time_before: (Optional) Date object parsed from iso8601 valid date, apply
Copy link
Member

@frankyn frankyn Aug 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use RFC3339 and provide an example: 2019-03-16

@frankyn frankyn removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 24, 2020
@frankyn frankyn merged commit 136c097 into googleapis:master Aug 25, 2020
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
…imeBefore (googleapis#162)

* feat(storage): add support of daysSinceNoncurrentTime and noncurrentTimeBefore

* feat(storage): fix code coverage

* feat(storage): add custom method to convert datetime to string

* feat(storage): remove custom method as server support microsec

* feat(storage): change the return type of noncurrent_time_before

* feat(storage): change non_current_time type from datetime to date

* feat: nit

Co-authored-by: Jonathan Lui <jonathanlui@google.com>
Co-authored-by: Frank Natividad <frankyn@users.noreply.github.com>
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
…imeBefore (googleapis#162)

* feat(storage): add support of daysSinceNoncurrentTime and noncurrentTimeBefore

* feat(storage): fix code coverage

* feat(storage): add custom method to convert datetime to string

* feat(storage): remove custom method as server support microsec

* feat(storage): change the return type of noncurrent_time_before

* feat(storage): change non_current_time type from datetime to date

* feat: nit

Co-authored-by: Jonathan Lui <jonathanlui@google.com>
Co-authored-by: Frank Natividad <frankyn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support daysSinceNoncurrentTime and noncurrentTimeBefore OLM options
6 participants