-
Notifications
You must be signed in to change notification settings - Fork 187
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
Allow deleting suspended objects #937
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @darkowlzz
Looks like main brach is broken as well:
|
Seems to be because of git2go panic, which is resulting in a different status condition. Also, only panicking on macOS 11. |
Ok we can ignore the panic then, it's not something we can fix in this PR. |
Add setters and getters for spec.suspend and status.artifact. This is needed for writing generic tests for any source kind. Signed-off-by: Sunny <darkowlzz@protonmail.com>
Reorders the object suspended check in all the reconcilers to allow deletion of objects when they are suspended. Objects used to get stuck on delete because the finalizers were not getting removed due to the suspended state. Adds a generic test for all the reconcilers to check if a suspended source object can be delete. Signed-off-by: Sunny <darkowlzz@protonmail.com>
eef1691
to
15cdd85
Compare
Reorders the object suspended check in all the reconcilers to allow
deletion of objects when they are suspended. Objects used to get stuck
on delete because the finalizers were not getting removed due to the
suspended state.
Add setters and getters for
spec.suspend
andstatus.artifact
ininternal/object
package.This is needed for writing generic tests for any source kind.
Adds a generic test for all the reconcilers to check if a suspended
source object can be delete.
Some observations related to the metrics:
When a suspended object is created, finalizer is set and status.observedGeneration remains in -1.
With prometheus query
gotk_reconcile_condition{kind=~"GitRepository",name="podinfo3"}==1
, following are the observed metrics:status=Ready when the object is suspended again, same as above.
status=Deleted when the suspended object is deleted
Fixes #934