-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
What would you like to be added (User Story)?
As a user I want a clean and simple API surface
As a CC or Runtime Extensions author I want clear guidelines about variable definition
Detailed Description
Back when we introduced variable discovery for runtime extensions, we discussed a lot about how to handle conflicts in case two entities (either cluster class inline variables or runtime extensions) define a variable with the same name but a different type definition - aka conflicts -.
The solution we came up for was based on the idea of handling this with a "degraded UX", forcing the user to specify the definitionFrom value when setting the variable value.
After some time and experience with this feature, it seems this is unnecessary complexity; we should simply the user experience, drop definitionFrom and leave to the cluster class and Runtime Extensions authors the responsibility to avoid conflict, for two reasons:
- it rarely happens to have two or more entities providing variables
- if there are two or more entities using the same variable name,
- in most cases they simply want to reuse the same variable for another patch.
- in case they don't agree on the semantic meaning of the variable, which is implied in the type definition, this is really confusing to the users. So it is better to force the resolution of this issue in the authoring phase vs putting this complexity on the users
Anything else you would like to add?
We still think that is valuable to enforce that each entity (either cluster class inline variables or runtime extensions) must define all the variables it is using, because in case one of those will drift, everyone else using the same variable won't have unexpected side effects.
However, also in this case, we should force to the entity owners (cc or runtime extension authors) the resolution of the issue.
Please also note that strategies like naming conventions (eg. use a different prefix for each entity owner) can be stiil be used to avoid conflicts, but finding a shared semantic shuold alway be the preferred way to go for, because it ultimately improve the user experience on all the clusters derived from a cluster class.
Label(s) to be applied
/kind feature
/area clusterclass
/priority important-longterm
/triage accepted
/help