-
Notifications
You must be signed in to change notification settings - Fork 19
test: add additional integration tests for waved work applier manifest processing #244
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
test: add additional integration tests for waved work applier manifest processing #244
Conversation
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
|
Note: this PR is a follow-up to #234. |
|
Note: this PR includes commits from changes not yet checked in to avoid conflicts -> will rebase after #191 is merged. |
…o test/work-applier-parallel-processing
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…o test/work-applier-parallel-processing
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
| // Delete the Work object and related resources. | ||
| deleteWorkObject(workName, memberReservedNSName3) | ||
|
|
||
| // Remove the Role object if it still exists. |
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.
there are 3 "if it still exists" object deletions, which are Role, PriorityClass, ConfigMap. Are those supposed to be deleted by the controller after deleteWorkObject but in practice the controller failed to delete them? If so why?
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.
Hi Wei! This is a standard Ginkgo practice where we try to clean up the objects anyhow in the AfterAll block -> this make sures that even if the current test spec fails in-between, other tests can still run with no worries for alreadyExists types of errors (note that our Ginkgo setup allows parallelization and specs assigned to the same Ginkgo process may use the same namespace/resource names).
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.
Hi Wei! This is a standard Ginkgo practice where we try to clean up the objects anyhow in the AfterAll block -> this make sures that even if the current test spec fails in-between, other tests can still run with no worries for alreadyExists types of errors or any other side-effects (though admittedly the chances for this to occur in this specific integration test setup are quite low with the random suffix + the fact that envtest does not allow namespace GC).
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.
Thanks for explaining why cleanup is necessary!
I still have a question on why only need to clean up the role but not the namespace? From what I can see you applied both role and namespace to the member cluster but in the cleanup you explicitly delete the role only
I was thinking maybe deleteWorkObject handles the namespace cleanup. But then shouldn't deleteWorkObject also handle the role cleanup?
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.
Hi Wei! The reason why we do not clean up the namespace was that the envtest package we use for running integration tests do not support namespace deletion -> if the Work object includes a namespace manifest, after it is applied, it cannot be deleted (and the deletion won't trigger any errors, it's just stuck there) -> so there's no point in deleting the NS. In the environment we do not have GC controllers either so deleting the NS will not delete objects within in cascade.
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
Description of your changes
This PR adds additional integration tests for waved work applier manifest processing.
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
N/A
Special notes for your reviewer
N/A