Architecture #10899
openAllow to update system variables in technique without changing webapp code
Description
For now, there is a high coupling between system variable declaration and rudder web app code, to the point that they need to match down to the micro version.
This is a problem when we have several installation that must be synchronized at the technique level (git sync), but we need to be able to update one webapp after the other.
So, we need to assure a way to add new system variable, or remove no more used one without breaking the web-app in a different version.
The main problem to manage is that if a system variable is declared in the metadata.xml file, we MUST also have it in the "system variable spec service", even if it is never used.
The correct, definitive solution is to put system technique OUT OF THE GIT and package them as a webapp dependant asset. Here, we are exploring mitigation solution for the current LTS and previous version of Rudder that need to be supported with that behavior.
1/ Deletion
Deletion can only occure if the variable is actually not used anymore. It is not used if it does not appear in any metadata.xml file.
In that case, the deletion part is only a convention to have about deprecation and removal: we only remove a system variable from "system variable spec service" (the webapp declaration):
- in an LTS,
- if the previous LTS was not using the variable already.
2/ Adding system variable
Here, the problem is that if we are adding a new variable in a metadata.xml file in Rudder 3.1.20, 4.0.10 and 4.1.5, then we are not able to use the corresponding system techniques in any previous version.
This also work for a system technique added between 3.1 and 4.0 (but in that case, it can be argued that breaking are expected).
So, we need to provide a way to either have a default value passed at the technique level, or other mean not thought of right now.