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

Support customTime metadata and custom timestamp based OLM #196

Closed
jkwlui opened this issue Jun 25, 2020 · 2 comments · Fixed by #199
Closed

Support customTime metadata and custom timestamp based OLM #196

jkwlui opened this issue Jun 25, 2020 · 2 comments · Fixed by #199
Assignees
Labels
api: storage Issues related to the googleapis/python-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@jkwlui
Copy link
Member

jkwlui commented Jun 25, 2020

Request to support a new customTime metadata field and associated custom timestamp based OLM conditions:

bucket.add_lifecycle_delete_rule(
    days_since_custom_time=2, 
    custom_time_before=(datetime.now() + datetime.timedelta(days=10)))

# New metadata field:
blob = bucket.get_blob('object-name')
blob.custom_time = "2020-01-01T00:00:00Z"
blob.patch()
@jkwlui jkwlui added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Jun 25, 2020
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/python-storage API. label Jun 25, 2020
@HemangChothani HemangChothani self-assigned this Jun 26, 2020
@tseaver
Copy link
Contributor

tseaver commented Jul 21, 2020

@jkwlui ISTM we should treat custom_time as a datetime, rather than an RFC 3339 string.

@frankyn
Copy link
Member

frankyn commented Jul 21, 2020

There's a change coming to the API to only accept date instead of datetime. Pending an update from the GCS team. I'm the PoC for this feature moving forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/python-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants