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

event.DeleteEvent struct's "DeleteStateUnknown" field is never written #654

Closed
seh opened this issue Oct 21, 2019 · 13 comments
Closed

event.DeleteEvent struct's "DeleteStateUnknown" field is never written #654

seh opened this issue Oct 21, 2019 · 13 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Milestone

Comments

@seh
Copy link

seh commented Oct 21, 2019

The event.DeleteEvent type has a field called "DeleteStateUnknown," documented as follows:

DeleteStateUnknown is true if the Delete event was missed but we identified the object as having been deleted.

At present, this field is never written to, and nothing in the controller-runtime library reads it either. This field entered the source back in #2, on 7 June 2018, copying the code from the kubernetes-sigs/kubebuilder project.

Per discussion in the "kubebuilder" channel in the "Kubernetes" Slack team, @pwittrock suggested that perhaps we should use this field, writing to it when appropriate, rather than removing it from the library, which would require a major version change to avoid breaking current Predicates.

Not being sure of the original intention for this field, it looks like the source/internal.EventHandler.OnDelete method might be a fitting place, to indicate that we found a cache.DeleteFinalStateUnknown object in the cache, indicating that we missed a deleting watch event and might therefore have only a stale object available.

For Reconcilers, if I understand the contract correctly, the distinction seems immaterial, as by the time they would go to inspect the object, it would be gone anyway; only its name and possibly its containing namespace would be presented to the Reconciler. However, other event handlers—and Predicates that precede them—would get a chance to see this tombstone object.

Should we populate this field? If so, where and when? Does its documentation adequately explain its meaning?

@DirectXMan12
Copy link
Contributor

can we get some context from k/k? I don't remember what our intention was with that field, but the tombstone logic sits in a bit of a minefield of weird artifacts ported from k/k.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 3, 2020
@vincepri
Copy link
Member

/priority awaiting-more-evidence
/help

@k8s-ci-robot
Copy link
Contributor

@vincepri:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/priority awaiting-more-evidence
/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Feb 21, 2020
@vincepri vincepri added this to the Next milestone Feb 21, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 22, 2020
@seh
Copy link
Author

seh commented Mar 22, 2020

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Mar 22, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 20, 2020
@vincepri
Copy link
Member

@seh Were you able to get more information from k/k?

@seh
Copy link
Author

seh commented Jun 22, 2020

No, sorry, I didn't find anything telling when I last looked into it.

@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 22, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Mitsuwa
Copy link

Mitsuwa commented Jun 2, 2022

Does this field actually do anything? I have also noticed that it doesn't seem to populate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

6 participants