Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify devLoopEvent message text (GoogleContainerTools#4684)
Browse files Browse the repository at this point in the history
briandealwis authored and nkubala committed Aug 20, 2020

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 45cadb1 commit 580517f
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pkg/skaffold/event/event.go
Original file line number Diff line number Diff line change
@@ -628,11 +628,11 @@ func (ev *eventHandler) handleExec(f firedEvent) {
de := e.DevLoopEvent
switch de.Status {
case InProgress:
logEntry.Entry = fmt.Sprintf("DevInit Iteration %d in progress", de.Iteration)
logEntry.Entry = "Update initiated due to file change"
case Succeeded:
logEntry.Entry = fmt.Sprintf("DevInit Iteration %d successful", de.Iteration)
logEntry.Entry = "Update successful"
case Failed:
logEntry.Entry = fmt.Sprintf("DevInit Iteration %d failed with error code %v", de.Iteration, de.Err.ErrCode)
logEntry.Entry = fmt.Sprintf("Update failed with error code %v", de.Err.ErrCode)
}
default:
return
6 changes: 3 additions & 3 deletions pkg/skaffold/event/event_test.go
Original file line number Diff line number Diff line change
@@ -475,7 +475,7 @@ func TestDevLoopFailedInPhase(t *testing.T) {
handler.logLock.Lock()
logEntry := handler.eventLog[len(handler.eventLog)-1]
handler.logLock.Unlock()
return logEntry.Entry == fmt.Sprintf("DevInit Iteration 1 failed with error code %v", proto.StatusCode_BUILD_PUSH_ACCESS_DENIED)
return logEntry.Entry == fmt.Sprintf("Update failed with error code %v", proto.StatusCode_BUILD_PUSH_ACCESS_DENIED)
},
},
{
@@ -489,7 +489,7 @@ func TestDevLoopFailedInPhase(t *testing.T) {
handler.logLock.Lock()
logEntry := handler.eventLog[len(handler.eventLog)-1]
handler.logLock.Unlock()
return logEntry.Entry == fmt.Sprintf("DevInit Iteration 1 failed with error code %v", proto.StatusCode_DEPLOY_UNKNOWN)
return logEntry.Entry == fmt.Sprintf("Update failed with error code %v", proto.StatusCode_DEPLOY_UNKNOWN)
},
},
{
@@ -504,7 +504,7 @@ func TestDevLoopFailedInPhase(t *testing.T) {
handler.logLock.Lock()
logEntry := handler.eventLog[len(handler.eventLog)-1]
handler.logLock.Unlock()
return logEntry.Entry == fmt.Sprintf("DevInit Iteration 1 failed with error code %v", proto.StatusCode_STATUSCHECK_UNHEALTHY)
return logEntry.Entry == fmt.Sprintf("Update failed with error code %v", proto.StatusCode_STATUSCHECK_UNHEALTHY)
},
},
}

0 comments on commit 580517f

Please sign in to comment.