Open fabriziopandini opened 4 months ago
@fabriziopandini: This request has been marked as needing help from a contributor.
Please ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
100%
Just wanted to add that definitionFrom adds a lot of complexity today. For us as maintainers, but especially to our users (cf complexity budget). I think it's not worth that complexity.
This becomes more obvious when thinking about how definitionFrom should behave in "transition scenarios" (when conflicts occur or are resolved). I think today this prevents us to add bigger orthogonal features to variables because it's very hard to make sure all variants still work (eg potentially introducing variable scopes down the line)
/assign
Nothing to do anymore for now
/unassign
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: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