From 1e892b09b46de9908ddbdc895031895101313a26 Mon Sep 17 00:00:00 2001 From: Melodi <62381002+Melodi17@users.noreply.github.com> Date: Wed, 28 Oct 2026 21:40:13 +1000 Subject: refactor: initial artifact cleanup and implementation --- src/marlin.core/functional/WorkflowBuilder.cs | 33 ++------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'src/marlin.core/functional') diff --git a/src/marlin.core/functional/WorkflowBuilder.cs b/src/marlin.core/functional/WorkflowBuilder.cs index 79da909..a912196 100644 --- a/src/marlin.core/functional/WorkflowBuilder.cs +++ b/src/marlin.core/functional/WorkflowBuilder.cs @@ -34,7 +34,6 @@ public class WorkflowBuilder this.ApplyRequirements(file.Requirements); this.ApplyRecipes(file.Recipes); this.ApplySteps(file.Steps); - this.ApplyArtifactHandlers(file.ArtifactHandlers); } private void ApplyRequirements(Dictionary? requirements) @@ -95,19 +94,11 @@ public class WorkflowBuilder ApplyAbstractStep(step, dto); step.BaseId = dto.Base; - step.Ingest = dto.Ingest ?? []; if (dto.Artifacts != null) { - foreach (var (artifactId, artifactDto) in dto.Artifacts) - { - step.Artifacts[artifactId] = new Artifact(artifactId) - { - Path = artifactDto.Path!, - Type = artifactDto.As!, - Handle = artifactDto.Handle ?? ArtifactHandle.Defer - }; - } + foreach (var item in dto.Artifacts) + step.Artifacts[item.Key] = item.Value; } if (dto.Cleanup != null) @@ -123,26 +114,6 @@ public class WorkflowBuilder return step; } - private void ApplyArtifactHandlers(Dictionary? handlers) - { - if (handlers == null) - return; - - foreach (var (id, dto) in handlers) - { - var handler = new ArtifactHandler(id); - - if (dto.Handle != null) - { - var handleStep = new ArtifactHandlerStep(id + "/handle"); - ApplyAbstractStep(handleStep, dto.Handle); - handler.Handle = handleStep; - } - - this._workflow.ArtifactHandlers[id] = handler; - } - } - private static void ApplyAbstractStep(AbstractStep step, StepDtoBase dto) { step.Name = dto.Name; -- cgit v1.3.1