Commit 416a3f45 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Use the exact same query with prod to fetch latest pipeline

parent d2e6b95f
......@@ -52,6 +52,12 @@ module EE
# coverage_fuzzing: 23
FILE_TYPES = [5, 6, 7, 8, 21, 23].freeze
LATEST_PIPELINE_WITH_REPORTS_SQL = <<~SQL
SELECT
"ci_pipelines"."id"
FROM
"ci_pipelines"
WHERE
("ci_pipelines"."id" IN (
SELECT
"ci_pipelines"."id"
FROM
......@@ -60,6 +66,9 @@ module EE
ci_pipelines.project_id = %{project_id}
AND ci_pipelines.ref = %{ref}
AND ci_pipelines.status IN ('success')
ORDER BY
"ci_pipelines"."id" DESC
LIMIT 100))
AND (EXISTS (
SELECT
1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment