Draft: Use new hierarchy tables to remove cross-database joins
requested to merge pedropombeiro/336432/adapt-queries into pedropombeiro/336432/hierarchy-and-events-tables
What does this MR do and why?
Describe in detail what your merge request does and why.
It modifies the Ci::Runner.belonging_to_group_or_project
scope to be Ci:Runner.belonging_to_group_or_descendants
and leverage the new hierarchy tables created in !72033 (closed) to side-step the cross-database joins.
Note: We might want to put the new functionality behind a FF to be able to revert to the old query in case something goes wrong with the new one.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Pedro Pombeiro