RegistriesResolver should return null when feature flag is disabled
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
This MR adds a check in RegistriesResolver#resolve. It now checks replicator_class.replication_enabled? and returns none if the corresponding feature flag is disabled.
Added a test context context 'when replication is disabled' dothat stub the replication flag to be false. The example inside of that context expects the result resolve_registries to be empty.
Global geo setting is now stubbed to enabled: true for all test in the shared examples to ensure all Geo registry resolvers behave consistently.
References
Related to #377988 (closed)
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
-
Run the specs for any of the resolvers that use the shared examples in
/ee/spec/support/shared_examples/graphql/geo/geo_registries_resolver_shared_examples.rb, for example:bin/rspec ee/spec/graphql/resolvers/geo/container_repository_registries_resolver_spec.rb -
All spec should pass
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #377988 (closed)