-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
virt-launcher: Refactor/Simplify is<ARCH> functions #11602
Conversation
Hi @jschintag. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @jschintag
/test all |
Shorten the isArch functions by returning the result of the comparison directly. Signed-off-by: Jan Schintag <jan.schintag@de.ibm.com>
baa78a9
to
d0aa8ef
Compare
/lgtm Thanks! |
Thank you @victortoso @orelmisan for the review. I have added 1 additional case where i could apply the same refactor. Thank you @alicefr for pointing that out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xpivarc 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 |
Required labels detected, running phase 2 presubmits: |
@jschintag: The following test failed, say
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. |
/retest-required |
Shorten the isArch functions by returning the result of the comparison directly.
What this PR does
Before this PR:
The functions were more complex than it needed to be.
After this PR:
The code is 6 lines shorter with no change to functionality and a tiny bit easier to read.
It is also more inline with other functions that do the same work.
Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
None
The following alternatives were considered:
None
Links to places where the discussion took place:
Special notes for your reviewer
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note