Skip to content

Commit

Permalink
fix(exec): dereference outputs container config for executor setup (#612
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ecrupper authored Nov 1, 2024
1 parent 04b2f56 commit 402d3d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions cmd/vela-worker/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,11 @@ func (w *Worker) exec(index int, config *api.Worker) error {
break
}

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

// create logger with extra metadata
//
Expand Down Expand Up @@ -238,7 +241,7 @@ func (w *Worker) exec(index int, config *api.Worker) error {
Build: item.Build,
Pipeline: p.Sanitize(w.Config.Runtime.Driver),
Version: v.Semantic(),
OutputCtn: w.Config.Executor.OutputCtn,
OutputCtn: &execOutputCtn,
})

// add the executor to the worker
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
QUEUE_DRIVER: redis
# comment the line below to source Redis address from server
QUEUE_ADDR: 'redis://redis:6379'
VELA_BUILD_LIMIT: 1
VELA_BUILD_LIMIT: 3
VELA_BUILD_TIMEOUT: 30m
VELA_LOG_LEVEL: trace
VELA_RUNTIME_DRIVER: docker
Expand Down

0 comments on commit 402d3d0

Please sign in to comment.