Conversation
lukesneeringer
commented
Oct 5, 2021
| @@ -0,0 +1,39 @@ | |||
| # Resource expiration | |||
|
|
|||
| Customers often want to provide the time that a given resource or attribute of | |||
Contributor
Author
There was a problem hiding this comment.
- @lukesneeringer: Emphasize customer-provided expiry times.
lukesneeringer
commented
Oct 5, 2021
| Services **must** always return the expiration time in the `expire_time` field | ||
| and leave the `ttl` field blank when retrieving the resource. | ||
|
|
||
| Services that rely on the specific semantics of a "time to live" (e.g., DNS |
Contributor
Author
There was a problem hiding this comment.
- Discussion: What about if someone really needs a period string (like what is in AIP-142)?
- @lukesneeringer: What did we even say in AIP-142? (went to look)
- We said ints preferred, ISO 8601 period strings allowed.
- Discussion about what happens with a period string of one day that crosses DST.
- Consensus: Ints (seconds) are preferred, named
ttl_seconds. If you really need period strings, specify that they are offset using UTC with daylight savings ignored. Minutes, hours are acceptable, anything larger (not fixed length) is advised against.- @lukesneeringer: Days should be fine, right?
- @jskeet: Daylight savings
- @lukesneeringer: I assert that when you use
foo_days, you are measuring in numbers like 30, 60, 90, and probably DST does not matter anymore. - @jskeet: We should warn people, but I think I agree.
- Consensus: Ints preferred (seconds, days, hours, minutes), named accordingly. Period strings allowed. Offset UTC, DST ignored.
- @lukesneeringer: What did we even say in AIP-142? (went to look)
Contributor
Author
There was a problem hiding this comment.
Update AIP-142 similarly re: canonical unit being {days, hours, minutes, seconds}.
lukesneeringer
commented
Oct 5, 2021
aip/general/0214/expiry.oas.yaml
Outdated
| description: | | ||
| The name of the book. | ||
| Format: publishers/{publisher}/books/{book} | ||
| expire_time: |
Contributor
Author
There was a problem hiding this comment.
- @rhamiltonsf: Why is this a property of the resource? Should it maybe be a header?
- The
Expiresheader works well here. - @lukesneeringer: Works for reading. How do you specify?
- Seems like you could send an
Expiresheader on PATCH/PUT.
- Seems like you could send an
- @jskeet: I want to challenge the assertion that the expire time is not a property of the resource. I defer to others in the room about HTTP knowledge, but I think the
Expiresheader refers to the expiry of the response, not the expiry of the resource. - @rhamiltonsf: This is a good point. You have identified two different ways to use
Expires.
- The
- Consensus: This AIP is not about messaging, it is about the resource itself, which will get expunged from the system. Property of the resource is correct, but we need to make it more clear what the AIP covers.
mkistler
approved these changes
Oct 30, 2022
mkistler
left a comment
There was a problem hiding this comment.
Looks good. 👍
I changed the oas example to more consistent with the protobuf one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.