Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Tighten plugin feature-flag API #3824

Open
marckhouzam opened this issue Nov 2, 2022 · 0 comments
Open

Tighten plugin feature-flag API #3824

marckhouzam opened this issue Nov 2, 2022 · 0 comments
Labels
area/core-cli kind/feature Categorizes issue or PR as related to a new feature

Comments

@marckhouzam
Copy link
Contributor

Describe the feature request

With #3665 getting merged soon, we will have decoupled the Feature-Flags from the cli/runtime library and moved them into plugin specific code. The idea is that plugins should specify their feature-flags themselves, and the core CLI will then store them in the config file.

However we should not let plugins define the entire feature-flag path for their flags. It gives them too much control over where flags will be stored. They should only be able to specify a subpath under features.<pluginName>, and it should be the CLI that prepends the fixed features.<pluginName> prefix. Currently, by being able to specify the entire path, a plugin could create or modify feature-flags for other plugins or even for the core CLI.

For example, the feature-flag features.management-cluster.standalone-cluster-mode should only be defined as standalone-cluster-mode by the management-cluster plugin and passed that way to the CLI in the PluginDescriptor. The CLI would then add the features.management-cluster prefix before storing it in the config file.

This came out of this discussion: #3665 (comment)

Describe alternative(s) you've considered

Affected product area (please put an X in all that apply)

  • (x) APIs
  • ( ) Addons
  • ( ) CLI
  • ( ) Docs
  • ( ) IAM
  • ( ) Installation
  • (x) Plugin
  • ( ) Security
  • ( ) Test and Release
  • ( ) User Experience
  • ( ) Developer Experience

Additional info

Note that the features.global.tkr-version-v1alpha3-beta and features.global.package-based-lcm-beta are "global" feature-flags, but are created by plugins. This is something that would need to be fixed to be able to properly address the current issue.

This issue would benefit in being fixed before the cli-runtime lib or the plugins are split away from Framework so that we could make the change everywhere at once.

@marckhouzam marckhouzam added kind/feature Categorizes issue or PR as related to a new feature needs-triage Indicates an issue or PR needs to be triaged labels Nov 2, 2022
@marckhouzam marckhouzam removed the needs-triage Indicates an issue or PR needs to be triaged label Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/core-cli kind/feature Categorizes issue or PR as related to a new feature
Projects
None yet
Development

No branches or pull requests

2 participants