Improve tty error logging when buildkit vertex is unknown (#2188)
* Improve tty error logging when buildkit vertex is unknown Creates a generic "system" group in the tty output which captures buildkit events that report a non-dagger vertex name. This happens currently when using core.#Dockerfile actions since Dagger delegates the LLB generation to buildkit through it's frontend and we don't get meaningful events that we can correlate from Dagger's side Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
This commit is contained in:
@@ -25,9 +25,11 @@ const (
|
||||
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{})
|
||||
type (
|
||||
VertexPrintFunc func(v *client.Vertex, index int)
|
||||
StatusPrintFunc func(v *client.Vertex, format string, a ...interface{})
|
||||
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 {
|
||||
printer := &textMux{
|
||||
@@ -148,8 +150,10 @@ func DisplaySolveStatus(ctx context.Context, phase string, c console.Console, w
|
||||
}
|
||||
}
|
||||
|
||||
const termHeight = 6
|
||||
const termPad = 10
|
||||
const (
|
||||
termHeight = 6
|
||||
termPad = 10
|
||||
)
|
||||
|
||||
type displayInfo struct {
|
||||
startTime time.Time
|
||||
|
@@ -11,10 +11,12 @@ import (
|
||||
"github.com/tonistiigi/units"
|
||||
)
|
||||
|
||||
const antiFlicker = 5 * time.Second
|
||||
const maxDelay = 10 * time.Second
|
||||
const minTimeDelta = 5 * time.Second
|
||||
const minProgressDelta = 0.05 // %
|
||||
const (
|
||||
antiFlicker = 5 * time.Second
|
||||
maxDelay = 10 * time.Second
|
||||
minTimeDelta = 5 * time.Second
|
||||
minProgressDelta = 0.05 // %
|
||||
)
|
||||
|
||||
type lastStatus struct {
|
||||
Current int64
|
||||
|
Reference in New Issue
Block a user