Split EnvironmentsFinder into two
What does this MR do?
Before this MR EnvironmentsFinder
has 2 different ways of use. There was a common execute
method but there was also find
method that worked completely differently (not shared code). Some classes used execute
while others used find
. This MR splits finder into two separate finders.
In details:
- Move everything related to execute from
app/finders/environments_finder.rb
toapp/finders/environments_by_deployments_finder.rb
. - Move everything related to execute from
spec/finders/environments_finder_spec.rb
tospec/finders/environments_by_deployments_finder_spec.rb
. - Classes that used
EnvironmentsFinder#execute
now useEnvironmentsByDeploymentsFinder#execute
. - Classes that used
EnvironmentsFinder#find
are kept as is.
Step 1 from #326668 (closed)
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because this is technical debt.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Dmytro Zaporozhets (DZ)