Skip to content

Commit 94c8009

Browse files
authored
refactor(main): skip success exec (#4162)
1 parent ba7f8c3 commit 94c8009

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

pkg/apply/applydrivers/apply_drivers_default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func (c *Applier) updateStatus(clusterErr error, appErr error) {
171171
cmdCondition = v2.NewFailedCommandCondition(appErr.Error())
172172
}
173173
} else if len(c.RunNewImages) > 0 {
174-
cmdCondition = v2.NewSuccessCommandCondition()
174+
return
175175
}
176176
cmdCondition.Images = c.RunNewImages
177177
c.ClusterDesired.Status.CommandConditions = v2.UpdateCommandCondition(c.ClusterDesired.Status.CommandConditions, cmdCondition)

pkg/types/v1beta1/cluster.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,6 @@ type CommandCondition struct {
187187
Message string `json:"message,omitempty"`
188188
}
189189

190-
func NewSuccessCommandCondition() CommandCondition {
191-
return CommandCondition{
192-
Type: CommandConditionTypeSuccess,
193-
Status: v1.ConditionTrue,
194-
LastHeartbeatTime: metav1.Now(),
195-
Reason: "Apply Command",
196-
Message: "Applied to cluster successfully",
197-
}
198-
}
199-
200190
func NewFailedCommandCondition(message string) CommandCondition {
201191
return CommandCondition{
202192
Type: CommandConditionTypeError,

0 commit comments

Comments
 (0)