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
This commit is contained in:
j3ssie
2026-01-26 01:52:24 +08:00
parent bef52a2223
commit bbba13501f
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -318,7 +318,7 @@ github-release:
export GORELEASER_CURRENT_TAG="$(VERSION)" && goreleaser release --clean
github-action:
gh workflow run manual-release.yaml && gh workflow run nightly-release.yaml
unset GH_TOKEN &&gh workflow run manual-release.yaml && gh workflow run nightly-release.yaml
# Database commands
db-seed: build
+5
View File
@@ -160,6 +160,8 @@ func executeRunsConcurrently(
maxConcurrency = 1
}
loader := parser.NewLoader(cfg.WorkflowsPath)
sem := make(chan struct{}, maxConcurrency) // Semaphore
var wg sync.WaitGroup
@@ -193,6 +195,7 @@ func executeRunsConcurrently(
// Execute workflow
exec := executor.NewExecutor()
exec.SetServerMode(true) // Enable file logging for server mode
exec.SetLoader(loader)
// Set up database progress tracking
if runUUID != "" {
@@ -370,6 +373,7 @@ func CreateRun(cfg *config.Config) fiber.Handler {
exec := executor.NewExecutor()
exec.SetServerMode(true) // Enable file logging for server mode
exec.SetLoader(loader)
// Set up database progress tracking
if run != nil {
@@ -782,6 +786,7 @@ func StartRun(cfg *config.Config) fiber.Handler {
// Create executor
exec := executor.NewExecutor()
exec.SetServerMode(true)
exec.SetLoader(loader)
exec.SetDBRunUUID(runUUID)
exec.SetDBRunID(runID)
exec.SetOnStepCompleted(func(stepCtx context.Context, dbRunUUID string) {