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

AIP-{135,165}: Add guidance in delaying purges after soft deletions #1230

Open
glerchundi opened this issue Sep 28, 2023 · 0 comments
Open

Comments

@glerchundi
Copy link

glerchundi commented Sep 28, 2023

We're designing our {Delete,Undelete}Resource methods and we found that there is an interesting use case in which exposing the ability to choose when the resource would be purged is valid.

While doing a research about this configurability we found that there was an example in the current Google APIs that are doing exactly what we were thinking/designing. The exact reference can be found here: https://github.com/googleapis/googleapis/blob/5601ad3a999d857a2a1087927a18159ae778c702/google/cloud/vmwareengine/v1/vmwareengine.proto#L756

And this is what it says:

// Optional. Time delay of the deletion specified in hours. The default value
// is `3`. Specifying a non-zero value for this field changes the value of
// `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned
// deletion time. Deletion can be cancelled before `expire_time` elapses using
// [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud].
// Specifying a value of `0` for this field instead begins the deletion
// process and ceases billing immediately. During the final deletion process,
// the value of `PrivateCloud.state` becomes `PURGING`.
optional int32 delay_hours = 4 [(google.api.field_behavior) = OPTIONAL];

But the AIP-135 says something that we took with a grain of salt but

The request message must not contain any other required fields, and should not contain other optional fields except those described in this or another AIP.

The AIP about soft-deletion (AIP-165) doesn't clarify anything in this matter either. So, what we're requesting here is if we can add guidance and proposal about a new optional parameter within the DeleteResourceRequest message which allow us configuring the time it would take before the purging. Something along the lines of the delay_hours proposed by the reference I put above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant