Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Story Points:4
-
Epic Link:
-
Sprint:AP F18-6
-
Team:Alert Production
Description
DMTN-098 speculates that it may be possible to write an adapter that allows the same MetricTask to be used with both Butler 2 and Butler 3 workflows. However, the details depend substantially on how the new Butler works and how much custom information the adapter needs (in particular, it's not clear how to create a DatasetTypeDescriptor, one of the classes the PipelineTask API must return). While we can't implement such an adapter until Butler output of measurements is supported, knowing whether or not an adapter is possible affects the best way to implement MetricTask and its subclasses.
This issue is to spend some time investigating how Butler 3 and PipelineTask interact, and what is "missing" from the Butler 2 equivalents.
Note that the middleware development team is also working on something that will allow CmdLineTasks to be used as PipelineTasks. Their solution may or may not satisfy our requirements, for the following reasons:
- it may only work on CmdLineTask, which the metrics support framework does not use
- even in the Butler 2 context, MetricTask reports the dataset(s) it needs as input. An adapter that can translate this information to a Butler 3 representation may be simpler than one that needs to get the same information from an external source
- it is not actually clear whether the middleware team's solution is an adapter in the OOD sense, or whether it only maps PipelineTask.run to Task.runDataRef while leaving other PipelineTask capabilities (i.e., dataset management) unsupported
This potential conflict/redundancy can be addressed once we have a clearer picture of our own requirements.
The middleware team's approach is to write a separate class adapter for each high-level CmdLineTask (including CoaddTask, ProcessCcdTask, and IsrTask). I gather that subtasks will interact with their parent tasks like before, i.e. they will not be aware of the PipelineTask interface at all. The adapter will request inputs through, e.g., PipelineTask.getInputDatasetTypes, though it is not clear for what purpose; the adapter must be able to function without a QuantumGraphGenerator to match up the inputs and outputs.
The proposed design is fairly labor-intensive and requires a custom class for each adaptee, making it scale poorly to an indefinite (and hopefully growing) number of MetricTasks. Therefore, it is still worthwhile to research our own solution, particularly since we can use known properties of MetricTask to simplify the design (e.g., no MetricTask will create catalogs, so a specialized adapter need not support catalog schemas).