Skip to content

Commit

Permalink
Revert "fix: prevent stdout from disappearing in script templates. Fixes
Browse files Browse the repository at this point in the history
 argoproj#11330 (argoproj#11368)"

This reverts commit 1513e22.
  • Loading branch information
cbuchli committed Oct 4, 2023
1 parent bd6cd25 commit e1deebb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 63 deletions.
9 changes: 0 additions & 9 deletions cmd/argoexec/commands/emissary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,12 @@ func TestEmissary(t *testing.T) {
assert.Equal(t, "1", string(data))
})
t.Run("Stdout", func(t *testing.T) {
_ = os.Remove(varRunArgo + "/ctr/main/stdout")
err := run("echo hello")
assert.NoError(t, err)
data, err := ioutil.ReadFile(varRunArgo + "/ctr/main/stdout")
assert.NoError(t, err)
assert.Contains(t, string(data), "hello")
})
t.Run("Sub-process", func(t *testing.T) {
_ = os.Remove(varRunArgo + "/ctr/main/stdout")
err := run("(sleep 60; echo 'should not wait for sub-process')& echo -n hello")
assert.NoError(t, err)
data, err := os.ReadFile(varRunArgo + "/ctr/main/stdout")
assert.NoError(t, err)
assert.Equal(t, "hello", string(data))
})
t.Run("Combined", func(t *testing.T) {
err := run("echo hello > /dev/stderr")
assert.NoError(t, err)
Expand Down
8 changes: 1 addition & 7 deletions workflow/executor/os-specific/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"io"
"os"
"os/exec"
"time"

log "github.com/sirupsen/logrus"
"golang.org/x/term"
Expand All @@ -17,12 +16,7 @@ func simpleStart(cmd *exec.Cmd) (func(), error) {
return nil, err
}

closer := func() {
cmd.WaitDelay = 100 * time.Millisecond
_ = cmd.Wait()
}

return closer, nil
return func() {}, nil
}

func isTerminal(stdin io.Reader) bool {
Expand Down
47 changes: 0 additions & 47 deletions workflow/executor/os-specific/command_test.go

This file was deleted.

0 comments on commit e1deebb

Please sign in to comment.