hierarchical-namespaces icon indicating copy to clipboard operation
hierarchical-namespaces copied to clipboard

Subtree usage updated when namespace is removed from subtree

Open mzeevi opened this issue 2 years ago • 2 comments

See issue #214. Previously, when the parent of the full namespace in a subtree was changed, the subtree usage was not properly updated and the usgae in the HRQ object was not accounting for the decrease in usage. In this fix, when a parent changes, the local usage of resources is zeroed and the subtree usage is recalculated without the full namespace usage.

Tested: e2e-testing covering a scenario where a full namespace is the child of a subnamespace and when the full namespace's parents is changed to root, the subtree usages is checked to make sure it is correct.

Signed-off-by: mzeevi [email protected]

mzeevi avatar Aug 02 '22 19:08 mzeevi

Hi @mzeevi. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 avatar Aug 02 '22 19:08 k8s-ci-robot

Thanks @adrianludwin, I made a new commit as per your suggestions, please take a look. All tests passed.

mzeevi avatar Aug 22 '22 09:08 mzeevi

Made a new commit and amended the e2e testing to also test this.

mzeevi avatar Aug 23 '22 08:08 mzeevi

Integ testing should now be able to run properly. @adrianludwin

mzeevi avatar Aug 24 '22 15:08 mzeevi

[APPROVALNOTIFIER] This PR is APPROVED

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

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 avatar Aug 25 '22 02:08 k8s-ci-robot

@mzeevi looks great, thanks for this change. I'd like to give Ryan a chance to review, but if he doesn't have a chance to do it within about a day, feel free to remove the hold so this can go in.

adrianludwin avatar Aug 25 '22 02:08 adrianludwin

Thanks @adrianludwin. I'm happy to wait on Ryan if he'd like to give it a second look

mzeevi avatar Aug 25 '22 08:08 mzeevi

@rjbez17 lmk if you have any concerns about this but for now I think this is good to go. Thanks!

/hold cancel

adrianludwin avatar Aug 29 '22 02:08 adrianludwin