-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Improve E2E ValidateFinalizers and ValidateOwnerRef #10693
🌱 Improve E2E ValidateFinalizers and ValidateOwnerRef #10693
Conversation
/test pull-cluster-api-e2e-main |
In general lgtm so far |
/retest |
/test pull-cluster-api-e2e-main |
@@ -125,7 +127,11 @@ func getObjectsWithFinalizers(ctx context.Context, proxy ClusterProxy, namespace | |||
|
|||
if len(setFinalizers) > 0 { |
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.
(I'm aware this was the same before)
This only validates finalizers if there are actually finalizers on the object, which means missing finalizers are accepted
Do I understand it correctly that basically we assume the finalizers are correct the first time we call getObjectsWithFinalizers and then in assertFinalizersExist we would detect if a finalizer is missing compared to the first time we retrieved them?
(So tl;dr: if finalizers are set, we verify that they are the expected ones and in addition we test that they are re-added after we remove them ("resilience"))
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.
That's correct.
I have noticed this as well and now it should be fixed (we also check for missing finalizers + we check for additional finalizers that can pop up after we remove them)
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.
Thx, nice one!
/test pull-cluster-api-e2e-main |
/lgtm |
LGTM label has been added. Git tree hash: c075fb1da5bac52225f86a72e4239c2746b3ce95
|
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.
One optional nit
/approve
/hold in case you want to change something at the comment
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrischdi 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 |
/test pull-cluster-api-e2e-main |
2 similar comments
/test pull-cluster-api-e2e-main |
/test pull-cluster-api-e2e-main |
/lgtm |
LGTM label has been added. Git tree hash: e02c64a1e5aa7422c58921832da8d3c7b014ded7
|
/lgtm |
Either this or: Made e2e mink8s fail: https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api#capi-e2e-mink8s-main Edit: seemed to be a flake. |
|
What this PR does / why we need it:
This PR improves ValidateFinalizers and ValidateOwnerRef so the functions in input can get the namespaced name of the objects being processed.
This allows to handle differently e.g. secrets with CAPI certificate and secrets with cloud provider credentials
/area e2e-testing