Skip to content
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

Fix common-instancetypes func tests with HCO #952

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lyarwood
Copy link
Member

/cc @0xFelix

What this PR does / why we need it:

The functional tests currently assume that SSP is deployed standalone without HCO. However these same tests are also used downstream in a slightly different context where we initially deploy the environment using HCO. As such the common-instancetypes tests are invalid and need to be skipped. This series adds some limited coverage for this scenario ensuring that SSP ignores the virt-operator deployed resources.

More comprehensive coverage needs to be added to HCO to assert the default behaviour of virt-operator and ssp-operator in environments where HCO is still actively reconciling both.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Release note:

NONE

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
This change explicitly disables common-instancetype deployment during
our tests in environments deployed by HCO to avoid the virt-operator and
ssp-operator from fighting over ownership.

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
This change adds basic coverage when SSP is deployed by HCO with the FG
disabled. Asserting that SSP does not reclaim ownership from
virt-operator of any common-instancetype resources.

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Apr 11, 2024
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from lyarwood. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link

sonarcloud bot commented Apr 11, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@lyarwood
Copy link
Member Author

/retest-required

Copy link
Member

@0xFelix 0xFelix left a comment

Choose a reason for hiding this comment

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

Not sure this is the right approach. Can't we make sure to set the appropriate FGs during the tests and reset them to their original value after the tests ran? The functionality is there and a user could still choose to enable it by modifying the FGs with jsonpatch annotations on HCO's CR.

Of course this won't work if HCO keeps reconciling them, but I don't think the test is at fault when HCO interferes with it.

@lyarwood
Copy link
Member Author

Not sure this is the right approach. Can't we make sure to set the appropriate FGs during the tests and reset them to their original value after the tests ran? The functionality is there and a user could still choose to enable it by modifying the FGs with jsonpatch annotations on HCO's CR.

Of course this won't work if HCO keeps reconciling them, but I don't think the test is at fault when HCO interferes with it.

Yeah fair point, with HCO disabled we can just disable the KV FG for virt-operator deployment in a BeforeAll and restore in AfterAll. That should allow these tests to work regardless of HCO being involved in the initial deployment. I guess we should also wait for virt-operator to clean up these resources? Let me rework this.

/hold

@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 12, 2024
Copy link

openshift-ci bot commented Apr 12, 2024

@lyarwood: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-upgrade-functests a6bd686 link true /test e2e-upgrade-functests
ci/prow/e2e-single-node-functests a6bd686 link true /test e2e-single-node-functests

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note-none Denotes a PR that doesn't merit a release note. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants