Skip to content
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.

Optional finalizers #118

Merged
merged 12 commits into from
Jul 3, 2019

Conversation

dlmiddlecote
Copy link
Contributor

@dlmiddlecote dlmiddlecote commented Jun 16, 2019

Issue : #24

Description

Adding finalizers to resources means that resources cannot be deleted if the operator is not running. This PR makes sure that finalizers are added only when strictly necessary, i.e. when there are mandatory deletion handlers. If there are no deletion handlers registered, then no finalizers will be added, same if a deletion handler is marked as optional.

Types of Changes

What types of changes does your code introduce? Keep the ones that apply:

  • New feature (non-breaking change which adds functionality)
  • Documentation / non-code

Tasks

List of tasks you will do to complete the PR

  • Add documentation

Review

List of tasks the reviewer must do to review the PR

  • Tests
  • Documentation

@zincr
Copy link

zincr bot commented Jun 16, 2019

🤖 zincr found 0 problems , 0 warnings

✅ Large Commits
✅ Approvals
✅ Specification
✅ Dependency Licensing

Copy link
Contributor

@nolar nolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR! Here are some notes on the code itself.

The solution should work in general. Except maybe for the case with initial & CREATE detection — I have some doubts there for some cases (see comments).

I will test the functionality manually maybe in the next 1-2 days — to get the feel of how it behaves in all typical & edge cases, and if there are any "surprises" from the user point of view (though I expect none).

kopf/on.py Outdated Show resolved Hide resolved
kopf/reactor/causation.py Outdated Show resolved Hide resolved
kopf/reactor/handling.py Outdated Show resolved Hide resolved
kopf/reactor/registries.py Outdated Show resolved Hide resolved
@dlmiddlecote
Copy link
Contributor Author

Thank you for your review! I’ll get onto making the changes ASAP.

nolar
nolar previously approved these changes Jun 19, 2019
docs/handlers.rst Outdated Show resolved Hide resolved
@nolar
Copy link
Contributor

nolar commented Jun 26, 2019

@dlmiddlecote Just for information regarding delay: All is okay with this PR. I will merge it a bit later. There is a little issue in the master branch (merged, but not released yet), which I would like to fix and release as a separate version without any intermediate merges; and also to keep the releases' deltas small.

@nolar nolar merged commit a09a748 into zalando-incubator:master Jul 3, 2019
@nolar nolar added the enhancement New feature or request label Oct 22, 2019
@kopf-archiver kopf-archiver bot mentioned this pull request Aug 19, 2020
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants