mirror of
https://github.com/j3ssie/osmedeus.git
synced 2026-09-27 03:54:54 +02:00
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:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user