Commit graph

6 commits

Author SHA1 Message Date
Vitali sharp8n 17d4515961 fix(dispatcher): use tenant-selected workflow repo and ensure clone before dispatch
The C# worker failed with 'entry file not found: Main.cs' because the
dispatcher resolved the working directory against the DEFAULT workflow
repo instead of the tenant's currently-selected one, and never ensured
the selected repo was cloned on the executing host. This left the worker
working in a directory whose code files did not exist.

- WorkflowSourceFactory.ResolveCopiesRoot now anchors a relative
  WorkflowSource:CopiesRoot to the content root (not the process CWD), so
  a worker started from a container/different CWD still lands on the same
  wizard root as the control plane.
- ForgejoWorkflowRepoService takes IWebHostEnvironment and uses
  ResolveCopiesRoot the same way.
- TaskDispatcher.ResolveWorkerRootForTenantAsync resolves the tenant's
  SELECTED repo from WorkflowRepoStore, and calls EnsureCloneAsync to
  materialize that repo on the executing host before resolving the working
  directory. EnsureClone is a no-op once the clone exists, so repeated
  dispatches stay cheap; failures are logged and swallowed so the resolved
  path still surfaces a deterministic error if the repo is genuinely missing.

Adds regression tests: TaskDispatcherWorkingDirTests.
2026-09-03 19:27:03 +03:00
Vitali sharp8n 4ad6cc2cb9 workflow source mapping 2026-09-03 17:44:39 +03:00
Vitali sharp8n 3b50333353 fixes 2026-09-03 10:59:54 +03:00
Vitali sharp8n 1d9987c3ca persistense change 2026-09-02 22:14:59 +03:00
Vitali sharp8n 3e31e4a8da stabilization 2026-09-02 01:12:21 +03:00
Vitali sharp8n 6a3f702e09 worfklow integration per tenant support 2026-09-01 22:31:27 +03:00