Describe the improvement you would like to see
Recently sara was refactored to submit whole argo workflows (with all analysis steps) upfront instead of submitting one after another. This function is called on anonymizer complete, and i suspect it might not be necessary anymore. Needs to be looked into if it can be removed.
private async Task RewireNextWorkflowIfThermalReading(
Workflow workflow,
AnonymizerResult? result
)
{
var nextWorkflow = await context
.Workflows.Include(w => w.InputBlobStorageLocations)
.Where(w =>
w.AnalysisRunId == workflow.AnalysisRunId && w.StepNumber > workflow.StepNumber
)
.OrderBy(w => w.StepNumber)
.FirstOrDefaultAsync();
if (nextWorkflow is null || nextWorkflow.WorkflowType != "thermal-reading")
{
return;
}
if (result?.PreProcessedBlobStorageLocation is not { } preProcessed)
{
logger.LogError(
"Anonymizer workflow {WorkflowId} is followed by thermal-reading workflow "
+ "{NextWorkflowId} but result is missing preProcessedBlobStorageLocation — "
+ "thermal-reading will run against the raw input.",
workflow.Id,
nextWorkflow.Id
);
return;
}
nextWorkflow.InputBlobStorageLocations.Clear();
nextWorkflow.InputBlobStorageLocations.Add(preProcessed);
await context.SaveChangesAsync();
logger.LogInformation(
"Rewired thermal-reading workflow {NextWorkflowId} inputs to anonymizer's preProcessed TIFF",
nextWorkflow.Id
);
}
}
Describe the improvement you would like to see
Recently sara was refactored to submit whole argo workflows (with all analysis steps) upfront instead of submitting one after another. This function is called on anonymizer complete, and i suspect it might not be necessary anymore. Needs to be looked into if it can be removed.