Skip to content

Commit 0f0deb2

Browse files
authored
fix(patch/v25.2): dereference outputs ctn config (#614)
1 parent 964d7a1 commit 0f0deb2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cmd/vela-worker/exec.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,11 @@ func (w *Worker) exec(index int, config *api.Worker) error {
146146
break
147147
}
148148

149-
// set the outputs container ID
150-
w.Config.Executor.OutputCtn.ID = fmt.Sprintf("outputs_%s", p.ID)
149+
// dereference configured outputs ctn config and set the outputs container ID for the executor
150+
//
151+
// need to dereference to avoid executors sharing the last set outputs container config
152+
execOutputCtn := *w.Config.Executor.OutputCtn
153+
execOutputCtn.ID = fmt.Sprintf("outputs_%s", p.ID)
151154

152155
// create logger with extra metadata
153156
//
@@ -240,7 +243,7 @@ func (w *Worker) exec(index int, config *api.Worker) error {
240243
Build: item.Build,
241244
Pipeline: p.Sanitize(w.Config.Runtime.Driver),
242245
Version: v.Semantic(),
243-
OutputCtn: w.Config.Executor.OutputCtn,
246+
OutputCtn: &execOutputCtn,
244247
})
245248

246249
// add the executor to the worker

0 commit comments

Comments
 (0)