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

@HemangChothani HemangChothani commented May 27, 2020

Fixes #159

@HemangChothani HemangChothani requested a review from frankyn 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
@HemangChothani
Copy link
Contributor Author

@HemangChothani HemangChothani commented May 28, 2020

@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 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

Please hold pending release.

@HemangChothani
Copy link
Contributor Author

@HemangChothani 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

@HemangChothani HemangChothani commented Jun 23, 2020

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

jkwlui
jkwlui approved these changes Jul 7, 2020
Copy link
Member

@jkwlui jkwlui left a comment

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 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 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

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

@HemangChothani HemangChothani commented Aug 13, 2020

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 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

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

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

@frankyn frankyn merged commit 136c097 into googleapis:master Aug 25, 2020
4 checks passed
cojenco added a commit to cojenco/python-storage that referenced this issue 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 added a commit to cojenco/python-storage that referenced this issue 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants