Cleanup the use of feature flags (except for the plugin manager) #482
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
The CLI does not support turning off the Central Repository feature. Therefore, the current feature flag
constants.FeatureDisableCentralRepositoryForTesting
cannot be used, and its unused code paths should be removed.The same goes for the
constants.FeatureContextCommand
feature flag. However, for this one, a more complete cleanup is required before removing it from unit tests, as it is off by default for unit tests and requires the unit tests to enable it. I will post a separate PR for this cleanup. The use of this feature flag can be removed from normal code (not unit tests) and has been done in this PR (except for the plugin manager, which will come in a separate PR also).This commit removes the code that was no longer run due to feature flags not being supported anymore. The unit tests are also updated to match this reality.
Furthermore, now that we don't support turning off the Central repo of plugins feature, the only OCI discovery that is supported is the
DBBackedOCIDiscovery
, so this commit removes theOCIDiscovery
type and its supporting code.Which issue(s) this PR fixes
Part of #477
Describe testing done for PR
Ran
make test
locally successfully.Release note
Additional information
Special notes for your reviewer
I have looked at the test coverage for the unit tests that this PR modifies and the coverage is about the same or more.