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

Non admin status comparison against empty structure #131

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

mpryc
Copy link
Collaborator

@mpryc mpryc commented Dec 10, 2024

Change implementation of the status functions to ensure that an empty status is properly compared against an empty structure, treating it as equivalent to nil

Previous implementation had corner case where reconcile would lead to unnecessary updates, even both statuses were effectively "empty".

Why the changes were made

To fix reconcile updates to the status where the status should not be updated.

How to test the changes made

Fix logic observed during controller manual testing.

Change implementation of the status functions to ensure that an empty status
is properly compared against an empty structure, treating it as equivalent to nil

Previous implementation had corner case where reconcile would lead to unnecessary
updates, even both statuses were effectively "empty".

Signed-off-by: Michal Pryc <[email protected]>
Copy link

openshift-ci bot commented Dec 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mateusoliveira43, mpryc, shubham-pampattiwar

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:
  • OWNERS [mateusoliveira43,mpryc,shubham-pampattiwar]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@shubham-pampattiwar
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Dec 10, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 06cf4a2 into migtools:master Dec 10, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants