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

Delete immutable resources only if immutable part was changed #289

Merged
merged 3 commits into from Jan 17, 2022

Conversation

akrejcir
Copy link
Collaborator

What this PR does / why we need it:
Usually only the .spec field of resource is immutable, .metadata and .status can be updated.
With this PR, the resource is only deleted, if .spec is changed, otherwise it is updated.

Which issue(s) this PR fixes:
Partially fixes bug: https://bugzilla.redhat.com/show_bug.cgi?id=2037290

Release note:

None

@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 Jan 13, 2022
@akrejcir
Copy link
Collaborator Author

/cc @ksimon1 @borod108

@akrejcir
Copy link
Collaborator Author

/retest

@akrejcir
Copy link
Collaborator Author

I need to change one more thing.
/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 Jan 13, 2022
Usually only the .spec field of resource is immutable,
.metadata and .status can be updated.

With this change, the resource is only deleted
if .spec is changed, otherwise it is updated.

Partially fixes bug: https://bugzilla.redhat.com/show_bug.cgi?id=2037290

Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
When the spec of an immutable resource is changed,
the operator will delete and recreate it. In the duration
since the resource was deleted, but before it is created,
the SSP phase should not be Deployed.

Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
@akrejcir
Copy link
Collaborator Author

/hold cancel

@sonarcloud
Copy link

sonarcloud bot commented Jan 13, 2022

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

@kubevirt-bot kubevirt-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 13, 2022
@ksimon1
Copy link
Member

ksimon1 commented Jan 13, 2022

/retest

@openshift-ci
Copy link

openshift-ci bot commented Jan 13, 2022

@akrejcir: 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/e2e-upgrade-from-old-operator-functests e4e65d7 link true /test e2e-upgrade-from-old-operator-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.

@akrejcir
Copy link
Collaborator Author

Overriding the test of upgrade from old operator. The old operator does not work on new cluster version that is used in CI.
See: openshift/release#25287

/override ci/prow/e2e-upgrade-from-old-operator-functests

@kubevirt-bot
Copy link
Contributor

@akrejcir: Overrode contexts on behalf of akrejcir: ci/prow/e2e-upgrade-from-old-operator-functests

In response to this:

Overriding the test of upgrade from old operator. The old operator does not work on new cluster version that is used in CI.
See: openshift/release#25287

/override ci/prow/e2e-upgrade-from-old-operator-functests

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.

@ksimon1
Copy link
Member

ksimon1 commented Jan 17, 2022

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 17, 2022
@akrejcir
Copy link
Collaborator Author

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akrejcir

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 Jan 17, 2022
@kubevirt-bot kubevirt-bot merged commit 24b333b into kubevirt:master Jan 17, 2022
@akrejcir akrejcir deleted the fix-dataimportcron-loop branch January 17, 2022 09:23
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-none Denotes a PR that doesn't merit a release note. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants