total succeeded/failed jobs query is incorrect when a sub workflow is retried

XMLWordPrintable

      For the case where the a sub workflow is retried and then succeeds the query results in correct results.

      The incorrect query that is implemented is

      // API method name : get_total_succeeded_jobs_status() expand_workflow = true, job_filter = all

      SELECT count(i1.job_instance_id) last_job_instance_id FROM
      (SELECT max(job_submit_seq) jss, i.job_id jobid FROM
      workflow w, job j, job_instance i WHERE
      w.wf_id = 1 and
      w.wf_id=j.wf_id and
      j.job_id = i.job_id and
      i.exitcode = 0 and
      i.exitcode IS NOT NULL
      GROUP by i.job_id), job_instance i1 WHERE
      i1.job_id = job_id and i1.job_submit_seq = jss

      // expand_workflow = true , job_filter = 'nonsub'
      //Only change from the all filter query is an extra filter 'and j.type_desc not in ('dax','dag')
      all query + following filter in the sub query as show below and j.type_desc not in ('dax','dag')

      // expand_workflow = true , job_filter = 'subwf'
      //Only change from the all filter query is an extra filter 'and j.type_desc in ('dax','dag')
      all query + and j.type_desc in ('dax','dag') [filter inside sub query]

      // expand_workflow = true , job_filter = 'dax'
      //Only change from the all filter query is an extra filter 'and j.type_desc in ('dax')
      all query + and j.type_desc in ('dax') [filter inside sub query]

      // expand_workflow = true , job_filter = 'dag'
      //Only change from the all filter query is an extra filter 'and j.type_desc in ('dag')
      all query + and type_desc not in ('dag') [filter inside sub query]

      // expand_workflow = true , job_filter = 'compute'
      //Only change from the all filter query is an extra filter 'and t.type_desc in ('compute')
      all query + and type_desc in ('compute') [filter inside sub query]

            Assignee:
            Karan Vahi
            Reporter:
            Gaurang Mehta (Inactive)
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: