-
Notifications
You must be signed in to change notification settings - Fork 916
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
Change the length of modelSortings array for panic of index error #3591
Conversation
Welcome @sunbinnnnn! It looks like this is your first PR to karmada-io/karmada 🎉 |
@XiShanYongYe-Chang: GitHub didn't allow me to request PR reviews from the following users: halfrost. Note that only karmada-io members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this: 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. |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #3591 +/- ##
==========================================
- Coverage 55.86% 55.85% -0.01%
==========================================
Files 216 216
Lines 20121 20121
==========================================
- Hits 11240 11238 -2
- Misses 8276 8278 +2
Partials 605 605
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Thanks @sunbinnnnn.
to
|
I agree with @Poor12 's solution. Increasing the capacity of modelSortings is a more thorough solution. |
If grade number of resourceModel less than rsName, the controller may panic with index error. The length of resource model grades array should equl the length of rsName array. Signed-off-by: NeilSun <sunbinnnnn@hotmail.com>
LGTM |
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.
@Poor12 Please clarify if this patch needs cherry-pick. If yes, please propose a release note. Thanks.
I think this issue needs to cherry-pick. For release node, I propose:
|
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango 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 |
…91-origin-release-1.3 Automated cherry pick of #3591: Change the length of modelSortings array for panic of index
…91-origin-release-1.4 Automated cherry pick of #3591: Change the length of modelSortings array for panic of index
…91-origin-release-1.5 Automated cherry pick of #3591: Change the length of modelSortings array for panic of index
If grade number of resourceModel less than rsName, the controller may panic with index error.
What type of PR is this?
/kind bug
What this PR does / why we need it:
Add a precheck to check if resource model grades less than resources count.
Which issue(s) this PR fixes:
Fixes #3472
Special notes for your reviewer:
Does this PR introduce a user-facing change?: