Skip to content

Commit

Permalink
Clear ApplicationLogEvent and SkaffoldLogEvent buffers on new dev…
Browse files Browse the repository at this point in the history
… iteration (#5993)

* clear user application and skaffold logs on new dev iteration

* use empty slice literals instead of nils
  • Loading branch information
MarlonGamez authored Jun 9, 2021
1 parent d45f297 commit 840f9b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/skaffold/event/v2/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,12 @@ func AutoTriggerDiff(phase constants.Phase, val bool) (bool, error) {
}

func TaskInProgress(task constants.Phase, description string) {
// Special casing to increment iteration and clear application and skaffold logs
if task == constants.DevLoop {
handler.iteration++

handler.applicationLogs = []proto.Event{}
handler.skaffoldLogs = []proto.Event{}
}

handler.handleTaskEvent(&proto.TaskEvent{
Expand Down

0 comments on commit 840f9b2

Please sign in to comment.