Skip to content

Use project issues search instead of global search

David Dieulivol requested to merge ddieulivol-flaky_tests_use_issues_search into main

Context

While working on gitlab-org/gitlab!140998 (merged), I noticed by accident that we had different flaky tests issues created, but the test had the same hash:

The problem

It seems to be related to the global search that has a delay of 20-30s for indexing the newly created issue (see the Screen Recordings section for a demo).

What does this MR do and why?

We revert to using the project issues search, which seems to be more or less instantaneous in my local testing.

Screen Recordings

main branch

main

branch of this MR

branch

How to set up and validate locally

You can use the artifacts of https://gitlab.com/gitlab-org/gitlab/-/jobs/5861540558 as an example.

export PROJECT_ID=51263763 # https://gitlab.com/ddieulivol/sandbox

# GITLAB_API_PRIVATE_TOKEN is a private Personal Access Token
exe/flaky-test-issues \
  --input-files "/Users/gitlab/Downloads/artifacts/rspec/rspec-*.json" \
  --project "${PROJECT_ID}" \
  --token "${GITLAB_API_PRIVATE_TOKEN}"

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 David Dieulivol

Merge request reports