Allow to search environments within folders
### Release notes With this release, we are adding improved support for searching for environments within folders. Previously, you needed to write out the complete name to find this type of folder. Now, the search allows you to more easily find folders even if they are nested. ### Background and proposal Started from https://gitlab.com/gitlab-org/gitlab/-/merge_requests/97834#note_1099458438 In https://gitlab.com/gitlab-org/gitlab/-/issues/10754+ we inroduced the environments search. But it only works for foldered environments if you search with the folder name ![image](/uploads/9f9b238f5e00f1b89dfd57cc3c99ac00/image.png) (it would work if we searched for `review/gitaly`) To make it work we can add the index on `remove_prefix(name, environment_type)`, and add `or`(UNION) clause to the `for_names_like` query. That would actually be helpful in more places: 1. autocomplete when adding protected environment 2. autocomplete when editing feature flag (note that it may be costly from the performance standpoint)
issue
Advertisement
Advertisement