-
Notifications
You must be signed in to change notification settings - Fork 0
Change Replicas field to pointer type in ReplicationControllerStatus #2
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4357,7 +4357,7 @@ type ReplicationControllerSpec struct { | |
// controller. | ||
type ReplicationControllerStatus struct { | ||
// Replicas is the number of actual replicas. | ||
Replicas int32 | ||
Replicas *int32 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, here's a review of the code diff provided: Summary: The change converts the Issues and Suggestions:
Replicas *int32 `json:"replicas,omitempty"` Good Practices:
Recommendation: The change is potentially problematic. A clearer rationale is needed, along with a plan for handling backward compatibility and defaulting. I also recommend adding the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, here's a review of the code diff provided: Summary: The change converts the Issues and Suggestions:
Replicas *int32 `json:"replicas,omitempty"` Good Practices:
Recommendation: The change is potentially problematic. A clearer rationale is needed, along with a plan for handling backward compatibility and defaulting. I also recommend adding the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, here's a review of the code diff provided: Summary: The change converts the Issues and Suggestions:
Replicas *int32 `json:"replicas,omitempty"` Good Practices:
Recommendation: The change is potentially problematic. A clearer rationale is needed, along with a plan for handling backward compatibility and defaulting. I also recommend adding the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, here's a review of the code diff provided: Summary: The change converts the Issues and Suggestions:
Replicas *int32 `json:"replicas,omitempty"` Good Practices:
Recommendation: The change is potentially problematic. A clearer rationale is needed, along with a plan for handling backward compatibility and defaulting. I also recommend adding the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I've reviewed the code diff. Here's my feedback: Potential Issue:
Suggestion:
In summary, the change to a pointer type is significant and needs careful consideration and justification. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I've reviewed the code diff. Here's my feedback: Potential Issue:
Suggestion:
In summary, the change to a pointer type is significant and needs careful consideration and justification. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, here's a review of the code diff, focusing on API review guidelines and potential issues. File:
Summary: The change to |
||
|
||
// The number of pods that have labels matching the labels of the pod template of the replication controller. | ||
// +optional | ||
|
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.
Line 4357:
Replicas
fromint32
to*int32
may introduce nil pointer dereference issues. If theReplicas
field is not set (i.e., nil), accessing it without a nil check will result in a panic.Replicas
if it is intended to be non-nil. Alternatively, provide clear documentation on the expected behavior whenReplicas
is nil.Overall feedback:
Replicas
nullable.Replicas
nullable.