Skip to content

Add search attribute to zoekt indexed namespaces

John Mason requested to merge jm-add-search-to-zoekt-np into master

What does this MR do and why?

Add search attribute to zoekt indexed namespaces

This gives us the ability to temporarily disable zoekt search but continue indexing

Screenshots or screen recordings

Migration output for up:

$ bin/rails db:migrate RAILS_ENV=test
main: == [advisory_lock_connection] object_id: 220740, pg_backend_pid: 98259
main: == 20230809011700 AddSearchToZoektNamespace: migrating ========================
main: -- add_column(:zoekt_indexed_namespaces, :search, :boolean, {:default=>true, :null=>false})
main:    -> 0.0016s
main: == 20230809011700 AddSearchToZoektNamespace: migrated (0.0056s) ===============

main: == [advisory_lock_connection] object_id: 220740, pg_backend_pid: 98259
ci: == [advisory_lock_connection] object_id: 220920, pg_backend_pid: 98262
ci: == 20230809011700 AddSearchToZoektNamespace: migrating ========================
ci: -- add_column(:zoekt_indexed_namespaces, :search, :boolean, {:default=>true, :null=>false})
ci:    -> 0.0074s
ci: == 20230809011700 AddSearchToZoektNamespace: migrated (0.0319s) ===============

ci: == [advisory_lock_connection] object_id: 220920, pg_backend_pid: 98262

Migration output for down:

$ RAILS_ENV=test ./bin/rails db:rollback:main
main: == [advisory_lock_connection] object_id: 220400, pg_backend_pid: 95987
main: == 20230809011700 AddSearchToZoektNamespace: reverting ========================
main: -- remove_column(:zoekt_indexed_namespaces, :search, :boolean, {:default=>true, :null=>false})
main:    -> 0.0015s
main: == 20230809011700 AddSearchToZoektNamespace: reverted (0.0082s) ===============

main: == [advisory_lock_connection] object_id: 220400, pg_backend_pid: 95987

$ RAILS_ENV=test ./bin/rails db:rollback:ci
ci: == [advisory_lock_connection] object_id: 220340, pg_backend_pid: 96682
ci: == 20230809011700 AddSearchToZoektNamespace: reverting ========================
ci: -- remove_column(:zoekt_indexed_namespaces, :search, :boolean, {:default=>true, :null=>false})
ci:    -> 0.0016s
ci: == 20230809011700 AddSearchToZoektNamespace: reverted (0.0117s) ===============

ci: == [advisory_lock_connection] object_id: 220340, pg_backend_pid: 96682

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

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 John Mason

Merge request reports

Loading