Skip to content

Commit 3edcbca

Browse files
committed
remove duplicates and extra messages
1 parent ce753bc commit 3edcbca

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

pkg/skaffold/kubernetes/status/resource/deployment.go

+2-10
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ func (d *Deployment) CheckStatus(ctx context.Context, cfg kubectl.Config) {
136136
ae := parseKubectlRolloutError(details, d.deadline, err)
137137
d.UpdateStatus(ae)
138138
// send event update in check status.
139-
event.ResourceStatusCheckEventUpdated(d.String(), ae)
140-
eventV2.ResourceStatusCheckEventUpdated(d.String(), sErrors.V2fromV1(ae))
141139
// if deployment is successfully rolled out, send pod success event to make sure
142140
// all pod are marked as success in V2
143141
// See https://github.com/GoogleCloudPlatform/cloud-code-vscode-internal/issues/5277
@@ -307,14 +305,8 @@ func (d *Deployment) fetchPods(ctx context.Context) error {
307305
if !found || originalPod.StatusUpdated(p) {
308306
d.status.changed = true
309307
prefix := fmt.Sprintf("%s %s:", tabHeader, p.String())
310-
switch p.ActionableError().ErrCode {
311-
case proto.StatusCode_STATUSCHECK_SUCCESS:
312-
event.ResourceStatusCheckEventCompleted(p.String(), p.ActionableError())
313-
eventV2.ResourceStatusCheckEventCompletedMessage(
314-
p.String(),
315-
fmt.Sprintf("%s running.\n", prefix),
316-
sErrors.V2fromV1(p.ActionableError()))
317-
default:
308+
if p.ActionableError().ErrCode != proto.StatusCode_STATUSCHECK_SUCCESS &&
309+
p.ActionableError().Message != "" {
318310
event.ResourceStatusCheckEventUpdated(p.String(), p.ActionableError())
319311
eventV2.ResourceStatusCheckEventUpdatedMessage(
320312
p.String(),

0 commit comments

Comments
 (0)