Search jobs: convert alert wrapper to a job
Created by: camdencheek
Previously, we had a method on searchResolver
(evaluateJob
) that translated any errors from a job into alerts. This converts that method into a job. This means that we basically have three, clean steps to searchResolver.results()
:
- expand predicates
- convert the expanded plan to a job
- run the job
We're getting close to being able to decouple search code from resolvers entirely.
I don't expect this job to exist long-term. I think the ideal situation is that either 1) jobs emit alerts that apply to them, or 2) we generate alerts by expecting the execution results, and don't return alerts from jobs at all.
Test plan
Should be semantics-preserving and covered by integration tests.