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

Do not require nodemediatedDeviceTypes to prevent broken upgrades #2534

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

tiraboschi
Copy link
Member

What this PR does / why we need it:
With #2402 we deprecated MediatedDevicesTypes and
NodeMediatedDeviceTypes.MediatedDevicesTypes for
MediatedDeviceTypes and NodeMediatedDeviceTypes.MediatedDeviceTypes. We also introduced a mutating webhook to handle the conversion. Unfortunately make the two new names mandatory is breaking the validation of the new version of the CRD on OLM upgrades since only the previous names were there with the old CRD.

We already have func test covering this area,
but they are fooled by the mutating webhook that
instead is not involved into the CRD validation process on the OLM side.
On the other side, add an additional upgrade lane just for this is probably too expensive.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=2241327

Reviewer Checklist

Reviewers are supposed to review the PR for every aspect below one by one. To check an item means the PR is either "OK" or "Not Applicable" in terms of that item. All items are supposed to be checked before merging a PR.

  • PR Message
  • Commit Messages
  • How to test
  • Unit Tests
  • Functional Tests
  • User Documentation
  • Developer Documentation
  • Upgrade Scenario
  • Uninstallation Scenario
  • Backward Compatibility
  • Troubleshooting Friendly

Jira Ticket:

https://issues.redhat.com/browse/CNV-33570

Release note:

Do not require nodemediatedDeviceTypes to prevent broken upgrades

With kubevirt#2402 we deprecated MediatedDevicesTypes and
NodeMediatedDeviceTypes.MediatedDevicesTypes for
MediatedDeviceTypes and NodeMediatedDeviceTypes.MediatedDeviceTypes.
We also introduced a mutating webhook to handle the conversion.
Unfortunately make the two new names mandatory is breaking
the validation of the new version of the CRD on OLM upgrades
since only the previous names were there with the old CRD.

We already have func test covering this area,
but they are fooled by the mutating webhook that
instead is not involved into the CRD validation process
on the OLM side.
On the other side, add an additional upgrade lane just for
this is probably too expensive.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=2241327

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Oct 2, 2023
@sonarcloud
Copy link

sonarcloud bot commented Oct 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 6382977979

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 86.234%

Totals Coverage Status
Change from base Build 6382253680: 0.0%
Covered Lines: 5212
Relevant Lines: 6044

💛 - Coveralls

@hco-bot
Copy link
Collaborator

hco-bot commented Oct 2, 2023

hco-e2e-upgrade-prev-operator-sdk-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure
okd-hco-e2e-operator-sdk-aws lane succeeded.
/override ci/prow/okd-hco-e2e-operator-sdk-gcp

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure, ci/prow/okd-hco-e2e-operator-sdk-gcp

In response to this:

hco-e2e-upgrade-prev-operator-sdk-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure
okd-hco-e2e-operator-sdk-aws lane succeeded.
/override ci/prow/okd-hco-e2e-operator-sdk-gcp

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Oct 2, 2023

hco-e2e-operator-sdk-sno-aws lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-sno-azure
okd-hco-e2e-upgrade-operator-sdk-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-upgrade-operator-sdk-aws
hco-e2e-operator-sdk-gcp lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-aws

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-aws, ci/prow/hco-e2e-operator-sdk-sno-azure, ci/prow/okd-hco-e2e-upgrade-operator-sdk-aws

In response to this:

hco-e2e-operator-sdk-sno-aws lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-sno-azure
okd-hco-e2e-upgrade-operator-sdk-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-upgrade-operator-sdk-aws
hco-e2e-operator-sdk-gcp lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-aws

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Oct 2, 2023

hco-e2e-upgrade-operator-sdk-sno-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure
hco-e2e-operator-sdk-gcp lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-azure, ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure

In response to this:

hco-e2e-upgrade-operator-sdk-sno-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure
hco-e2e-operator-sdk-gcp lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-azure

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.

@tiraboschi
Copy link
Member Author

/retest

1 similar comment
@tiraboschi
Copy link
Member Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Oct 2, 2023

@tiraboschi: 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/okd-hco-e2e-upgrade-operator-sdk-aws 523e9a3 link true /test okd-hco-e2e-upgrade-operator-sdk-aws
ci/prow/hco-e2e-operator-sdk-aws 523e9a3 link true /test hco-e2e-operator-sdk-aws
ci/prow/hco-e2e-operator-sdk-sno-azure 523e9a3 link false /test hco-e2e-operator-sdk-sno-azure
ci/prow/hco-e2e-operator-sdk-azure 523e9a3 link true /test hco-e2e-operator-sdk-azure
ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure 523e9a3 link false /test hco-e2e-upgrade-operator-sdk-sno-azure
ci/prow/hco-e2e-upgrade-operator-sdk-aws 523e9a3 link true /test hco-e2e-upgrade-operator-sdk-aws

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.

@openshift-merge-robot
Copy link
Collaborator

openshift-merge-robot commented Oct 2, 2023

@tiraboschi: The following test 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/hco-e2e-upgrade-operator-sdk-aws 523e9a3 link true /test hco-e2e-upgrade-operator-sdk-aws

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Oct 2, 2023

hco-e2e-upgrade-operator-sdk-azure, hco-e2e-upgrade-operator-sdk-azure lanes succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-aws

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-operator-sdk-aws

In response to this:

hco-e2e-upgrade-operator-sdk-azure, hco-e2e-upgrade-operator-sdk-azure lanes succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-aws

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.

Copy link
Collaborator

@nunnatsa nunnatsa left a comment

Choose a reason for hiding this comment

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

/approve

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 3, 2023
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nunnatsa

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 3, 2023
@kubevirt-bot kubevirt-bot merged commit 4ad5e86 into kubevirt:main Oct 3, 2023
34 checks passed
@tiraboschi tiraboschi deleted the bz_2241327 branch October 3, 2023 07:51
tiraboschi added a commit to tiraboschi/hyperconverged-cluster-operator that referenced this pull request Oct 3, 2023
…en upgrades (kubevirt#2534)

With kubevirt#2402 we deprecated MediatedDevicesTypes and
NodeMediatedDeviceTypes.MediatedDevicesTypes for
MediatedDeviceTypes and NodeMediatedDeviceTypes.MediatedDeviceTypes.
We also introduced a mutating webhook to handle the conversion.
Unfortunately make the two new names mandatory is breaking
the validation of the new version of the CRD on OLM upgrades
since only the previous names were there with the old CRD.

We already have func test covering this area,
but they are fooled by the mutating webhook that
instead is not involved into the CRD validation process
on the OLM side.
On the other side, add an additional upgrade lane just for
this is probably too expensive.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=2241327

This is a manual cherry-pick of kubevirt#2534

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
kubevirt-bot pushed a commit that referenced this pull request Oct 3, 2023
…en upgrades (#2534) (#2537)

With #2402 we deprecated MediatedDevicesTypes and
NodeMediatedDeviceTypes.MediatedDevicesTypes for
MediatedDeviceTypes and NodeMediatedDeviceTypes.MediatedDeviceTypes.
We also introduced a mutating webhook to handle the conversion.
Unfortunately make the two new names mandatory is breaking
the validation of the new version of the CRD on OLM upgrades
since only the previous names were there with the old CRD.

We already have func test covering this area,
but they are fooled by the mutating webhook that
instead is not involved into the CRD validation process
on the OLM side.
On the other side, add an additional upgrade lane just for
this is probably too expensive.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=2241327

This is a manual cherry-pick of #2534

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants