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

Refactor getMachine to clarify machine-not-found error conditions #113

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

clobrano
Copy link
Contributor

@clobrano clobrano commented Jan 3, 2024

Clarified the conditions under which an error would be returned or not
when the Machine was not found in the cluster.

Clarified the conditions under which an error would be returned or not
when the Machine was not found in the cluster.

Signed-off-by: Carlo Lobrano <[email protected]>
Copy link
Contributor

openshift-ci bot commented Jan 3, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

openshift-ci bot commented Jan 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clobrano

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

@openshift-ci openshift-ci bot added the approved label Jan 3, 2024
@clobrano
Copy link
Contributor Author

clobrano commented Jan 3, 2024

Regarding this comment

I do think this is still a bit confusing because isUnhandledMachine value may not reflect the actual logic.
IIUC We only decide that the machine is unhandled after we also check ownerRef & remediation.
So to put it in other words isUnhandledMachine value may equal true when logically it is actually need to be false.

I think that we can consider a Machine "unhandled" even before checking ownerRef and remediation, as unhandled does not necessarily mean we can remediate it, so I went for renaming the mustExist variable in isUnhandledMachine

@clobrano
Copy link
Contributor Author

clobrano commented Jan 5, 2024

/test 4.14-openshift-e2e

@slintes
Copy link
Member

slintes commented Jan 5, 2024

/lgtm

giving others the chance to review as well
/hold

@mshitrit
Copy link
Member

mshitrit commented Jan 8, 2024

/unhold

@mshitrit mshitrit marked this pull request as ready for review January 8, 2024 10:01
@openshift-ci openshift-ci bot requested review from beekhof and mshitrit January 8, 2024 10:02
@clobrano
Copy link
Contributor Author

clobrano commented Jan 8, 2024

/retest

1 similar comment
@razo7
Copy link
Member

razo7 commented Jan 8, 2024

/retest

@openshift-merge-bot openshift-merge-bot bot merged commit 75b8d43 into medik8s:main Jan 8, 2024
19 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.

4 participants