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
Remove unnecessary machine specific client #70
Remove unnecessary machine specific client #70
Conversation
/retest |
1 similar comment
/retest |
can we please have a PR description with the motivation of this PR? This PR is just removing the object at instantiation time, but it's still being passed around and relied upon. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre 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 |
/retest |
3 similar comments
/retest |
/retest |
/retest |
@@ -146,11 +137,12 @@ func (s *machineScope) storeMachineSpec() error { | |||
|
|||
klog.V(4).Infof("Storing machine spec for %q, resourceVersion: %v, generation: %v", s.machine.Name, s.machine.ResourceVersion, s.machine.Generation) | |||
s.machine.Spec.ProviderSpec.Value = ext | |||
latestMachine, err := s.machineClient.Update(s.machine) | |||
|
|||
err = s.coreClient.Update(context.Background(), s.machine) |
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.
The remainder can be reduced to just:
return s.coreClient.Update(context.Background(), s.machine)
@@ -169,11 +161,10 @@ func (s *machineScope) storeMachineStatus() error { | |||
s.machine.Status.ProviderStatus = ext | |||
time := metav1.Now() | |||
s.machine.Status.LastUpdated = &time | |||
latestMachine, err := s.machineClient.UpdateStatus(s.machine) | |||
err = s.coreClient.Status().Update(context.Background(), s.machine) |
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.
The remainder can be reduced to just:
return s.coreClient.Status().Update(context.Background(), s.machine)
/retest |
1 similar comment
/retest |
/retry |
/retest |
5 similar comments
/retest |
/retest |
/retest |
/retest |
/retest |
/retest |
2 similar comments
/retest |
/retest |
/test e2e-gcp-operator |
/retest |
} | ||
|
||
func (s *machineScope) PatchMachine() error { | ||
klog.V(3).Infof("%v: patching machine", s.machine.GetName()) |
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.
Nit: should this be a string instead?
klog.V(3).Infof("%v: patching machine", s.machine.GetName()) | |
klog.V(3).Infof("%s: patching machine", s.machine.GetName()) |
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
/retest Please review the full test history for this PR and help us cut down flakes. |
🌱 Install kustomize when releasing manifests
This PR removes unnecessary machine specific client, it can be replaced with controller runtime client.