Bug when saving ES limited projects/namespaces
Summary
Spotted by @mvanremmerden at !20421 (comment 250399950):
Whenever I try to save the settings after switching
Advanced Global Search enabled
and limiting to either a namespace or project, the following errors pop up:
Namespace Project
Steps to reproduce
- Go to
/admin/application_settings/integrations
- Enable
Limit namespaces and projects that can be indexed
- Add at least one
Namespaces to index
orProjects to index
- Save the form
- Save the form again, with or without changes
What is the current bug behavior?
An uncaught validation error happens, which results in a 500 error.
What is the expected correct behavior?
Already limited namespaces/projects should be ignored.
Output of checks
This bug happens on GitLab.com
Possible fixes
EE::ApplicationSettings::UpdateService#update_elasticsearch_containers
doesn't convert the string params into integers, which causes the line new_container_ids -= klass.target_ids
to not work as expected: