Skip to content
Snippets Groups Projects

Add /admin/search/zoekt APIs for controlling Zoekt rollout

Merged Dylan Griffith requested to merge 404534-zoekt-admin-apis into master
All threads resolved!

What does this MR do and why?

As part of our rollout of Zoekt we're going to be enabling it 1 namespace at a time. This means that we'll need tooling to simplify this process. Originally I was planning on doing this via the Rails console but I've since learnt any rails console commands require a C2 change request. This requires lots of approvals and someone with access to perform the steps. This seemed quite wasteful so I've subsequently realised this would be better to roll out via chatops. Chatops requires an API to execute the steps so this adds some admin APIs we'd need to run from chatops.

Also these same APIs might end up being useful for other administrators managing Zoekt for their instances or possibly to support a future UI.

NOTE on docs: Since this feature is in early development (alpha) and subject to change until we have done some more internal testing it is minimally documented at https://docs.gitlab.com/ee/user/search/exact_code_search.html . We don't yet have sufficient docs for self-managed on how they would enable this feature so I felt that adding a docs page for this API would probably just cause more confusion so I haven't specifically added anything for this.

See Rollout `search_code_with_zoekt` and `index_cod... (#388519)

New Database queries

  1. Find a Zoekt::Shard
  2. Find all Zoekt::Shard
  3. Find a Zoekt::IndexedNamespace
  4. Find all Zoekt::IndexedNamespace for a Zoekt::Shard limit 20

How to set up and validate locally

  1. Follow the steps at https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/zoekt.md to enable Zoekt in your local environment
  2. Run bin/rspec ee/spec/requests/api/admin/search/zoekt_spec.rb

MR acceptance checklist

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

Related to #404534 (closed)

Edited by Dylan Griffith

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Dylan Griffith marked this merge request as ready

    marked this merge request as ready

  • Dylan Griffith marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

    marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

  • Dylan Griffith requested review from @john-mason

    requested review from @john-mason

  • Dylan Griffith removed review request for @john-mason

    removed review request for @john-mason

  • Dylan Griffith requested review from @sdungarwal

    requested review from @sdungarwal

  • Dylan Griffith added 1 commit

    added 1 commit

    • 16329f40 - Add /admin/search/zoekt APIs for controlling Zoekt rollout

    Compare with previous version

  • Dylan Griffith added 1 commit

    added 1 commit

    • c500395b - Add /admin/search/zoekt APIs for controlling Zoekt rollout

    Compare with previous version

  • Dylan Griffith
  • Dylan Griffith added 1 commit

    added 1 commit

    • 1ce18036 - Add /admin/search/zoekt APIs for controlling Zoekt rollout

    Compare with previous version

  • Siddharth Dungarwal
  • Siddharth Dungarwal approved this merge request

    approved this merge request

  • :wave: @sdungarwal, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.

    For more info, please refer to the following links:

  • Dylan Griffith added 1 commit

    added 1 commit

    • c1771742 - Add /admin/search/zoekt APIs for controlling Zoekt rollout

    Compare with previous version

  • Dylan Griffith changed milestone to %15.11

    changed milestone to %15.11

  • Dylan Griffith mentioned in commit 45f880fe

    mentioned in commit 45f880fe

  • Dylan Griffith added 1 commit

    added 1 commit

    • 45f880fe - Add /admin/search/zoekt APIs for controlling Zoekt rollout

    Compare with previous version

  • Dylan Griffith changed the description

    changed the description

  • Dylan Griffith requested review from @splattael

    requested review from @splattael

  • mentioned in merge request gitlab-com/chatops!368 (merged)

  • Peter Leitzen
  • Peter Leitzen
  • Peter Leitzen
  • Peter Leitzen
  • Peter Leitzen
  • Peter Leitzen removed review request for @splattael

    removed review request for @splattael

  • Peter Leitzen changed the description

    changed the description

  • Dylan Griffith mentioned in commit 9fa47553

    mentioned in commit 9fa47553

  • Dylan Griffith added 512 commits

    added 512 commits

    • 45f880fe...aacffcfa - 510 commits from branch master
    • 9fa47553 - Add /admin/search/zoekt APIs for controlling Zoekt rollout
    • b2492ffa - Extend API admin test suite with 401 response code

    Compare with previous version

  • Dylan Griffith changed the description

    changed the description

  • added database label

  • Dylan Griffith requested review from @krasio

    requested review from @krasio

  • Dylan Griffith requested review from @splattael

    requested review from @splattael

  • Krasimir Angelov approved this merge request

    approved this merge request

  • Krasimir Angelov removed review request for @krasio

    removed review request for @krasio

  • Dylan Griffith added 1 commit

    added 1 commit

    • 115f4316 - Extend API admin test suite with 401 response code

    Compare with previous version

  • Dylan Griffith mentioned in commit 1b8da271

    mentioned in commit 1b8da271

  • Dylan Griffith added 242 commits

    added 242 commits

    Compare with previous version

  • Dylan Griffith mentioned in commit 373f5a36

    mentioned in commit 373f5a36

  • Dylan Griffith mentioned in merge request !117634 (merged)

    mentioned in merge request !117634 (merged)

  • Dylan Griffith mentioned in commit e1670e16

    mentioned in commit e1670e16

  • Peter Leitzen
  • Peter Leitzen
  • Peter Leitzen
  • Peter Leitzen
  • Peter Leitzen
  • Peter Leitzen
  • Peter Leitzen
  • Peter Leitzen approved this merge request

    approved this merge request

  • mentioned in issue #407328 (closed)

  • Peter Leitzen mentioned in issue #407329

    mentioned in issue #407329

  • mentioned in issue #407331 (closed)

  • Peter Leitzen enabled an automatic merge when the pipeline for 75c282c5 succeeds

    enabled an automatic merge when the pipeline for 75c282c5 succeeds

  • Peter Leitzen
  • Peter Leitzen resolved all threads

    resolved all threads

  • Dylan Griffith mentioned in commit 1cdf07be

    mentioned in commit 1cdf07be

  • Dylan Griffith mentioned in commit 4692206b

    mentioned in commit 4692206b

  • It seems that https://gitlab.com/gitlab-org/gitlab/-/jobs/4113298412 got sucked. Retrying :fingers_crossed:

    Edit: See #406626

    Edited by Peter Leitzen
  • merged

  • Hello @DylanGriffith :wave:

    The database team is looking for ways to improve the database review process and we would love your help!

    If you'd be open to someone on the database team reaching out to you for a chat, or if you'd like to leave some feedback asynchronously, just post a reply to this comment mentioning:

    @gitlab-org/database-team

    And someone will be by shortly!

    Thanks for your help! :heart:

    This message was generated automatically. You're welcome to improve it.

  • Peter Leitzen mentioned in commit a4bf629d

    mentioned in commit a4bf629d

  • added workflowstaging label and removed workflowcanary label

  • Dylan Griffith mentioned in commit c1640234

    mentioned in commit c1640234

  • Dylan Griffith mentioned in commit 5670f066

    mentioned in commit 5670f066

  • Dylan Griffith mentioned in commit f95a5c98

    mentioned in commit f95a5c98

  • mentioned in issue #389765 (closed)

  • Please register or sign in to reply
    Loading