Skip to content

Commit

Permalink
fix duplicated log entries when streaming logs (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
grantleehoffman authored Sep 17, 2021
1 parent a0b06f3 commit bf83ff3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Updated argo-workflows to v3.1.8 to address CVE-2021-37914
(https://github.com/argoproj/argo-workflows/security/advisories/GHSA-h563-xh25-x54q).

### Fixed
* Duplicated log entries when streaming logs.

## [0.8.1] - 2021-08-20
### Fixed
* Target credential_type only supports 'assumed_role'.
Expand Down
13 changes: 6 additions & 7 deletions cli/cmd/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ var logsCmd = &cobra.Command{
if streamLogs {
// This is a _very_ simple approach to streaming.
cobra.CheckErr(apiCl.StreamLogs(context.Background(), os.Stdout, workflowName))
} else {
resp, err := apiCl.GetLogs(context.Background(), workflowName)
if err != nil {
cobra.CheckErr(err)
}
fmt.Println(strings.Join(resp.Logs, "\n"))
}

resp, err := apiCl.GetLogs(context.Background(), workflowName)
if err != nil {
cobra.CheckErr(err)
}

fmt.Println(strings.Join(resp.Logs, "\n"))
},
}

Expand Down

0 comments on commit bf83ff3

Please sign in to comment.