Skip to content

Search jobs: convert alert wrapper to a job

Warren Gifford requested to merge backend-integration/cc/alert-to-job into main

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():

  1. expand predicates
  2. convert the expanded plan to a job
  3. 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.

Merge request reports

Loading