Skip to content

Commit bbba135

Browse files
committed
fix: ensure loader initialization in server handlers and gh token isolation
- Initialize workflow loader in executeRunsConcurrently for proper path resolution - Set loader on all executor instances (CreateRun, StartRun, executeRunsConcurrently) - Unset GH_TOKEN in github-action Makefile target to prevent token conflicts
1 parent bef52a2 commit bbba135

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ github-release:
318318
export GORELEASER_CURRENT_TAG="$(VERSION)" && goreleaser release --clean
319319

320320
github-action:
321-
gh workflow run manual-release.yaml && gh workflow run nightly-release.yaml
321+
unset GH_TOKEN &&gh workflow run manual-release.yaml && gh workflow run nightly-release.yaml
322322

323323
# Database commands
324324
db-seed: build

pkg/server/handlers/runs.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ func executeRunsConcurrently(
160160
maxConcurrency = 1
161161
}
162162

163+
loader := parser.NewLoader(cfg.WorkflowsPath)
164+
163165
sem := make(chan struct{}, maxConcurrency) // Semaphore
164166
var wg sync.WaitGroup
165167

@@ -193,6 +195,7 @@ func executeRunsConcurrently(
193195
// Execute workflow
194196
exec := executor.NewExecutor()
195197
exec.SetServerMode(true) // Enable file logging for server mode
198+
exec.SetLoader(loader)
196199

197200
// Set up database progress tracking
198201
if runUUID != "" {
@@ -370,6 +373,7 @@ func CreateRun(cfg *config.Config) fiber.Handler {
370373

371374
exec := executor.NewExecutor()
372375
exec.SetServerMode(true) // Enable file logging for server mode
376+
exec.SetLoader(loader)
373377

374378
// Set up database progress tracking
375379
if run != nil {
@@ -782,6 +786,7 @@ func StartRun(cfg *config.Config) fiber.Handler {
782786
// Create executor
783787
exec := executor.NewExecutor()
784788
exec.SetServerMode(true)
789+
exec.SetLoader(loader)
785790
exec.SetDBRunUUID(runUUID)
786791
exec.SetDBRunID(runID)
787792
exec.SetOnStepCompleted(func(stepCtx context.Context, dbRunUUID string) {

0 commit comments

Comments
 (0)