File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ func Build(ctx context.Context, opts *BOpts) error {
88
88
export .Output = func (map [string ]string ) (io.WriteCloser , error ) {
89
89
return wf , nil
90
90
}
91
- export .Attrs ["output" ] = filepath .Join (opts .basePath , "out.tar" )
91
+ export .Attrs ["output" ] = filepath .Join (GlobalExportPath , opts .BuildID , "out.tar" )
92
92
if _ , ok := export .Attrs ["name" ]; ! ok {
93
93
export .Attrs ["name" ] = opts .Tag
94
94
}
Original file line number Diff line number Diff line change @@ -120,13 +120,15 @@ func (p *StreamPipeline) Run() error {
120
120
case err == nil :
121
121
stage .process (pkt )
122
122
handled = true
123
- break
124
123
case errors .Is (err , ErrIgnorePacket ):
125
124
continue
126
125
default : // real error
127
126
logrus .WithError (err ).Warn ("Filter error" )
128
127
continue
129
128
}
129
+ if handled {
130
+ break
131
+ }
130
132
}
131
133
if ! handled {
132
134
logrus .WithField ("build_id" , pkt .BuildId ).Debug ("dropped unhandled packet" )
@@ -136,6 +138,6 @@ func (p *StreamPipeline) Run() error {
136
138
137
139
<- p .ctx .Done ()
138
140
p .wg .Wait ()
139
- close ( p . sendCh )
141
+ // Don't close sendCh - let it be garbage collected to avoid "send on closed channel" panic
140
142
return p .ctx .Err ()
141
143
}
You can’t perform that action at this time.
0 commit comments