Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

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

Merged
frankyn merged 21 commits into
googleapis:masterfrom
MaxxleLLC:storage_issue_159
Aug 25, 2020
Merged

feat(storage): add support of daysSinceNoncurrentTime and noncurrentTimeBefore#162
frankyn merged 21 commits into
googleapis:masterfrom
MaxxleLLC:storage_issue_159

Conversation

@HemangChothani

Copy link
Copy Markdown
Contributor

Fixes#159

@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label May 27, 2020
@HemangChothaniHemangChothani changed the title Storage issue 159feat(storage): add support of daysSinceNoncurrentTime and noncurrentTimeBeforeMay 27, 2020
@frankyn
frankyn requested a review from jkwluiMay 27, 2020 16:09
@frankynfrankyn 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
Copy Markdown
ContributorAuthor

@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
Copy Markdown
Contributor

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

@jkwluijkwlui left a comment

Copy link
Copy Markdown
Contributor

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

HemangChothani commented Jun 5, 2020

Copy link
Copy Markdown
ContributorAuthor

@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
Copy Markdown
ContributorAuthor

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

@jkwluijkwlui left a comment

Copy link
Copy Markdown
Contributor

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!

Comment threadgoogle/cloud/storage/bucket.py Outdated
Comment threadtests/unit/test_bucket.py Outdated
Comment threadtests/unit/test_bucket.py Outdated
@tseaver

Copy link
Copy Markdown
Contributor

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

@frankyn

Copy link
Copy Markdown
Contributor

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.

@frankynfrankyn left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
Contributor

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

@frankynfrankyn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Documentation nit, otherwise LGTM.

Comment threadgoogle/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

@frankynfrankynAug 24, 2020

Copy link
Copy Markdown
Contributor

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

@frankynfrankyn 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:masterAug 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>
@release-pleaserelease-pleaseBot mentioned this pull request Jan 12, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yesThis 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

@HemangChothani@jkwlui@tseaver@frankyn@googlebot@busunkim96