Closed wslulciuc closed 1 month ago
Name | Link |
---|---|
Latest commit | b482060c77a934fce750bb91c0f2d38b1d0079be |
Latest deploy log | https://app.netlify.com/sites/peppy-sprite-186812/deploys/670fbef8c5ca4b0008ae3672 |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 81.12%. Comparing base (
05d16aa
) to head (b482060
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR adds the CTE following on
JobDao.findAll()
:The CTE
latest_runs
ensures we can list job runs that are in aRUNNING
state as wells as in a done state (COMPLETED
/FAILED
). A job version is created, currently, only when a run is in a done state. Therefore, the followingJOIN
will not return results for runs with stateRUNNING
, only the done state as they will have job versions associated with the run completion:To resolve this issue, and handle runs in a
RUNNING
state, we replace theJOIN
above with :That is,
JOIN
ing the latest runs with the job associated with that given run.SQL
PerfI'll start by saying, this SQL needs major simplifications, but that's for another PR.
Perf Analysis
66.08..71.80
for the nested loop continues to be the most expensive part of the query (we need to avoid nested loops)transitioned_at
timestamp givenMAX(transitioned_at)
EXPLAIN
plan