status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
233
body
stringlengths
0
186k
βŒ€
issue_url
stringlengths
38
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
timestamp[us, tz=UTC]
language
stringclasses
5 values
commit_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/plain.go
return message case zerolog.WarnLevel: return fmt.Sprintf("[yellow]%s[reset]", message) case zerolog.ErrorLevel: return fmt.Sprintf("[red]%s[reset]", message) case zerolog.FatalLevel: return fmt.Sprintf("[red]%s[reset]", message) case zerolog.PanicLevel: return fmt.Sprintf("[red]%s[reset]", message) default: return message } } func parseSource(event map[string]interface{}) string { source := "system" if task, ok := event["task"].(string); ok && task != "" { source = task } return source } func formatSource(source string) string { return fmt.Sprintf("[%s]%s | [reset]", hashColor(source), source, ) } func formatFields(entry map[string]interface{}) string { fieldSkipList := map[string]struct{}{
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/plain.go
zerolog.MessageFieldName: {}, zerolog.LevelFieldName: {}, zerolog.TimestampFieldName: {}, zerolog.ErrorFieldName: {}, zerolog.CallerFieldName: {}, "environment": {}, "task": {}, "state": {}, } fields := []string{} for key, value := range entry { if _, ok := fieldSkipList[key]; ok { continue } switch v := value.(type) { case string: fields = append(fields, fmt.Sprintf("%s=%s", key, v)) case int: fields = append(fields, fmt.Sprintf("%s=%v", key, v)) case float64: dur := time.Duration(v) * time.Millisecond s := dur.Round(100 * time.Millisecond).String() fields = append(fields, fmt.Sprintf("%s=%s", key, s)) case nil: fields = append(fields, fmt.Sprintf("%s=null", key)) default: o, err := json.MarshalIndent(v, "", " ")
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/plain.go
if err != nil { panic(err) } fields = append(fields, fmt.Sprintf("%s=%s", key, o)) } } if len(fields) == 0 { return "" } sort.SliceStable(fields, func(i, j int) bool { return fields[i] < fields[j] }) return fmt.Sprintf(" [bold]%s[reset]", strings.Join(fields, " ")) } func hashColor(text string) string { colors := []string{ "green", "light_green", "light_blue", "blue", "magenta", "light_magenta", "light_yellow", "cyan", "light_cyan", } h := adler32.Checksum([]byte(text)) return colors[int(h)%len(colors)] }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/tty.go
package logger import ( "bytes" "encoding/json" "fmt" "io" "os" "strings" "sync" "time" "unicode/utf8" "github.com/containerd/console" "github.com/morikuni/aec" "github.com/tonistiigi/vt100" "go.dagger.io/dagger/plan/task" ) type Event map[string]interface{} type Group struct { Name string State task.State Events []Event Started *time.Time Completed *time.Time } type Message struct {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/tty.go
Event Event Group *Group } type Logs struct { Messages []Message groups map[string]*Group l sync.Mutex } func (l *Logs) Add(event Event) error { l.l.Lock() defer l.l.Unlock() taskPath, ok := event["task"].(string) if !ok { l.Messages = append(l.Messages, Message{ Event: event, }) return nil } groupKey := strings.Split(taskPath, "._")[0] group := l.groups[groupKey] if group == nil { now := time.Now()
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/tty.go
group = &Group{ Name: groupKey, Started: &now, } l.groups[groupKey] = group l.Messages = append(l.Messages, Message{ Group: group, }) } if st, ok := event["state"].(string); ok { group.State = task.State(st) if group.State == task.StateComputing { group.Completed = nil } else { now := time.Now() group.Completed = &now } return nil } group.Events = append(group.Events, event) return nil } type TTYOutput struct {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/tty.go
cons console.Console logs *Logs lineCount int l sync.RWMutex stopCh chan struct{} doneCh chan struct{} printCh chan struct{} } func NewTTYOutput(w *os.File) (*TTYOutput, error) { cons, err := console.ConsoleFromFile(w) if err != nil { return nil, err } c := &TTYOutput{ logs: &Logs{ groups: make(map[string]*Group), }, cons: cons, stopCh: make(chan struct{}), doneCh: make(chan struct{}), printCh: make(chan struct{}, 128),
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/tty.go
} return c, nil } func (c *TTYOutput) Start() { defer close(c.doneCh) go func() { for { select { case <-c.stopCh: return case <-c.printCh: c.print() case <-time.After(100 * time.Millisecond): c.print() } } }() } func (c *TTYOutput) Stop() { c.l.Lock() defer c.l.Unlock() if c.doneCh == nil { return } close(c.stopCh) <-c.doneCh c.doneCh = nil } func (c *TTYOutput) Write(p []byte) (n int, err error) { event := Event{}
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/tty.go
d := json.NewDecoder(bytes.NewReader(p)) if err := d.Decode(&event); err != nil { return n, fmt.Errorf("cannot decode event: %s", err) } if err := c.logs.Add(event); err != nil { return 0, err } c.print() return len(p), nil } func (c *TTYOutput) print() { c.l.Lock() defer c.l.Unlock() select { case <-c.stopCh: return default: } width, height := c.getSize() rint(c.cons, aec.Hide) defer rint(c.cons, aec.Show) b := aec.EmptyBuilder for i := 0; i < c.lineCount; i++ { b = b.Up(1) } rint(c.cons, b.ANSI) linesPerGroup := c.linesPerGroup(width, height)
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/tty.go
lineCount := 0 for _, e := range c.logs.Messages { if group := e.Group; group != nil { lineCount += c.printGroup(group, width, linesPerGroup) } else { lineCount += c.printLine(c.cons, e.Event, width) } } if diff := c.lineCount - lineCount; diff > 0 { for i := 0; i < diff; i++ { rintln(c.cons, strings.Repeat(" ", width)) } rint(c.cons, aec.EmptyBuilder.Up(uint(diff)).Column(0).ANSI) } c.lineCount = lineCount } func (c *TTYOutput) linesPerGroup(width, height int) int { usedLines := 0 for _, e := range c.logs.Messages { if group := e.Group; group != nil { usedLines++ continue } usedLines += c.printLine(io.Discard, e.Event, width) } runningGroups := 0 for _, e := range c.logs.Messages { if group := e.Group; group != nil && group.State == task.StateComputing { runningGroups++ }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/tty.go
} linesPerGroup := 5 if freeLines := (height - usedLines); freeLines > 0 && runningGroups > 0 { linesPerGroup = (freeLines - 2) / runningGroups } return linesPerGroup } func (c *TTYOutput) printLine(w io.Writer, event Event, width int) int { e := colorize.Color(fmt.Sprintf("%s %s %s%s", formatTimestamp(event), formatLevel(event), formatMessage(event), formatFields(event), )) ta := width - utf8.RuneCountInString(e); delta > 0 { e += strings.Repeat(" ", delta) } e += "\n" rint(w, e) t := vt100.NewVT100(100, width) t.Write([]byte(e)) return t.UsedHeight() } func (c *TTYOutput) printGroup(group *Group, width, maxLines int) int { lineCount := 0 prefix := "" switch group.State { case task.StateComputing:
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/tty.go
prefix = "[+]" case task.StateCanceled: prefix = "[βœ—]" case task.StateFailed: prefix = "[βœ—]" case task.StateCompleted: prefix = "[βœ”]" } out := prefix + " " + group.Name endTime := time.Now() if group.Completed != nil { endTime = *group.Completed } dt := endTime.Sub(*group.Started).Seconds() if dt < 0.05 { dt = 0 } timer := fmt.Sprintf("%3.1fs", dt) align out += strings.Repeat(" ", width-utf8.RuneCountInString(out)-len(timer)) out += timer out += "\n" color switch group.State { case task.StateComputing: out = aec.Apply(out, aec.LightBlueF) case task.StateCanceled: out = aec.Apply(out, aec.LightYellowF) case task.StateFailed: out = aec.Apply(out, aec.LightRedF)
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/tty.go
case task.StateCompleted: out = aec.Apply(out, aec.LightGreenF) } Print rint(c.cons, out) lineCount++ printEvents := []Event{} switch group.State { case task.StateComputing: printEvents = group.Events for computing tasks, show only last N if len(printEvents) > maxLines { printEvents = printEvents[len(printEvents)-maxLines:] } case task.StateCanceled: for completed tasks, don't show any logs printEvents = []Event{} case task.StateFailed: for failed, show all logs printEvents = group.Events case task.StateCompleted: for completed tasks, don't show any logs printEvents = []Event{} } for _, event := range printEvents { lineCount += c.printGroupLine(event, width) } return lineCount } func (c *TTYOutput) printGroupLine(event Event, width int) int {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
cmd/dagger/logger/tty.go
e := colorize.Color(fmt.Sprintf("%s%s", formatMessage(event), formatFields(event), )) trim for utf8.RuneCountInString(e) > width { e = e[0:len(e)-4] + "…" } ta := width - utf8.RuneCountInString(e); delta > 0 { e += strings.Repeat(" ", delta) } e += "\n" color e = aec.Apply(e, aec.Faint) Print rint(c.cons, e) return 1 } func (c *TTYOutput) getSize() (int, int) { width := 80 height := 10 size, err := c.cons.Size() if err == nil && size.Width > 0 && size.Height > 0 { width = int(size.Width) height = int(size.Height) } return width, height }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/runner.go
package plan import ( "context" "fmt" "strings" "sync" "time" "go.dagger.io/dagger/compiler" "go.dagger.io/dagger/plan/task" "go.dagger.io/dagger/plancontext" "go.dagger.io/dagger/solver" "cuelang.org/go/cue" cueflow "cuelang.org/go/tools/flow" "github.com/rs/zerolog/log" "go.opentelemetry.io/otel" ) type Runner struct {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/runner.go
pctx *plancontext.Context target cue.Path s *solver.Solver tasks sync.Map mirror *compiler.Value l sync.Mutex } func NewRunner(pctx *plancontext.Context, target cue.Path, s *solver.Solver) *Runner { return &Runner{ pctx: pctx, target: target, s: s, mirror: compiler.NewValue(), } } func (r *Runner) Run(ctx context.Context, src *compiler.Value) error { if !src.LookupPath(r.target).Exists() { return fmt.Errorf("%s not found", r.target.String()) } if err := r.update(cue.MakePath(), src); err != nil { return err } flow := cueflow.New( &cueflow.Config{ FindHiddenTasks: true,
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/runner.go
}, src.Cue(), r.taskFunc, ) if err := flow.Run(ctx); err != nil { return err } select { case <-ctx.Done(): return ctx.Err() default: return nil } } func (r *Runner) update(p cue.Path, v *compiler.Value) error { r.l.Lock() defer r.l.Unlock() if err := r.mirror.FillPath(p, v); err != nil { return err } r.initTasks() return nil } func (r *Runner) initTasks() { flow := cueflow.New( &cueflow.Config{ FindHiddenTasks: true, }, r.mirror.Cue(), noOpRunner,
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/runner.go
) for _, t := range flow.Tasks() { if cuePathHasPrefix(t.Path(), r.target) { r.addTask(t) } } for _, t := range flow.Tasks() { if t.Path().Selectors()[0] != ClientSelector { continue } for _, dep := range t.Dependencies() { if r.shouldRun(dep.Path()) { r.addTask(t) } } } } func (r *Runner) addTask(t *cueflow.Task) { if _, ok := r.tasks.Load(t.Path().String()); ok { return } r.tasks.Store(t.Path().String(), struct{}{}) for _, dep := range t.Dependencies() { r.addTask(dep) } } func (r *Runner) shouldRun(p cue.Path) bool {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/runner.go
_, ok := r.tasks.Load(p.String()) return ok } func (r *Runner) taskFunc(flowVal cue.Value) (cueflow.Runner, error) { v := compiler.Wrap(flowVal) handler, err := task.Lookup(v) if err != nil { if err == task.ErrNotTask { return nil, nil } return nil, err } if !r.shouldRun(v.Path()) { return nil, nil } return cueflow.RunnerFunc(func(t *cueflow.Task) error { ctx := t.Context() lg := log.Ctx(ctx).With().Str("task", t.Path().String()).Logger() ctx = lg.WithContext(ctx) ctx, span := otel.Tracer("dagger").Start(ctx, fmt.Sprintf("up: %s", t.Path().String())) defer span.End() lg.Info().Str("state", string(task.StateComputing)).Msg(string(task.StateComputing)) for _, dep := range t.Dependencies() { lg.Debug().Str("dependency", dep.Path().String()).Msg("dependency detected") } start := time.Now() result, err := handler.Run(ctx, r.pctx, r.s, compiler.Wrap(t.Value()))
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/runner.go
if err != nil { if strings.Contains(err.Error(), "context canceled") { lg.Error().Dur("duration", time.Since(start)).Str("state", string(task.StateCanceled)).Msg(string(task.StateCanceled)) } else { lg.Error().Dur("duration", time.Since(start)).Err(compiler.Err(err)).Str("state", string(task.StateFailed)).Msg(string(task.StateFailed)) } return fmt.Errorf("%s: %w", t.Path().String(), compiler.Err(err)) } lg.Info().Dur("duration", time.Since(start)).Str("state", string(task.StateCompleted)).Msg(string(task.StateCompleted)) if !result.IsConcrete() { return nil } if src, err := result.Source(); err == nil { lg.Debug().Str("result", string(src)).Msg("merging task result") } if err := t.Fill(result.Cue()); err != nil { lg.Error().Err(err).Msg("failed to fill task") return err } return nil }), nil } func cuePathHasPrefix(p cue.Path, prefix cue.Path) bool {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/runner.go
pathSelectors := p.Selectors() prefixSelectors := prefix.Selectors() if len(pathSelectors) < len(prefixSelectors) { return false } for i, sel := range prefixSelectors { if pathSelectors[i] != sel { return false } } return true } func noOpRunner(flowVal cue.Value) (cueflow.Runner, error) { v := compiler.Wrap(flowVal) _, err := task.Lookup(v) if err != nil { if err == task.ErrNotTask { return nil, nil } return nil, err } return cueflow.RunnerFunc(func(t *cueflow.Task) error { return nil }), nil }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/task/dockerfile.go
package task import ( "context" "encoding/json" "errors" "fmt" "strings" bkplatforms "github.com/containerd/containerd/platforms" "github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/exporter/containerimage/exptypes" dockerfilebuilder "github.com/moby/buildkit/frontend/dockerfile/builder" "github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb" bkgw "github.com/moby/buildkit/frontend/gateway/client" bkpb "github.com/moby/buildkit/solver/pb" "github.com/rs/zerolog/log" "go.dagger.io/dagger/compiler" "go.dagger.io/dagger/plancontext" "go.dagger.io/dagger/solver" ) func init() { Register("Dockerfile", func() Task { return &dockerfileTask{} }) } type dockerfileTask struct { } func (t *dockerfileTask) Run(ctx context.Context, pctx *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) { lg := log.Ctx(ctx) auths, err := v.Lookup("auth").Fields() if err != nil { return nil, err
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/task/dockerfile.go
} for _, auth := range auths { a, err := decodeAuthValue(pctx, auth.Value) if err != nil { return nil, err } target, err := solver.ParseAuthHost(auth.Label()) if err != nil { return nil, err } s.AddCredentials(target, a.Username, a.Secret.PlainText()) lg.Debug().Str("target", target).Msg("add target credentials") } source, err := pctx.FS.FromValue(v.Lookup("source")) if err != nil { return nil, err } sourceSt, err := source.State() if err != nil { return nil, err } contextDef, err := s.Marshal(ctx, sourceSt) if err != nil { return nil, err } dockerfileDef := contextDef
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/task/dockerfile.go
if dockerfile := v.Lookup("dockerfile.contents"); dockerfile.Exists() { contents, err := dockerfile.String() if err != nil { return nil, err } dockerfileDef, err = s.Marshal(ctx, llb.Scratch().File( llb.Mkfile("/Dockerfile", 0644, []byte(contents)), ), ) if err != nil { return nil, err } } opts, err := t.dockerBuildOpts(v, pctx) if err != nil { return nil, err } if s.NoCache() { opts["no-cache"] = "" } req := bkgw.SolveRequest{ Frontend: "dockerfile.v0", FrontendOpt: opts, FrontendInputs: map[string]*bkpb.Definition{ dockerfilebuilder.DefaultLocalNameContext: contextDef, dockerfilebuilder.DefaultLocalNameDockerfile: dockerfileDef, },
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/task/dockerfile.go
} res, err := s.SolveRequest(ctx, req) if err != nil { return nil, err } ref, err := res.SingleRef() if err != nil { return nil, err } solvedRef := ref if ref != nil { st, err := ref.ToState() if err != nil { return nil, err } solvedRef, err = s.Solve(ctx, st, pctx.Platform.Get()) if err != nil { return nil, err } } meta, ok := res.Metadata[exptypes.ExporterImageConfigKey] if !ok { return nil, errors.New("build returned no image config") } var image dockerfile2llb.Image if err := json.Unmarshal(meta, &image); err != nil { return nil, fmt.Errorf("failed to unmarshal image config: %w", err) } return compiler.NewValue().FillFields(map[string]interface{}{
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/task/dockerfile.go
"output": pctx.FS.New(solvedRef).MarshalCUE(), "config": ConvertImageConfig(image.Config), }) } func (t *dockerfileTask) dockerBuildOpts(v *compiler.Value, pctx *plancontext.Context) (map[string]string, error) { opts := map[string]string{} if dockerfilePath := v.Lookup("dockerfile.path"); dockerfilePath.Exists() { filename, err := dockerfilePath.String() if err != nil { return nil, err } opts["filename"] = filename } if target := v.Lookup("target"); target.Exists() { tgr, err := target.String() if err != nil { return nil, err } opts["target"] = tgr } if hosts := v.Lookup("hosts"); hosts.Exists() { p := []string{} fields, err := hosts.Fields() if err != nil { return nil, err } for _, host := range fields { s, err := host.Value.String() if err != nil { return nil, err
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/task/dockerfile.go
} p = append(p, host.Label()+"="+s) } if len(p) > 0 { opts["add-hosts"] = strings.Join(p, ",") } } if buildArgs := v.Lookup("buildArg"); buildArgs.Exists() { fields, err := buildArgs.Fields() if err != nil { return nil, err } for _, buildArg := range fields { s, err := buildArg.Value.String() if err != nil { return nil, err } opts["build-arg:"+buildArg.Label()] = s } } if labels := v.Lookup("label"); labels.Exists() { fields, err := labels.Fields() if err != nil { return nil, err } for _, label := range fields { s, err := label.Value.String() if err != nil { return nil, err }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/task/dockerfile.go
opts["label:"+label.Label()] = s } } if platforms := v.Lookup("platforms"); platforms.Exists() { p := []string{} list, err := platforms.List() if err != nil { return nil, err } for _, platform := range list { s, err := platform.String() if err != nil { return nil, err } p = append(p, s) } if len(p) > 0 { opts["platform"] = strings.Join(p, ",") } if len(p) > 1 { opts["multi-platform"] = "true" } } if opts["platform"] == "" { opts["platform"] = bkplatforms.Format(pctx.Platform.Get()) } return opts, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/task/task.go
package task import ( "context" "errors" "fmt" "sync" "cuelang.org/go/cue" "go.dagger.io/dagger/compiler" "go.dagger.io/dagger/pkg" "go.dagger.io/dagger/plancontext" "go.dagger.io/dagger/solver" ) var ( ErrNotTask = errors.New("not a task") tasks sync.Map typePath = cue.MakePath( cue.Str("$dagger"), cue.Str("task"), cue.Hid("_name", pkg.DaggerPackage)) corePath = cue.MakePath( cue.Str("$dagger"), cue.Str("task"),
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/task/task.go
cue.Hid("_name", pkg.DaggerCorePackage)) paths = []cue.Path{corePath, typePath} ) type State string const ( StateComputing = State("computing") StateCanceled = State("canceled") StateFailed = State("failed") StateCompleted = State("completed") ) type NewFunc func() Task type Task interface { Run(ctx context.Context, pctx *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) } type PreRunner interface { Task PreRun(ctx context.Context, pctx *plancontext.Context, v *compiler.Value) error } func Register(typ string, f NewFunc) { tasks.Store(typ, f) } func New(typ string) Task { v, ok := tasks.Load(typ) if !ok { return nil } fn := v.(NewFunc) return fn() } func Lookup(v *compiler.Value) (Task, error) {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plan/task/task.go
if v.Kind() != cue.StructKind { return nil, ErrNotTask } typeString, err := lookupType(v) if err != nil { return nil, err } t := New(typeString) if t == nil { return nil, fmt.Errorf("unknown type %q", typeString) } return t, nil } func lookupType(v *compiler.Value) (string, error) { for _, path := range paths { typ := v.LookupPath(path) if typ.Exists() { return typ.String() } } return "", ErrNotTask }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plancontext/fs.go
package plancontext import ( "fmt" "sync" "cuelang.org/go/cue" "github.com/google/uuid" "github.com/moby/buildkit/client/llb" bkgw "github.com/moby/buildkit/frontend/gateway/client" "go.dagger.io/dagger/compiler" "go.dagger.io/dagger/pkg" ) var ( fsIDPath = cue.MakePath( cue.Str("$dagger"), cue.Str("fs"), cue.Hid("_id", pkg.DaggerPackage), ) ) func IsFSValue(v *compiler.Value) bool { return v.LookupPath(fsIDPath).Exists() } type FS struct {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plancontext/fs.go
id string result bkgw.Reference } func (fs *FS) Result() bkgw.Reference { return fs.result } func (fs *FS) State() (llb.State, error) { if fs.Result() == nil { return llb.Scratch(), nil } return fs.Result().ToState() } func (fs *FS) MarshalCUE() *compiler.Value { v := compiler.NewValue() if fs.result == nil { if err := v.FillPath(fsIDPath, nil); err != nil { panic(err) } } else { if err := v.FillPath(fsIDPath, fs.id); err != nil { panic(err) } } return v } type fsContext struct {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plancontext/fs.go
l sync.RWMutex store map[string]*FS } func (c *fsContext) New(result bkgw.Reference) *FS { c.l.Lock()
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
plancontext/fs.go
defer c.l.Unlock() fs := &FS{ id: uuid.New().String(), result: result, } c.store[fs.id] = fs return fs } func (c *fsContext) FromValue(v *compiler.Value) (*FS, error) { c.l.RLock() defer c.l.RUnlock() if !v.LookupPath(fsIDPath).IsConcrete() { return nil, fmt.Errorf("invalid FS at path %q: FS is not set", v.Path()) } if v.LookupPath(fsIDPath).Kind() == cue.NullKind { return &FS{}, nil } id, err := v.LookupPath(fsIDPath).String() if err != nil { return nil, fmt.Errorf("invalid FS at path %q: %w", v.Path(), err) } fs, ok := c.store[id] if !ok { return nil, fmt.Errorf("fs %q not found", id) } return fs, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
package progressui import ( "bytes" "context" "fmt" "io" "os" "sort" "strconv" "strings" "time" "github.com/containerd/console" "github.com/moby/buildkit/client" "github.com/morikuni/aec" digest "github.com/opencontainers/go-digest" "github.com/tonistiigi/units" "github.com/tonistiigi/vt100" "golang.org/x/time/rate" ) const ( defaultTickerTimeout = 150 * time.Millisecond defaultDisplayTimeout = 100 * time.Millisecond ) type VertexPrintFunc func(v *client.Vertex, index int) type StatusPrintFunc func(v *client.Vertex, format string, a ...interface{}) type LogPrintFunc func(v *client.Vertex, stream int, partial bool, format string, a ...interface{}) func PrintSolveStatus(ctx context.Context, ch chan *client.SolveStatus, vertexPrintCb VertexPrintFunc, statusPrintCb StatusPrintFunc, logPrintCb LogPrintFunc) error {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
printer := &textMux{ vertexPrintCb: vertexPrintCb, statusPrintCb: statusPrintCb, logPrintCb: logPrintCb, } t := newTrace(false) var done bool ticker := time.NewTicker(defaultTickerTimeout) defer ticker.Stop() displayLimiter := rate.NewLimiter(rate.Every(defaultDisplayTimeout), 1) for { select { case <-ctx.Done(): return ctx.Err() case <-ticker.C: case ss, ok := <-ch: if ok { t.update(ss, 80) } else { done = true } } if done || displayLimiter.Allow() { printer.print(t) if done { t.printErrorLogs(statusPrintCb) return nil } ticker.Stop() ticker = time.NewTicker(defaultTickerTimeout)
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
} } } func DisplaySolveStatus(ctx context.Context, phase string, c console.Console, w io.Writer, ch chan *client.SolveStatus) error { modeConsole := c != nil if !modeConsole { vertexPrintCb := func(v *client.Vertex, index int) { if os.Getenv("PROGRESS_NO_TRUNC") == "0" { fmt.Fprintf(w, "#%d %s\n", index, limitString(v.Name, 72)) } else { fmt.Fprintf(w, "#%d %s\n", index, v.Name) fmt.Fprintf(w, "#%d %s\n", index, v.Digest) } } statusPrintCb := func(v *client.Vertex, format string, a ...interface{}) { fmt.Fprintf(w, fmt.Sprintf("%s\n", format), a...) } logPrintCb := func(v *client.Vertex, stream int, partial bool, format string, a ...interface{}) { if partial { fmt.Fprintf(w, format, a...) } else { fmt.Fprintf(w, fmt.Sprintf("%s\n", format), a...) } } return PrintSolveStatus(ctx, ch, vertexPrintCb, statusPrintCb, logPrintCb) } disp := &display{c: c, phase: phase} if disp.phase == "" { disp.phase = "Building" }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
t := newTrace(true) tickerTimeout := defaultTickerTimeout displayTimeout := defaultDisplayTimeout if v := os.Getenv("TTY_DISPLAY_RATE"); v != "" { if r, err := strconv.ParseInt(v, 10, 64); err == nil { tickerTimeout = time.Duration(r) * time.Millisecond displayTimeout = time.Duration(r) * time.Millisecond } } var done bool ticker := time.NewTicker(tickerTimeout) defer ticker.Stop() displayLimiter := rate.NewLimiter(rate.Every(displayTimeout), 1) var height int width, _ := disp.getSize() for { select { case <-ctx.Done(): return ctx.Err() case <-ticker.C: case ss, ok := <-ch: if ok { t.update(ss, width) } else { done = true } } width, height = disp.getSize() if done { disp.print(t.displayInfo(), width, height, true)
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
t.printErrorLogs(func(v *client.Vertex, format string, a ...interface{}) { fmt.Fprintf(w, format, a...) }) return nil } else if displayLimiter.Allow() { ticker.Stop() ticker = time.NewTicker(tickerTimeout) disp.print(t.displayInfo(), width, height, false) } } } const termHeight = 6 const termPad = 10 type displayInfo struct { startTime time.Time jobs []*job countTotal int countCompleted int } type job struct { startTime *time.Time completedTime *time.Time name string status string hasError bool isCanceled bool vertex *vertex showTerm bool } type trace struct {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
localTimeDiff time.Duration vertexes []*vertex byDigest map[digest.Digest]*vertex nextIndex int updates map[digest.Digest]struct{} modeConsole bool } type log struct { index int line []byte stream int } type vertex struct { *client.Vertex statuses []*status byID map[string]*status indent string index int logs []log logsPartial bool logsOffset int prev *client.Vertex events []string lastBlockTime *time.Time count int statusUpdates map[string]struct{}
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
jobs []*job jobCached bool term *vt100.VT100 termBytes int termCount int } func (v *vertex) update(c int) { if v.count == 0 { now := time.Now() v.lastBlockTime = &now } v.count += c } type status struct { *client.VertexStatus } func newTrace(modeConsole bool) *trace { return &trace{ byDigest: make(map[digest.Digest]*vertex), updates: make(map[digest.Digest]struct{}), modeConsole: modeConsole, } } func (t *trace) triggerVertexEvent(v *client.Vertex) { if v.Started == nil { return
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
} var old client.Vertex vtx := t.byDigest[v.Digest] if v := vtx.prev; v != nil { old = *v } changed := false if v.Digest != old.Digest { changed = true } if v.Name != old.Name { changed = true } if v.Started != old.Started { if v.Started != nil && old.Started == nil || !v.Started.Equal(*old.Started) { changed = true } } if v.Completed != old.Completed && v.Completed != nil { changed = true } if v.Cached != old.Cached { changed = true } if v.Error != old.Error { changed = true } if changed { vtx.update(1) t.updates[v.Digest] = struct{}{}
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
} t.byDigest[v.Digest].prev = v } func (t *trace) update(s *client.SolveStatus, termWidth int) { for _, v := range s.Vertexes { prev, ok := t.byDigest[v.Digest] if !ok { t.nextIndex++ t.byDigest[v.Digest] = &vertex{ byID: make(map[string]*status), statusUpdates: make(map[string]struct{}), index: t.nextIndex, } if t.modeConsole { t.byDigest[v.Digest].term = vt100.NewVT100(termHeight, termWidth-termPad) } } t.triggerVertexEvent(v) if v.Started != nil && (prev == nil || prev.Started == nil) { if t.localTimeDiff == 0 { t.localTimeDiff = time.Since(*v.Started) } t.vertexes = append(t.vertexes, t.byDigest[v.Digest]) } if !(prev != nil && prev.Started != nil && v.Started == nil) { t.byDigest[v.Digest].Vertex = v }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
t.byDigest[v.Digest].jobCached = false } for _, s := range s.Statuses { v, ok := t.byDigest[s.Vertex] if !ok { continue } v.jobCached = false prev, ok := v.byID[s.ID] if !ok { v.byID[s.ID] = &status{VertexStatus: s} } if s.Started != nil && (prev == nil || prev.Started == nil) { v.statuses = append(v.statuses, v.byID[s.ID]) } v.byID[s.ID].VertexStatus = s v.statusUpdates[s.ID] = struct{}{} t.updates[v.Digest] = struct{}{} v.update(1) } for _, l := range s.Logs { l := l v, ok := t.byDigest[l.Vertex] if !ok { continue } v.jobCached = false if v.term != nil { if v.term.Width != termWidth { v.term.Resize(termHeight, termWidth-termPad)
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
} v.termBytes += len(l.Data) v.term.Write(l.Data) } i := 0 complete := split(l.Data, byte('\n'), func(dt []byte) { if v.logsPartial && len(v.logs) != 0 && i == 0 && v.logs[len(v.logs)-1].stream == l.Stream { v.logs[len(v.logs)-1].line = append(v.logs[len(v.logs)-1].line, dt...) } else { ts := time.Duration(0) if v.Started != nil { ts = l.Timestamp.Sub(*v.Started) } prec := 1 sec := ts.Seconds() if sec < 10 { prec = 3 } else if sec < 100 { prec = 2 } v.logs = append(v.logs, log{ line: []byte(fmt.Sprintf("#%d %s %s", v.index, fmt.Sprintf("%.[2]*[1]f", sec, prec), dt)), stream: l.Stream, index: v.index, }) } i++ }) v.logsPartial = !complete t.updates[v.Digest] = struct{}{}
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
v.update(1) } } func (t *trace) printErrorLogs(printCb StatusPrintFunc) { for _, v := range t.vertexes { if v.Error != "" && !strings.HasSuffix(v.Error, context.Canceled.Error()) { printCb(v.Vertex, "------") printCb(v.Vertex, " > %s:", v.Name) for _, l := range v.logs { printCb(v.Vertex, "%s", l.line) } printCb(v.Vertex, "------") } } } func (t *trace) displayInfo() (d displayInfo) { d.startTime = time.Now() if t.localTimeDiff != 0 { d.startTime = t.vertexes[0].Started.Add(t.localTimeDiff) } d.countTotal = len(t.byDigest) for _, v := range t.byDigest { if v.Completed != nil { d.countCompleted++ } } for _, v := range t.vertexes { if v.jobCached { d.jobs = append(d.jobs, v.jobs...)
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
continue } var jobs []*job j := &job{ startTime: addTime(v.Started, t.localTimeDiff), completedTime: addTime(v.Completed, t.localTimeDiff), name: strings.ReplaceAll(v.Name, "\t", " "), vertex: v, } if v.Error != "" { if strings.HasSuffix(v.Error, context.Canceled.Error()) { j.isCanceled = true j.name = "CANCELED " + j.name } else { j.hasError = true j.name = "ERROR " + j.name } } if v.Cached { j.name = "CACHED " + j.name } j.name = v.indent + j.name jobs = append(jobs, j) for _, s := range v.statuses { j := &job{ startTime: addTime(s.Started, t.localTimeDiff), completedTime: addTime(s.Completed, t.localTimeDiff), name: v.indent + "=> " + s.ID, } if s.Total != 0 {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
j.status = fmt.Sprintf("%.2f / %.2f", units.Bytes(s.Current), units.Bytes(s.Total)) } else if s.Current != 0 { j.status = fmt.Sprintf("%.2f", units.Bytes(s.Current)) } jobs = append(jobs, j) } d.jobs = append(d.jobs, jobs...) v.jobs = jobs v.jobCached = true } return d } func split(dt []byte, sep byte, fn func([]byte)) bool { if len(dt) == 0 { return false } for { if len(dt) == 0 { return true } idx := bytes.IndexByte(dt, sep) if idx == -1 { fn(dt) return false } fn(dt[:idx]) dt = dt[idx+1:] } } func addTime(tm *time.Time, d time.Duration) *time.Time {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
if tm == nil { return nil } t := tm.Add(d) return &t } type display struct { c console.Console phase string lineCount int repeated bool } func (disp *display) getSize() (int, int) { width := 80 height := 10 if disp.c != nil { size, err := disp.c.Size() if err == nil && size.Width > 0 && size.Height > 0 { width = int(size.Width) height = int(size.Height) } } return width, height } func setupTerminals(jobs []*job, height int, all bool) []*job {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
var candidates []*job numInUse := 0 for _, j := range jobs { if j.vertex != nil && j.vertex.termBytes > 0 && j.completedTime == nil { candidates = append(candidates, j) } if j.completedTime == nil { numInUse++ } } sort.Slice(candidates, func(i, j int) bool { idxI := candidates[i].vertex.termBytes + candidates[i].vertex.termCount*50 idxJ := candidates[j].vertex.termBytes + candidates[j].vertex.termCount*50 return idxI > idxJ }) numFree := height - 2 - numInUse numToHide := 0 termLimit := termHeight + 3 for i := 0; numFree > termLimit && i < len(candidates); i++ { candidates[i].showTerm = true numToHide += candidates[i].vertex.term.UsedHeight() numFree -= termLimit } if !all { jobs = wrapHeight(jobs, height-2-numToHide) } return jobs } func (disp *display) print(d displayInfo, width, height int, all bool) {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
d.jobs = setupTerminals(d.jobs, height, all) b := aec.EmptyBuilder for i := 0; i <= disp.lineCount; i++ { b = b.Up(1) } if !disp.repeated { b = b.Down(1) } disp.repeated = true fmt.Fprint(disp.c, b.Column(0).ANSI) statusStr := "" if d.countCompleted > 0 && d.countCompleted == d.countTotal && all { statusStr = "FINISHED" } fmt.Fprint(disp.c, aec.Hide) defer fmt.Fprint(disp.c, aec.Show) out := fmt.Sprintf("[+] %s %.1fs (%d/%d) %s", disp.phase, time.Since(d.startTime).Seconds(), d.countCompleted, d.countTotal, statusStr) out = align(out, "", width) fmt.Fprintln(disp.c, out) lineCount := 0 for _, j := range d.jobs { endTime := time.Now() if j.completedTime != nil { endTime = *j.completedTime } if j.startTime == nil { continue } dt := endTime.Sub(*j.startTime).Seconds() if dt < 0.05 {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
dt = 0 } pfx := " => " timer := fmt.Sprintf(" %3.1fs\n", dt) status := j.status showStatus := false left := width - len(pfx) - len(timer) - 1 if status != "" { if left+len(status) > 20 { showStatus = true left -= len(status) + 1 } } if left < 12 { continue } name := j.name if len(name) > left { name = name[:left] } out := pfx + name if showStatus { out += " " + status } out = align(out, timer, width) if j.completedTime != nil { color := aec.BlueF if j.isCanceled { color = aec.YellowF } else if j.hasError {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
color = aec.RedF } out = aec.Apply(out, color) } fmt.Fprint(disp.c, out) lineCount++ if j.showTerm { term := j.vertex.term term.Resize(termHeight, width-termPad) for _, l := range term.Content { if !isEmpty(l) { out := aec.Apply(fmt.Sprintf(" => => # %s\n", string(l)), aec.Faint) fmt.Fprint(disp.c, out) lineCount++ } } j.vertex.termCount++ j.showTerm = false } } if diff := disp.lineCount - lineCount; diff > 0 { for i := 0; i < diff; i++ { fmt.Fprintln(disp.c, strings.Repeat(" ", width)) } fmt.Fprint(disp.c, aec.EmptyBuilder.Up(uint(diff)).Column(0).ANSI) } disp.lineCount = lineCount } func isEmpty(l []rune) bool {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
for _, r := range l { if r != ' ' { return false } } return true } func align(l, r string, w int) string { return fmt.Sprintf("%-[2]*[1]s %[3]s", l, w-len(r)-1, r) } func wrapHeight(j []*job, limit int) []*job {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/display.go
if limit < 0 { return nil } var wrapped []*job wrapped = append(wrapped, j...) if len(j) > limit { wrapped = wrapped[len(j)-limit:] var invisible []*job for _, j := range j[:len(j)-limit] { if j.completedTime == nil { invisible = append(invisible, j) } } if l := len(invisible); l > 0 { rewrapped := make([]*job, 0, len(wrapped)) for _, j := range wrapped { if j.completedTime == nil || l <= 0 { rewrapped = append(rewrapped, j) } l-- } freespace := len(wrapped) - len(rewrapped) invisible = append(invisible[len(invisible)-freespace:], rewrapped...) wrapped = invisible } } return wrapped }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/printer.go
package progressui import ( "context" "fmt" "sort" "strings" "time" digest "github.com/opencontainers/go-digest" "github.com/tonistiigi/units" ) const antiFlicker = 5 * time.Second const maxDelay = 10 * time.Second const minTimeDelta = 5 * time.Second const minProgressDelta = 0.05 type lastStatus struct {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/printer.go
Current int64 Timestamp time.Time } type textMux struct { vertexPrintCb VertexPrintFunc statusPrintCb StatusPrintFunc logPrintCb LogPrintFunc current digest.Digest last map[string]lastStatus notFirst bool } func (p *textMux) printVtx(t *trace, dgst digest.Digest) { if p.last == nil { p.last = make(map[string]lastStatus) } v, ok := t.byDigest[dgst] if !ok { return } if dgst != p.current { if p.current != "" { old := t.byDigest[p.current] if old.logsPartial { p.statusPrintCb(v.Vertex, "") } old.logsOffset = 0 old.count = 0
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/printer.go
p.statusPrintCb(v.Vertex, "#%d ...", old.index) } if p.notFirst { p.statusPrintCb(v.Vertex, "") } else { p.notFirst = true } p.vertexPrintCb(v.Vertex, v.index) } if len(v.events) != 0 { v.logsOffset = 0 } for _, ev := range v.events { p.statusPrintCb(v.Vertex, "#%d %s", v.index, ev) } v.events = v.events[:0] for _, s := range v.statuses { if _, ok := v.statusUpdates[s.ID]; ok { doPrint := true if last, ok := p.last[s.ID]; ok && s.Completed == nil { var progressDelta float64 if s.Total > 0 { progressDelta = float64(s.Current-last.Current) / float64(s.Total) } timeDelta := s.Timestamp.Sub(last.Timestamp) if progressDelta < minProgressDelta && timeDelta < minTimeDelta { doPrint = false } } if !doPrint {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/printer.go
continue } p.last[s.ID] = lastStatus{ Timestamp: s.Timestamp, Current: s.Current, } var bytes string if s.Total != 0 { bytes = fmt.Sprintf(" %.2f / %.2f", units.Bytes(s.Current), units.Bytes(s.Total)) } else if s.Current != 0 { bytes = fmt.Sprintf(" %.2f", units.Bytes(s.Current)) } var tm string endTime := s.Timestamp if s.Completed != nil { endTime = *s.Completed } if s.Started != nil { diff := endTime.Sub(*s.Started).Seconds() if diff > 0.01 { tm = fmt.Sprintf(" %.1fs", diff) } } if s.Completed != nil { tm += " done" } p.statusPrintCb(v.Vertex, "#%d %s%s%s", v.index, s.ID, bytes, tm) } } v.statusUpdates = map[string]struct{}{}
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/printer.go
for i, l := range v.logs { line := l.line if i == 0 { line = line[v.logsOffset:] } complete := i != len(v.logs)-1 || !v.logsPartial p.logPrintCb(v.Vertex, l.stream, !complete, "%s", line) } if len(v.logs) > 0 { if v.logsPartial { v.logs = v.logs[len(v.logs)-1:] v.logsOffset = len(v.logs[0].line) } else {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/printer.go
v.logs = nil v.logsOffset = 0 } } p.current = dgst if v.Completed != nil { p.current = "" v.count = 0 if v.Error != "" { if v.logsPartial { p.statusPrintCb(v.Vertex, "") } if strings.HasSuffix(v.Error, context.Canceled.Error()) { p.statusPrintCb(v.Vertex, "#%d CANCELED", v.index) } else { p.statusPrintCb(v.Vertex, "#%d ERROR: %s", v.index, v.Error) } } else if v.Cached { p.statusPrintCb(v.Vertex, "#%d CACHED", v.index) } else { tm := "" if v.Started != nil { tm = fmt.Sprintf(" %.1fs", v.Completed.Sub(*v.Started).Seconds()) } p.statusPrintCb(v.Vertex, "#%d DONE%s", v.index, tm) } } delete(t.updates, dgst) } func sortCompleted(t *trace, m map[digest.Digest]struct{}) []digest.Digest {
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/printer.go
out := make([]digest.Digest, 0, len(m)) for k := range m { out = append(out, k) } sort.Slice(out, func(i, j int) bool { return t.byDigest[out[i]].Completed.Before(*t.byDigest[out[j]].Completed) }) return out } func (p *textMux) print(t *trace) { completed := map[digest.Digest]struct{}{} rest := map[digest.Digest]struct{}{} for dgst := range t.updates { v, ok := t.byDigest[dgst] if !ok { continue } if v.Vertex.Completed != nil { completed[dgst] = struct{}{}
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/printer.go
} else { rest[dgst] = struct{}{} } } current := p.current if _, ok := completed[current]; ok { p.printVtx(t, current) } for _, dgst := range sortCompleted(t, completed) { if dgst != current { p.printVtx(t, dgst) } } if len(rest) == 0 { if current != "" { if v := t.byDigest[current]; v.Started != nil && v.Completed == nil { return } } for dgst, v := range t.byDigest { if v.Started != nil && v.Completed == nil { p.printVtx(t, dgst) return } }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/printer.go
return } if _, ok := rest[current]; ok { p.printVtx(t, current) } stats := map[digest.Digest]*vtxStat{} now := time.Now() sum := 0.0 var max digest.Digest if current != "" { rest[current] = struct{}{} } for dgst := range rest { v, ok := t.byDigest[dgst] if !ok { continue } tm := now.Sub(*v.lastBlockTime) speed := float64(v.count) / tm.Seconds() overLimit := tm > maxDelay && dgst != current stats[dgst] = &vtxStat{blockTime: tm, speed: speed, overLimit: overLimit} sum += speed if overLimit || max == "" || stats[max].speed < speed { max = dgst } } for dgst := range stats { stats[dgst].share = stats[dgst].speed / sum }
closed
dagger/dagger
https://github.com/dagger/dagger
2,044
🐞 dagger do doesn't output stderr
### What is the issue? `dagger do <action>` doesn't return useful info from stderr. When I change the logging format to `--logformat plain` I get the info I need. ### Log output ``` ➜ service-foo git:(master) βœ— dagger do typescript [βœ”] client.env 0.0s [βœ”] client.filesystem."./".read 0.5s [βœ—] actions.typescript 216.1s 209.9s 8:14PM FTL failed to execute plan: task failed: actions.typescript._build: process "/bin/sh -c cp -r $DEPLOYABLE_NAME/build /output" did not complete successfully: exit code: 1 ``` ``` dagger do typescript --log-format plain 7:51PM INF system | #10 97.11 Failed to compile. 7:51PM INF system | #10 97.11 7:51PM INF system | #10 97.11 src/store/foo.ts 7:51PM INF system | #10 97.11 Line 29:7: Unsafe return of an `any` typed value @typescript-eslint/no-unsafe-return 7:51PM INF system | #10 97.1 7:51PM INF system | #10 97.39 Output: 7:51PM INF system | #10 97.39 7:51PM INF system | #10 97.39 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command. 7:51PM INF system | #10 97.42 error Command failed with exit code 1. 7:51PM INF system | #10 97.42 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 7:51PM ERR actions.typescript._build | failed: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 ``` ### Steps to reproduce _No response_ ### Dagger version dagger 0.2.4 (b32c8732) darwin/amd64 ### OS version osx - 12.01
https://github.com/dagger/dagger/issues/2044
https://github.com/dagger/dagger/pull/2188
437f4517b68347e16704df57c75bd8d418028c8e
27d878456f03fb92fd5c62221a279a7ca261926d
2022-04-05T04:29:38Z
go
2022-04-19T00:50:34Z
util/progressui/printer.go
if _, ok := completed[current]; ok || current == "" { p.printVtx(t, max) return } for dgst := range rest { if stats[dgst].overLimit { p.printVtx(t, dgst) return } } if 1.0/(1.0-stats[current].share)*antiFlicker.Seconds() < stats[current].blockTime.Seconds() { p.printVtx(t, max) return } } type vtxStat struct { blockTime time.Duration speed float64 share float64 overLimit bool } func limitString(s string, l int) string { if len(s) > l { return s[:l] + "..." } return s }
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plan/task/clientnetwork.go
package task import ( "context" "errors" "fmt" "net/url" "os" "github.com/rs/zerolog/log" "go.dagger.io/dagger/compiler" "go.dagger.io/dagger/plancontext" "go.dagger.io/dagger/solver" ) func init() { Register("ClientNetwork", func() Task { return &clientNetwork{} }) } type clientNetwork struct { } func (t clientNetwork) Run(ctx context.Context, pctx *plancontext.Context, _ *solver.Solver, v *compiler.Value) (*compiler.Value, error) { lg := log.Ctx(ctx) addr, err := v.Lookup("address").String()
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plan/task/clientnetwork.go
if err != nil { return nil, err } u, err := url.Parse(addr) if err != nil { return nil, err } lg.Debug().Str("type", u.Scheme).Str("path", u.Path).Msg("loading local socket") if _, err := os.Stat(u.Path); errors.Is(err, os.ErrNotExist) { return nil, fmt.Errorf("path %q does not exist", u.Path) } var unix, npipe string switch u.Scheme { case "unix": unix = u.Path case "npipe": npipe = u.Path default: return nil, fmt.Errorf("invalid service type %q", u.Scheme) } connect := v.Lookup("connect") if !plancontext.IsSocketValue(connect) { return nil, fmt.Errorf("wrong type %q", connect.Kind()) } socket := pctx.Sockets.New(unix, npipe) return compiler.NewValue().FillFields(map[string]interface{}{ "connect": socket.MarshalCUE(), }) }
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plan/task/exec.go
package task import ( "context" "errors" "fmt" "net" "strings" "github.com/moby/buildkit/client/llb" "go.dagger.io/dagger/compiler" "go.dagger.io/dagger/plancontext" "go.dagger.io/dagger/solver" ) func init() { Register("Exec", func() Task { return &execTask{} }) } type execTask struct {
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plan/task/exec.go
} func (t *execTask) Run(ctx context.Context, pctx *plancontext.Context, s *solver.Solver, v *compiler.Value) (*compiler.Value, error) { input, err := pctx.FS.FromValue(v.Lookup("input")) if err != nil { return nil, err } st, err := input.State() if err != nil { return nil, err } opts, err := t.getRunOpts(v, pctx) if err != nil { return nil, err } st = st.Run(opts...).Root()
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plan/task/exec.go
result, err := s.Solve(ctx, st, pctx.Platform.Get()) if err != nil { return nil, err } fs := pctx.FS.New(result) return compiler.NewValue().FillFields(map[string]interface{}{ "output": fs.MarshalCUE(), "exit": 0, }) } func (t *execTask) getRunOpts(v *compiler.Value, pctx *plancontext.Context) ([]llb.RunOption, error) { opts := []llb.RunOption{} var cmd struct { Args []string Always bool } if err := v.Decode(&cmd); err != nil { return nil, err } opts = append(opts, llb.Args(cmd.Args)) workdir, err := v.Lookup("workdir").String() if err != nil { return nil, err } opts = append(opts, llb.Dir(workdir)) envs, err := v.Lookup("env").Fields()
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plan/task/exec.go
if err != nil { return nil, err } for _, env := range envs { if plancontext.IsSecretValue(env.Value) { secret, err := pctx.Secrets.FromValue(env.Value) if err != nil { return nil, err } opts = append(opts, llb.AddSecret(env.Label(), llb.SecretID(secret.ID()), llb.SecretAsEnv(true))) } else { s, err := env.Value.String() if err != nil { return nil, err } opts = append(opts, llb.AddEnv(env.Label(), s)) } } if cmd.Always { opts = append(opts, llb.IgnoreCache) } hosts, err := v.Lookup("hosts").Fields() if err != nil { return nil, err } for _, host := range hosts { s, err := host.Value.String()
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plan/task/exec.go
if err != nil { return nil, err } if err != nil { return nil, err } opts = append(opts, llb.AddExtraHost(host.Label(), net.ParseIP(s))) } user, err := v.Lookup("user").String() if err != nil { return nil, err } opts = append(opts, llb.User(user)) mntOpts, err := t.mountAll(pctx, v.Lookup("mounts")) if err != nil { return nil, err } opts = append(opts, mntOpts...) args := make([]string, 0, len(cmd.Args)) for _, a := range cmd.Args { args = append(args, fmt.Sprintf("%q", a)) } opts = append(opts, withCustomName(v, "Exec [%s]", strings.Join(args, ", "))) return opts, nil } func (t *execTask) mountAll(pctx *plancontext.Context, mounts *compiler.Value) ([]llb.RunOption, error) { opts := []llb.RunOption{}
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plan/task/exec.go
fields, err := mounts.Fields() if err != nil { return nil, err } for _, mnt := range fields { if mnt.Value.Lookup("dest").IsConcreteR() != nil { return nil, fmt.Errorf("mount %q is not concrete", mnt.Selector.String()) } dest, err := mnt.Value.Lookup("dest").String() if err != nil { return nil, err } o, err := t.mount(pctx, dest, mnt.Value) if err != nil { return nil, err } opts = append(opts, o) } return opts, err } func (t *execTask) mount(pctx *plancontext.Context, dest string, mnt *compiler.Value) (llb.RunOption, error) { typ, err := mnt.Lookup("type").String() if err != nil { return nil, err } switch typ { case "cache": return t.mountCache(pctx, dest, mnt) case "tmp": return t.mountTmp(pctx, dest, mnt)
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plan/task/exec.go
case "socket": return t.mountService(pctx, dest, mnt) case "fs": return t.mountFS(pctx, dest, mnt) case "secret": return t.mountSecret(pctx, dest, mnt) case "": return nil, errors.New("no mount type specified") default: return nil, fmt.Errorf("unsupported mount type %q", typ) } } func (t *execTask) mountTmp(_ *plancontext.Context, dest string, _ *compiler.Value) (llb.RunOption, error) { return llb.AddMount( dest, llb.Scratch(), llb.Tmpfs(), ), nil } func (t *execTask) mountCache(_ *plancontext.Context, dest string, mnt *compiler.Value) (llb.RunOption, error) { contents := mnt.Lookup("contents") idValue := contents.Lookup("id") if !idValue.IsConcrete() { return nil, fmt.Errorf("cache %q is not set", mnt.Path().String()) } id, err := idValue.String() if err != nil { return nil, err }
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plan/task/exec.go
concurrency, err := contents.Lookup("concurrency").String() if err != nil { return nil, err } var mode llb.CacheMountSharingMode switch concurrency { case "shared": mode = llb.CacheMountShared case "private": mode = llb.CacheMountPrivate case "locked": mode = llb.CacheMountLocked default: return nil, fmt.Errorf("unknown concurrency mode %q", concurrency) } return llb.AddMount( dest, llb.Scratch(), llb.AsPersistentCacheDir( id, mode, ), ), nil } func (t *execTask) mountFS(pctx *plancontext.Context, dest string, mnt *compiler.Value) (llb.RunOption, error) { contents, err := pctx.FS.FromValue(mnt.Lookup("contents")) if err != nil { return nil, err }
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plan/task/exec.go
var mo []llb.MountOption if source := mnt.Lookup("source"); source.Exists() { src, err := source.String() if err != nil { return nil, err } mo = append(mo, llb.SourcePath(src)) } if ro := mnt.Lookup("ro"); ro.Exists() { readonly, err := ro.Bool() if err != nil { return nil, err } if readonly { mo = append(mo, llb.Readonly) } } st, err := contents.State() if err != nil { return nil, err } return llb.AddMount(dest, st, mo...), nil } func (t *execTask) mountSecret(pctx *plancontext.Context, dest string, mnt *compiler.Value) (llb.RunOption, error) { contents, err := pctx.Secrets.FromValue(mnt.Lookup("contents")) if err != nil { return nil, err } opts := struct {
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plan/task/exec.go
UID int GID int Mask int }{} if err := mnt.Decode(&opts); err != nil { return nil, err } return llb.AddSecret(dest, llb.SecretID(contents.ID()), llb.SecretFileOpt(opts.UID, opts.GID, opts.Mask), ), nil } func (t *execTask) mountService(pctx *plancontext.Context, dest string, mnt *compiler.Value) (llb.RunOption, error) { contents, err := pctx.Sockets.FromValue(mnt.Lookup("contents")) if err != nil { return nil, err } return llb.AddSSHSocket( llb.SSHID(contents.ID()), llb.SSHSocketTarget(dest), ), nil }
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plancontext/service.go
package plancontext import ( "fmt" "sync" "cuelang.org/go/cue" "go.dagger.io/dagger/compiler" "go.dagger.io/dagger/pkg" ) var ( socketIDPath = cue.MakePath( cue.Str("$dagger"), cue.Str("service"), cue.Hid("_id", pkg.DaggerPackage), ) ) func IsSocketValue(v *compiler.Value) bool { return v.LookupPath(socketIDPath).Exists() } type Socket struct {
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plancontext/service.go
id string unix string npipe string } func (s *Socket) ID() string { return s.id } func (s *Socket) Unix() string { return s.unix } func (s *Socket) NPipe() string { return s.npipe } func (s *Socket) MarshalCUE() *compiler.Value { v := compiler.NewValue() if err := v.FillPath(socketIDPath, s.id); err != nil { panic(err) } return v } type socketContext struct { l sync.RWMutex store map[string]*Socket } func (c *socketContext) New(unix, npipe string) *Socket { c.l.Lock() defer c.l.Unlock()
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
plancontext/service.go
s := &Socket{ id: hashID(unix, npipe), unix: unix, npipe: npipe, } c.store[s.id] = s return s } func (c *socketContext) FromValue(v *compiler.Value) (*Socket, error) { c.l.RLock() defer c.l.RUnlock() if !v.LookupPath(socketIDPath).IsConcrete() { return nil, fmt.Errorf("invalid socket at path %q: socket is not set", v.Path()) } id, err := v.LookupPath(socketIDPath).String() if err != nil { return nil, fmt.Errorf("invalid socket at path %q: %w", v.Path(), err) } s, ok := c.store[id] if !ok { return nil, fmt.Errorf("socket %q not found", id) } return s, nil } func (c *socketContext) Get(id string) *Socket { c.l.RLock() defer c.l.RUnlock() return c.store[id] }
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
solver/socketprovider.go
package solver import ( "context" "fmt" "github.com/moby/buildkit/session" "github.com/moby/buildkit/session/sshforward" "go.dagger.io/dagger/plancontext" "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) type SocketProvider struct {
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
solver/socketprovider.go
pctx *plancontext.Context } func NewDockerSocketProvider(pctx *plancontext.Context) session.Attachable { return &SocketProvider{pctx} } func (sp *SocketProvider) Register(server *grpc.Server) { sshforward.RegisterSSHServer(server, sp) } func (sp *SocketProvider) CheckAgent(ctx context.Context, req *sshforward.CheckAgentRequest) (*sshforward.CheckAgentResponse, error) { return &sshforward.CheckAgentResponse{}, nil } func (sp *SocketProvider) ForwardAgent(stream sshforward.SSH_ForwardAgentServer) error { id := sshforward.DefaultID opts, _ := metadata.FromIncomingContext(stream.Context()) if v, ok := opts[sshforward.KeySSHID]; ok && len(v) > 0 && v[0] != "" { id = v[0] } service := sp.pctx.Sockets.Get(id) if service == nil { return fmt.Errorf("invalid socket id %q", id) } conn, err := dialService(service) if err != nil { return fmt.Errorf("failed to connect to %s: %w", id, err) } defer conn.Close() return sshforward.Copy(context.TODO(), conn, stream, nil) }
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
solver/socketprovider_unix.go
package solver import ( "errors" "net" "time" "go.dagger.io/dagger/plancontext" ) func dialService(service *plancontext.Socket) (net.Conn, error) { if service.Unix() == "" { return nil, errors.New("unsupported socket type") } return net.DialTimeout("unix", service.Unix(), time.Second) }
closed
dagger/dagger
https://github.com/dagger/dagger
2,168
cleanup: Finish renaming Service to Socket
`dagger.#Service` was renamed `dagger.#Socket` in #1889 (see #1870) While the CUE API was updated, there's still bits of Go code using `Service` (due to time constraints at the time). /cc @helderco
https://github.com/dagger/dagger/issues/2168
https://github.com/dagger/dagger/pull/2250
b6afe0106e498bde98c7a552965ee732218b07c8
fb7bcb48627c15adba8a735c6cfb9809fd601734
2022-04-13T01:28:53Z
go
2022-04-21T15:57:54Z
solver/socketprovider_windows.go
package solver import ( "errors" "net" "time" "github.com/Microsoft/go-winio" "go.dagger.io/dagger/plancontext" ) func dialService(service *plancontext.Service) (net.Conn, error) { if service.NPipe() == "" { return nil, errors.New("unsupported socket type") } dur := time.Second return winio.DialPipe(service.NPipe(), &dur) }
closed
dagger/dagger
https://github.com/dagger/dagger
2,059
Scope cache by PR
buildkit caching is not additive, e.g., it can only import/export cache off a single `dagger do`. In our own CI, it means that each PR is overwriting the cache with that PR's content. Which in turn means each PR is invaliding each other's cache. Example: - `PR 1` has some go changes. Cache is built using that source code and exported - `PR 2` has different go changes. Cache is re-built using that source code, overwriting `PR 1` cache - `PR 1` has an update. It will load cache from `PR 2`, resulting in loss of caching from the previous run I've no idea what a plausible workaround for this might be. In an ideal world, buildkit would have additive caching and we'd have layers for both `PR 1` and `PR 2`. In the meantime, I don't know if we could play around with multiple `cache-from` targets, e.g. - Import cache from `ci-main` and `ci-<PRID>` - Export cache to `ci-<PRID>` - When running on `main`, export cache to `ci-main` /cc @TomChv @gerhard
https://github.com/dagger/dagger/issues/2059
https://github.com/dagger/dagger/pull/2120
58e03969aeac8dd88327ddf4ed9daf4410ff7c1a
c1bc12ae0593735003c9532a2883f657e2fffbc9
2022-04-06T18:57:36Z
go
2022-04-25T23:30:29Z
cmd/dagger/cmd/common/common.go
package common import ( "context" "fmt" "strings" "cuelang.org/go/cue" "github.com/containerd/containerd/platforms" "github.com/docker/buildx/util/buildflags" "github.com/mitchellh/go-homedir" buildkit "github.com/moby/buildkit/client" specs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/rs/zerolog/log" "github.com/spf13/viper" "go.dagger.io/dagger/client" "go.dagger.io/dagger/compiler" "go.dagger.io/dagger/plancontext" ) func FormatValue(val *compiler.Value) string {
closed
dagger/dagger
https://github.com/dagger/dagger
2,059
Scope cache by PR
buildkit caching is not additive, e.g., it can only import/export cache off a single `dagger do`. In our own CI, it means that each PR is overwriting the cache with that PR's content. Which in turn means each PR is invaliding each other's cache. Example: - `PR 1` has some go changes. Cache is built using that source code and exported - `PR 2` has different go changes. Cache is re-built using that source code, overwriting `PR 1` cache - `PR 1` has an update. It will load cache from `PR 2`, resulting in loss of caching from the previous run I've no idea what a plausible workaround for this might be. In an ideal world, buildkit would have additive caching and we'd have layers for both `PR 1` and `PR 2`. In the meantime, I don't know if we could play around with multiple `cache-from` targets, e.g. - Import cache from `ci-main` and `ci-<PRID>` - Export cache to `ci-<PRID>` - When running on `main`, export cache to `ci-main` /cc @TomChv @gerhard
https://github.com/dagger/dagger/issues/2059
https://github.com/dagger/dagger/pull/2120
58e03969aeac8dd88327ddf4ed9daf4410ff7c1a
c1bc12ae0593735003c9532a2883f657e2fffbc9
2022-04-06T18:57:36Z
go
2022-04-25T23:30:29Z
cmd/dagger/cmd/common/common.go
switch { case val.HasAttr("artifact"): return "dagger.#Artifact" case plancontext.IsSecretValue(val): return "dagger.#Secret" case plancontext.IsFSValue(val): return "dagger.#FS" case plancontext.IsSocketValue(val): return "dagger.#Socket" } if val.IsConcreteR() != nil { return val.IncompleteKind().String() } if val.IncompleteKind() == cue.StructKind { return "struct" } valStr := fmt.Sprintf("%v", val.Cue()) return strings.ReplaceAll(valStr, "\n", "\\n") } func ValueDocFull(val *compiler.Value) string {
closed
dagger/dagger
https://github.com/dagger/dagger
2,059
Scope cache by PR
buildkit caching is not additive, e.g., it can only import/export cache off a single `dagger do`. In our own CI, it means that each PR is overwriting the cache with that PR's content. Which in turn means each PR is invaliding each other's cache. Example: - `PR 1` has some go changes. Cache is built using that source code and exported - `PR 2` has different go changes. Cache is re-built using that source code, overwriting `PR 1` cache - `PR 1` has an update. It will load cache from `PR 2`, resulting in loss of caching from the previous run I've no idea what a plausible workaround for this might be. In an ideal world, buildkit would have additive caching and we'd have layers for both `PR 1` and `PR 2`. In the meantime, I don't know if we could play around with multiple `cache-from` targets, e.g. - Import cache from `ci-main` and `ci-<PRID>` - Export cache to `ci-<PRID>` - When running on `main`, export cache to `ci-main` /cc @TomChv @gerhard
https://github.com/dagger/dagger/issues/2059
https://github.com/dagger/dagger/pull/2120
58e03969aeac8dd88327ddf4ed9daf4410ff7c1a
c1bc12ae0593735003c9532a2883f657e2fffbc9
2022-04-06T18:57:36Z
go
2022-04-25T23:30:29Z
cmd/dagger/cmd/common/common.go
docs := []string{} for _, c := range val.Doc() { docs = append(docs, c.Text()) } doc := strings.TrimSpace(strings.Join(docs, "\n")) if len(doc) == 0 { return "-" } return doc } func ValueDocOneLine(val *compiler.Value) string {
closed
dagger/dagger
https://github.com/dagger/dagger
2,059
Scope cache by PR
buildkit caching is not additive, e.g., it can only import/export cache off a single `dagger do`. In our own CI, it means that each PR is overwriting the cache with that PR's content. Which in turn means each PR is invaliding each other's cache. Example: - `PR 1` has some go changes. Cache is built using that source code and exported - `PR 2` has different go changes. Cache is re-built using that source code, overwriting `PR 1` cache - `PR 1` has an update. It will load cache from `PR 2`, resulting in loss of caching from the previous run I've no idea what a plausible workaround for this might be. In an ideal world, buildkit would have additive caching and we'd have layers for both `PR 1` and `PR 2`. In the meantime, I don't know if we could play around with multiple `cache-from` targets, e.g. - Import cache from `ci-main` and `ci-<PRID>` - Export cache to `ci-<PRID>` - When running on `main`, export cache to `ci-main` /cc @TomChv @gerhard
https://github.com/dagger/dagger/issues/2059
https://github.com/dagger/dagger/pull/2120
58e03969aeac8dd88327ddf4ed9daf4410ff7c1a
c1bc12ae0593735003c9532a2883f657e2fffbc9
2022-04-06T18:57:36Z
go
2022-04-25T23:30:29Z
cmd/dagger/cmd/common/common.go
docs := []string{} for _, c := range val.Doc() { docs = append(docs, strings.TrimSpace(c.Text())) } doc := strings.Join(docs, " ") lines := strings.Split(doc, "\n") docs = []string{} for _, line := range lines { if strings.HasPrefix(line, "FIXME: ") || strings.HasPrefix(line, "TODO: ") || strings.HasPrefix(line, "INTERNAL: ") { continue } if len(line) == 0 { continue } docs = append(docs, line) } if len(docs) == 0 { return "-" } return strings.Join(docs, " ") } func convertRelativePaths(cacheOptionEntries []buildkit.CacheOptionsEntry) []buildkit.CacheOptionsEntry {
closed
dagger/dagger
https://github.com/dagger/dagger
2,059
Scope cache by PR
buildkit caching is not additive, e.g., it can only import/export cache off a single `dagger do`. In our own CI, it means that each PR is overwriting the cache with that PR's content. Which in turn means each PR is invaliding each other's cache. Example: - `PR 1` has some go changes. Cache is built using that source code and exported - `PR 2` has different go changes. Cache is re-built using that source code, overwriting `PR 1` cache - `PR 1` has an update. It will load cache from `PR 2`, resulting in loss of caching from the previous run I've no idea what a plausible workaround for this might be. In an ideal world, buildkit would have additive caching and we'd have layers for both `PR 1` and `PR 2`. In the meantime, I don't know if we could play around with multiple `cache-from` targets, e.g. - Import cache from `ci-main` and `ci-<PRID>` - Export cache to `ci-<PRID>` - When running on `main`, export cache to `ci-main` /cc @TomChv @gerhard
https://github.com/dagger/dagger/issues/2059
https://github.com/dagger/dagger/pull/2120
58e03969aeac8dd88327ddf4ed9daf4410ff7c1a
c1bc12ae0593735003c9532a2883f657e2fffbc9
2022-04-06T18:57:36Z
go
2022-04-25T23:30:29Z
cmd/dagger/cmd/common/common.go
pathableAttributes := []string{"src", "dest"} for _, option := range cacheOptionEntries { for _, key := range pathableAttributes { if _, ok := option.Attrs[key]; ok { path, err := homedir.Expand(option.Attrs[key]) if err != nil { panic(err) } option.Attrs[key] = path } } } return cacheOptionEntries } func NewClient(ctx context.Context) *client.Client {
closed
dagger/dagger
https://github.com/dagger/dagger
2,059
Scope cache by PR
buildkit caching is not additive, e.g., it can only import/export cache off a single `dagger do`. In our own CI, it means that each PR is overwriting the cache with that PR's content. Which in turn means each PR is invaliding each other's cache. Example: - `PR 1` has some go changes. Cache is built using that source code and exported - `PR 2` has different go changes. Cache is re-built using that source code, overwriting `PR 1` cache - `PR 1` has an update. It will load cache from `PR 2`, resulting in loss of caching from the previous run I've no idea what a plausible workaround for this might be. In an ideal world, buildkit would have additive caching and we'd have layers for both `PR 1` and `PR 2`. In the meantime, I don't know if we could play around with multiple `cache-from` targets, e.g. - Import cache from `ci-main` and `ci-<PRID>` - Export cache to `ci-<PRID>` - When running on `main`, export cache to `ci-main` /cc @TomChv @gerhard
https://github.com/dagger/dagger/issues/2059
https://github.com/dagger/dagger/pull/2120
58e03969aeac8dd88327ddf4ed9daf4410ff7c1a
c1bc12ae0593735003c9532a2883f657e2fffbc9
2022-04-06T18:57:36Z
go
2022-04-25T23:30:29Z
cmd/dagger/cmd/common/common.go
lg := log.Ctx(ctx) cacheExports, err := buildflags.ParseCacheEntry(viper.GetStringSlice("cache-to")) if err != nil { lg.Fatal().Err(err).Msg("unable to parse --cache-to options") } cacheImports, err := buildflags.ParseCacheEntry(viper.GetStringSlice("cache-from")) if err != nil { lg.Fatal().Err(err).Msg("unable to parse --cache-from options") } ep := viper.GetString("platform") var p *specs.Platform if len(ep) > 0 { pp, err := platforms.Parse(ep) if err != nil { lg.Fatal().Err(err).Msg("invalid value for --platform") } p = &pp } cl, err := client.New(ctx, "", client.Config{ CacheExports: convertRelativePaths(cacheExports), CacheImports: convertRelativePaths(cacheImports), NoCache: viper.GetBool("no-cache"), TargetPlatform: p, }) if err != nil { lg.Fatal().Err(err).Msg("unable to create client") } return cl }
closed
dagger/dagger
https://github.com/dagger/dagger
449
Duplicate log messages
This will naturally run only once ("echo LOL" one time): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, ] ``` This will run twice (echo LOL multiple times): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, op.#PushContainer & { ref: "push-registry.local/dagger/test:1" }, ] ``` If you add DockerLogin before, it runs once more.
https://github.com/dagger/dagger/issues/449
https://github.com/dagger/dagger/pull/2267
92c8c7a2da9ec90a924d7236e540f83ec1f12419
2bcd0ac31ce760ce23700b5611fa580aad3c165b
2021-05-12T17:51:41Z
go
2022-04-26T18:10:27Z
solver/solver.go
package solver import ( "context" "encoding/json" "errors" "fmt" "strings" "sync" bk "github.com/moby/buildkit/client" "github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/exporter/containerimage/exptypes" "github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb" bkgw "github.com/moby/buildkit/frontend/gateway/client" "github.com/moby/buildkit/session" bkpb "github.com/moby/buildkit/solver/pb" "github.com/opencontainers/go-digest" specs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/rs/zerolog/log" "go.dagger.io/dagger/plancontext" ) type Solver struct { opts Opts eventsWg *sync.WaitGroup closeCh chan *bk.SolveStatus refs []bkgw.Reference l sync.RWMutex } type Opts struct {
closed
dagger/dagger
https://github.com/dagger/dagger
449
Duplicate log messages
This will naturally run only once ("echo LOL" one time): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, ] ``` This will run twice (echo LOL multiple times): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, op.#PushContainer & { ref: "push-registry.local/dagger/test:1" }, ] ``` If you add DockerLogin before, it runs once more.
https://github.com/dagger/dagger/issues/449
https://github.com/dagger/dagger/pull/2267
92c8c7a2da9ec90a924d7236e540f83ec1f12419
2bcd0ac31ce760ce23700b5611fa580aad3c165b
2021-05-12T17:51:41Z
go
2022-04-26T18:10:27Z
solver/solver.go
Control *bk.Client Gateway bkgw.Client Events chan *bk.SolveStatus Context *plancontext.Context Auth *RegistryAuthProvider NoCache bool CacheImports []bkgw.CacheOptionsEntry } func New(opts Opts) *Solver { return &Solver{ eventsWg: &sync.WaitGroup{}, closeCh: make(chan *bk.SolveStatus), opts: opts, } } func invalidateCache(def *llb.Definition) error { for _, dt := range def.Def { var op bkpb.Op if err := (&op).Unmarshal(dt); err != nil { return err } dgst := digest.FromBytes(dt) opMetadata, ok := def.Metadata[dgst] if !ok { opMetadata = bkpb.OpMetadata{} }
closed
dagger/dagger
https://github.com/dagger/dagger
449
Duplicate log messages
This will naturally run only once ("echo LOL" one time): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, ] ``` This will run twice (echo LOL multiple times): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, op.#PushContainer & { ref: "push-registry.local/dagger/test:1" }, ] ``` If you add DockerLogin before, it runs once more.
https://github.com/dagger/dagger/issues/449
https://github.com/dagger/dagger/pull/2267
92c8c7a2da9ec90a924d7236e540f83ec1f12419
2bcd0ac31ce760ce23700b5611fa580aad3c165b
2021-05-12T17:51:41Z
go
2022-04-26T18:10:27Z
solver/solver.go
c := llb.Constraints{Metadata: opMetadata} llb.IgnoreCache(&c) def.Metadata[dgst] = c.Metadata } return nil } func (s *Solver) GetOptions() Opts { return s.opts } func (s *Solver) NoCache() bool { return s.opts.NoCache } func (s *Solver) Stop() { close(s.closeCh) s.eventsWg.Wait() close(s.opts.Events) } func (s *Solver) AddCredentials(target, username, secret string) { s.opts.Auth.AddCredentials(target, username, secret) } func (s *Solver) Marshal(ctx context.Context, st llb.State, co ...llb.ConstraintsOpt) (*bkpb.Definition, error) { def, err := st.Marshal(ctx, co...) if err != nil { return nil, err } if s.opts.NoCache { if err := invalidateCache(def); err != nil { return nil, err } }
closed
dagger/dagger
https://github.com/dagger/dagger
449
Duplicate log messages
This will naturally run only once ("echo LOL" one time): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, ] ``` This will run twice (echo LOL multiple times): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, op.#PushContainer & { ref: "push-registry.local/dagger/test:1" }, ] ``` If you add DockerLogin before, it runs once more.
https://github.com/dagger/dagger/issues/449
https://github.com/dagger/dagger/pull/2267
92c8c7a2da9ec90a924d7236e540f83ec1f12419
2bcd0ac31ce760ce23700b5611fa580aad3c165b
2021-05-12T17:51:41Z
go
2022-04-26T18:10:27Z
solver/solver.go
return def.ToPB(), nil } func (s *Solver) SessionID() string { return s.opts.Gateway.BuildOpts().SessionID } func (s *Solver) ResolveImageConfig(ctx context.Context, ref string, opts llb.ResolveImageConfigOpt) (dockerfile2llb.Image, digest.Digest, error) { var image dockerfile2llb.Image dg, meta, err := s.opts.Gateway.ResolveImageConfig(ctx, ref, opts) if err != nil { return image, "", err } if err := json.Unmarshal(meta, &image); err != nil { return image, "", err } return image, dg, nil } func (s *Solver) SolveRequest(ctx context.Context, req bkgw.SolveRequest) (*bkgw.Result, error) { req.Evaluate = true res, err := s.opts.Gateway.Solve(ctx, req) if err != nil { return nil, CleanError(err) } return res, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
449
Duplicate log messages
This will naturally run only once ("echo LOL" one time): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, ] ``` This will run twice (echo LOL multiple times): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, op.#PushContainer & { ref: "push-registry.local/dagger/test:1" }, ] ``` If you add DockerLogin before, it runs once more.
https://github.com/dagger/dagger/issues/449
https://github.com/dagger/dagger/pull/2267
92c8c7a2da9ec90a924d7236e540f83ec1f12419
2bcd0ac31ce760ce23700b5611fa580aad3c165b
2021-05-12T17:51:41Z
go
2022-04-26T18:10:27Z
solver/solver.go
func (s *Solver) References() []bkgw.Reference { s.l.RLock() defer s.l.RUnlock() return s.refs } func (s *Solver) Solve(ctx context.Context, st llb.State, platform specs.Platform) (bkgw.Reference, error) { def, err := s.Marshal(ctx, st, llb.Platform(platform)) if err != nil { return nil, err } jsonLLB, err := dumpLLB(def) if err != nil { return nil, err } log. Ctx(ctx). Trace(). RawJSON("llb", jsonLLB). Msg("solving") res, err := s.SolveRequest(ctx, bkgw.SolveRequest{ Definition: def, CacheImports: s.opts.CacheImports, }) if err != nil { return nil, err } ref, err := res.SingleRef() if err != nil { return nil, err
closed
dagger/dagger
https://github.com/dagger/dagger
449
Duplicate log messages
This will naturally run only once ("echo LOL" one time): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, ] ``` This will run twice (echo LOL multiple times): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, op.#PushContainer & { ref: "push-registry.local/dagger/test:1" }, ] ``` If you add DockerLogin before, it runs once more.
https://github.com/dagger/dagger/issues/449
https://github.com/dagger/dagger/pull/2267
92c8c7a2da9ec90a924d7236e540f83ec1f12419
2bcd0ac31ce760ce23700b5611fa580aad3c165b
2021-05-12T17:51:41Z
go
2022-04-26T18:10:27Z
solver/solver.go
} s.l.Lock() defer s.l.Unlock() s.refs = append(s.refs, ref) return ref, nil } func (s *Solver) forwardEvents(ch chan *bk.SolveStatus) { s.eventsWg.Add(1) defer s.eventsWg.Done() for event := range ch { s.opts.Events <- event } } func (s *Solver) Export(ctx context.Context, st llb.State, img *dockerfile2llb.Image, output bk.ExportEntry, platform specs.Platform) (*bk.SolveResponse, error) { select { case <-s.closeCh: return nil, context.Canceled default: } def, err := s.Marshal(ctx, st, llb.Platform(platform)) if err != nil { return nil, err } opts := bk.SolveOpt{ Exports: []bk.ExportEntry{output}, Session: []session.Attachable{ s.opts.Auth, NewSecretsStoreProvider(s.opts.Context), NewDockerSocketProvider(s.opts.Context),
closed
dagger/dagger
https://github.com/dagger/dagger
449
Duplicate log messages
This will naturally run only once ("echo LOL" one time): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, ] ``` This will run twice (echo LOL multiple times): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, op.#PushContainer & { ref: "push-registry.local/dagger/test:1" }, ] ``` If you add DockerLogin before, it runs once more.
https://github.com/dagger/dagger/issues/449
https://github.com/dagger/dagger/pull/2267
92c8c7a2da9ec90a924d7236e540f83ec1f12419
2bcd0ac31ce760ce23700b5611fa580aad3c165b
2021-05-12T17:51:41Z
go
2022-04-26T18:10:27Z
solver/solver.go
}, } ch := make(chan *bk.SolveStatus) go s.forwardEvents(ch) return s.opts.Control.Build(ctx, opts, "", func(ctx context.Context, c bkgw.Client) (*bkgw.Result, error) { res, err := c.Solve(ctx, bkgw.SolveRequest{ Definition: def, }) if err != nil { return nil, err } if img != nil { config, err := json.Marshal(img) if err != nil { return nil, fmt.Errorf("failed to marshal image config: %w", err) } res.AddMeta(exptypes.ExporterImageConfigKey, config) } return res, nil }, ch) } type llbOp struct { Op bkpb.Op Digest digest.Digest OpMetadata bkpb.OpMetadata } func dumpLLB(def *bkpb.Definition) ([]byte, error) {
closed
dagger/dagger
https://github.com/dagger/dagger
449
Duplicate log messages
This will naturally run only once ("echo LOL" one time): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, ] ``` This will run twice (echo LOL multiple times): ``` foo: #up: [ op.#DockerBuild & { dockerfile: """ FROM dubodubonduponey/debian ARG TARGETPLATFORM RUN echo LOL $TARGETPLATFORM """ }, op.#PushContainer & { ref: "push-registry.local/dagger/test:1" }, ] ``` If you add DockerLogin before, it runs once more.
https://github.com/dagger/dagger/issues/449
https://github.com/dagger/dagger/pull/2267
92c8c7a2da9ec90a924d7236e540f83ec1f12419
2bcd0ac31ce760ce23700b5611fa580aad3c165b
2021-05-12T17:51:41Z
go
2022-04-26T18:10:27Z
solver/solver.go
ops := make([]llbOp, 0, len(def.Def)) for _, dt := range def.Def { var op bkpb.Op if err := (&op).Unmarshal(dt); err != nil { return nil, fmt.Errorf("failed to parse op: %w", err) } dgst := digest.FromBytes(dt) ent := llbOp{Op: op, Digest: dgst, OpMetadata: def.Metadata[dgst]} ops = append(ops, ent) } return json.Marshal(ops) } func CleanError(err error) error { noise := []string{ "executor failed running ", "buildkit-runc did not terminate successfully", "rpc error: code = Unknown desc = ", "failed to solve: ", } msg := err.Error() for _, s := range noise { msg = strings.ReplaceAll(msg, s, "") } return errors.New(msg) }
closed
dagger/dagger
https://github.com/dagger/dagger
2,299
`--help` suppressed plan loading errors
```console $ dagger do -p ./plan/do/do_flags.cue test --help Usage: dagger do [flags] ``` vs ```console $ dagger do -p ./plan/do/do_flags.cue test failed to load plan: "actions.test.message" is not set: ./plan/do/do_flags.cue:21:3 ./plan/do/do_flags.cue:25:4 Usage: dagger do [flags] ```
https://github.com/dagger/dagger/issues/2299
https://github.com/dagger/dagger/pull/2378
453102b5f261c6e9d4b5d5bceee89a2aef55134f
9fb0313ab2aeb82bcd4367d7c8e4103a386fb873
2022-04-25T17:32:14Z
go
2022-05-02T19:39:27Z
cmd/dagger/cmd/do.go
package cmd import ( "context" "fmt" "io" "os" "path/filepath" "strings" "text/tabwriter" "cuelang.org/go/cue" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" "go.dagger.io/dagger/cmd/dagger/cmd/common" "go.dagger.io/dagger/cmd/dagger/logger" "go.dagger.io/dagger/plan" "go.dagger.io/dagger/solver" "go.dagger.io/dagger/telemetry" "golang.org/x/term" )