Allow an EDFilter to not produce all products if it's returning false
Following our update to art 1.17.03 we had a filter module start failing with
The following products have been declared with 'produces', but they have not been placed onto the event:
The fix was simple, but I'm not sure it should have been necessary.
In each case where the declared product wasn't put in the event the filter was returning false (there was an early
return false; without an
evt.put() of the so-far-empty product). In this case, no module downstream can possibly observe the missing product, so I would argue that the check shouldn't be performed in this case.
One could argue about modules in a later job, consuming the output of this one. In a world where issue #11118 was implemented the same argument would hold. In the current state, I'd argue that all modules downstream of the filter will have their products missing from the file anyway for this event, so what harm is it if the filter's products are missing too? Imagine we'd split the filter into two, the pure-filtering part, and a subsequent EDProducer. In that case we'd have exactly the requested behaviour already.
#1 Updated by Kyle Knoepfel about 5 years ago
- Tracker changed from Bug to Feature
- Status changed from New to Feedback
The feature is behaving according to issue #7852. How any paths that contain the specific filter respond is determined by how each of them is set to respond to the filter. Different paths can be set differently. For example, one path can select events that pass the filter; another can select events that fail same filter.
We will raise this for discussion on the mailing list.
#2 Updated by Christopher Backhouse about 5 years ago
OK, I guess it needs to be "Allow an EDFilter to not produce all products if it's returning false and all the paths it's in are configured to respect the filter" or "Allow an EDFilter to not produce all products if it's returning true and all the paths it's in are configured to reverse the filter". I understand that makes things quite a bit more complicated.