Skip to content

Draft: Filter jobs by name

Payton Burdette requested to merge pb-filter-jobs-by-name into master

What does this MR do and why?

  • Adds the ability to filter jobs by name
  • Adds name token to UI
  • Code refactor to support multiple search tokens

NOTE: This MR should stay a draft until the name column has been added to the appropriate index on the ci_builds table.

  1. Async index MR: !107102 (closed)
  2. Sync index MR: TBD

Screenshots or screen recordings

UI selections


UI Results


Query testing results


plan SELECT "ci_builds".* FROM "ci_builds" WHERE "ci_builds"."type" = 'Ci::Build' AND "ci_builds"."project_id" = 278964 AND ("ci_builds"."status" NOT IN ('created')) AND "ci_builds"."name" = 'detect-tests' AND ("ci_builds"."status" IN ('success')) ORDER BY "ci_builds"."id" DESC


Sort  (cost=61096088.46..61096109.17 rows=8286 width=1250)
  Sort Key: id DESC
  ->  Index Scan using "<13343>btree_ci_builds_status_created_at_project_id_name" on ci_builds  (cost=0.08..61095549.19 rows=8286 width=1250)
        Index Cond: (((status)::text = 'success'::text) AND (project_id = 278964) AND ((name)::text = 'detect-tests'::text))

How to set up and validate locally

  1. Visit CI/CD > Jobs
  2. Filter jobs by name
  3. Filter jobs by status
  4. Filter jobs by status and name
  5. Filter jobs by custom query string in URL I.E ?name=coverage_job&statuses=SUCCESS
  6. Confirm all is working

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Payton Burdette

Merge request reports