github.com/abayer/test-infra@v0.0.5/metrics/configs/istio-flakes.yaml (about)

     1  # Istio has identical names for pre/post submits and
     2  # the version field in the job results are alwasys `unknown`
     3  # so the canonical flakiness metrics config does not apply to
     4  # istio. This config is used by istio only and generates weekly
     5  # flakiness summery given the constraints aforementioned.
     6  metric: istio-job-flakes
     7  description: Computes weekly flakiness for all jobs.
     8  query: |
     9    SELECT
    10      job,
    11      sum(runs) runs,
    12      sum(passed) passed,
    13      if(passed == 0, 1, sum(passed)/sum(runs)) consistency,
    14      max(stamp) stamp,
    15    FROM (
    16      SELECT /* all runs of any job for yesterday noting whether it passed */
    17        job,
    18        regexp_extract(metadata.value, r'master:([a-f0-9]+)"') commit, /* extract the master commit sha */
    19        date(started) stamp,
    20        sum(if(result=='SUCCESS',1,0)) passed,
    21        count(result) runs,
    22      FROM [k8s-gubernator:build.week]
    23      WHERE
    24        path LIKE "gs://istio%" AND
    25        started > date_add(current_timestamp(), -7, "DAY")
    26      GROUP BY job, stamp, commit
    27    )
    28    WHERE commit IS NOT NULL /* i.e. postsumit only */
    29    GROUP BY job
    30  
    31  jqfilter: |