-
Notifications
You must be signed in to change notification settings - Fork 156
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
Conversation
…into storage_issue_159
@frankyn Should i change datetime object microsec to millisec as backend save the values in millisec? or any change expected from backend side. |
@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. |
There was a problem hiding this 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.
@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. |
…into storage_issue_159
…into storage_issue_159
…into storage_issue_159
@jkwlui PTAL! I have remove the custom method as backend accept and return the |
There was a problem hiding this 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!
@jkwlui The 1.29.0 release was made on 2020-06-11. Should this feature be unblocked? |
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. |
There was a problem hiding this 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
@frankyn That change has been already done. |
…into storage_issue_159
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: |
…into storage_issue_159
There was a problem hiding this 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.
google/cloud/storage/bucket.py
Outdated
non current. | ||
|
||
:type noncurrent_time_before: :class:`datetime.date` | ||
:param noncurrent_time_before: (Optional) Date object parsed from iso8601 valid date, apply |
There was a problem hiding this comment.
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
…-storage into storage_issue_159
…into storage_issue_159
…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>
…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>
Fixes #159