Skip to content

Commit 5158a96

Browse files
add output logging
Signed-off-by: Jack Schofield <[email protected]>
1 parent 157f830 commit 5158a96

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/WorkflowManager/WorkflowExecuter/Common/ArtifactMapper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ public async Task<Dictionary<string, string>> ConvertArtifactVariablesToPath(Art
7070
{
7171
artifactPathDictionary.Add(mappedArtifact.Key, mappedArtifact.Value);
7272

73-
_logger.LogArtifactPassing(artifact, mappedArtifact.Value, shouldExistYet ? "Input" : "Output", true);
73+
_logger.LogArtifactPassing(artifact, mappedArtifact.Value, shouldExistYet ? "Input" : "Pre-Task Output Path Mapping", true);
7474

7575
continue;
7676
}
7777

78-
_logger.LogArtifactPassing(artifact, mappedArtifact.Value, shouldExistYet ? "Input" : "Output", false);
78+
_logger.LogArtifactPassing(artifact, mappedArtifact.Value, shouldExistYet ? "Input" : "Pre-Task Output Path Mapping", false);
7979

8080
if (artifact.Mandatory)
8181
{

src/WorkflowManager/WorkflowExecuter/Services/WorkflowExecuterService.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,17 @@ private async Task<bool> HandleOutputArtifacts(WorkflowInstance workflowInstance
422422

423423
var validOutputArtifacts = await _storageService.VerifyObjectsExistAsync(workflowInstance.BucketId, artifactDict);
424424

425-
workflowInstance.Tasks?.ForEach(t =>
425+
foreach (var artifact in artifactDict)
426426
{
427-
if (t.TaskId == task.TaskId)
428-
{
429-
t.OutputArtifacts = validOutputArtifacts;
430-
}
431-
});
427+
_logger.LogArtifactPassing(new Artifact { Name = artifact.Key, Value = artifact.Value }, artifact.Value, "Post-Task Output Artifact", validOutputArtifacts.ContainsKey(artifact.Key));
428+
}
429+
430+
var currentTask = workflowInstance.Tasks?.FirstOrDefault(t => t.TaskId == task.TaskId);
431+
432+
if (currentTask is not null)
433+
{
434+
currentTask.OutputArtifacts = validOutputArtifacts;
435+
}
432436

433437
if (validOutputArtifacts is not null && validOutputArtifacts.Any())
434438
{

0 commit comments

Comments
 (0)