-
Notifications
You must be signed in to change notification settings - Fork 151
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
Remove useless e2e sleep time #1464
Remove useless e2e sleep time #1464
Conversation
b8c2208
to
7947ac1
Compare
can this common parts be factored out to some common place? |
Yep, working on some shared common test/helpers since there are many places that are pretty much copy paste |
/test opendatahub-operator-e2e |
1 similar comment
/test opendatahub-operator-e2e |
But you want it first, right? It brings inconstancy with the Deployments lookup above. Also, I would appreciate if you mentioned why it's correct (how the consistency is guaranteed), like due to ownership rules / finalizer after component CR removal it's guaranteed that no subdeployments left. |
It would love to, but it is still an ongoing effort and will take some more time to result in a acceptable PR :) . At this stage is more an exploration and there are quite a few things I'd like to clean up. My motivation for this PR is to remove that useless 20 seconds delay per component e2e, hence cutting 140 second from the overall e2e test execution.
True. I'm honestly not very sure about what is the intent of that check within the current shape of the operator, probably just a port of the old e2e tests were we didn't have a good object hierarchy, so checking the deployment was probably the only way to detect if a component was there or not. I probably could have done it without changing the deployment lookup, however it seems to be better to validate that all the deployments were removed instead of just one, which could swallow other issues. Let me know if you want me to revert this part and leave it for a future PR.
As part of the commit or in the code ? |
My bad in wording. "it" I meant "this PR".
Totally understandable. In my old rework try I at lest replaced all such wait "loops" with conditional wait. Was per-component check done in parallel?
I think so. But in the current shape it still makes sense from e2e prospective since it rechecks that the ownership chain is correct and whatever is planned working as expected.
Can both places be rewritten the same way?
Commit message. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1464 +/- ##
=======================================
Coverage ? 19.11%
=======================================
Files ? 158
Lines ? 10358
Branches ? 0
=======================================
Hits ? 1980
Misses ? 8154
Partials ? 224 ☔ View full report in Codecov by Sentry. |
7947ac1
to
af2b475
Compare
The tests to validate the correctness of the operator when components are disabled have been refactored to: 1. take into account all the component's deployments, not only the first one to avoid swallowing misbehavior 2. remove useless waiting time before checking the presence of component's deployments because within the introduction of the internal APIs, the object hierarchy now allow for a proper cleanup as all the object have a proper owner reference. The operator deletes the component API using foreground deletion policy hence once the top level component CR is removed, the all the owned objects should have been deleted too.
af2b475
to
f5bd0f4
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ykaliuta 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 opendatahub-operator-e2e |
1 similar comment
/test opendatahub-operator-e2e |
Description
The tests to validate the correctness of the operator when components
are disabled have been refactored to:
one to avoid swallowing misbehavior
component's deployments because within the introduction of the
internal APIs, the object hierarchy now allow for a proper cleanup as
all the object have a proper owner reference. The operator deletes
the component API using foreground deletion policy hence once the top
level component CR is removed, the all the owned objects should have
been deleted too.
How Has This Been Tested?
Screenshot or short clip
Merge criteria
Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).