Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not display non essential tf commands #108

Merged
merged 4 commits into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion server/events/terraform/terraform_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,9 @@ func (c *DefaultClient) RunCommandAsync(ctx models.ProjectCommandContext, path s
go func() {
// Don't stream terraform show output to outCh
cmds := strings.Split(tfCmd, " ")
c.projectCmdOutputHandler.Send(ctx, fmt.Sprintf("\n----- running terraform %s -----\n", args[0]))
if isValidCommand(cmds[1]) {
c.projectCmdOutputHandler.Send(ctx, fmt.Sprintf("\n----- running terraform %s -----\n", args[0]))
}
s := bufio.NewScanner(stdout)
for s.Scan() {
message := s.Text()
Expand Down
5 changes: 0 additions & 5 deletions server/handlers/project_command_output_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,6 @@ func (p *AsyncProjectCommandOutputHandler) writeLogLine(pull string, line string
}
p.receiverBuffersLock.Unlock()

// No need to write to projectOutputBuffers if clear msg.
if line == models.LogStreamingClearMsg {
return
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to write ClearMsg to the projectOutputBuffers?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted it

p.projectOutputBuffersLock.Lock()
if p.projectOutputBuffers[pull] == nil {
p.projectOutputBuffers[pull] = []string{}
Expand Down