Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Refactor adding/removing/contains finalizers #203

Merged
merged 1 commit into from
Apr 24, 2022

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Apr 19, 2022

To be able to distinguish between updating just the status and updating the full resource (in a follow-up PR). A controller should just update the status of the controlling resource, with some exceptions - i.e. finalizers. Currently HNC always updates the complete resource, and not just the status, and this has to be fixed to open up for #142.

Tested: Ran both unit-tests ('make test') and integration test ('make test-e2e') successfully.

Relates to #200.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 19, 2022
@k8s-ci-robot k8s-ci-robot requested review from rjbez17 and srampal April 19, 2022 20:48
@adrianludwin
Copy link
Contributor

I'm not really seeing how this change improves the organization of the finalizers? It replaces some custom code with a slightly safe utility function but that's it, AIUI. I'm ok with the change (other than one caveat) but I'm wondering if I missed something in the review, or if this PR was supposed to include something that got lost somehow?

@erikgb erikgb force-pushed the improve/finalizers branch from bb33c3d to ba82ef0 Compare April 22, 2022 20:11
@erikgb erikgb changed the title Better organize adding/removing finalizers Refactor adding/removing finalizers Apr 22, 2022
@erikgb
Copy link
Contributor Author

erikgb commented Apr 22, 2022

Ok, take 2 ready. PTAL!

@erikgb erikgb changed the title Refactor adding/removing finalizers Refactor adding/removing/contains finalizers Apr 22, 2022
Copy link
Contributor

@adrianludwin adrianludwin left a comment

Choose a reason for hiding this comment

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

One last change and then lgtm.

To be able to distinguish between updating just the status and updating the full resource in a follow-up PR.

Tested: Ran both unit-tests ('make test') and integration test ('make test-e2e') successfully.
@erikgb erikgb force-pushed the improve/finalizers branch from ba82ef0 to 811b9aa Compare April 24, 2022 17:08
Copy link
Contributor

@adrianludwin adrianludwin left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@adrianludwin adrianludwin added this to the release-v1.1 milestone Apr 24, 2022
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 24, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianludwin, erikgb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 24, 2022
@k8s-ci-robot k8s-ci-robot merged commit 185c46b into kubernetes-retired:master Apr 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants