Determine best practices for Flow Component Arguments, their properties and defaults
This is a placeholder for discussion and further action relating to flow component arguments. For the following questions we should consider if there is a best practice 1 size fits all approach or some guidance on when to go down which path.
Should top level arguments be passed around as a pointer or not? @rfratto mentioned he was thinking about this so added for discussion here.
How do we handle default arguments? Today we have a mix of implementations such as a global var or a function.
Should properties inside an argument be pointers or not? Today we have a mix of using pointers or not even on the same golang Type on different components.
This discussion does not need to be limited to these questions but should be related to the handling of arguments. Possible solutions should not be limited to those suggested above.
I think we should use functions to generate a new copy of the default config instead of keeping a global copy. I have seen many outages caused by this (for example, adding an element to a list that is referenced as part of a global variable); I understand it is slower but in this case I would favor safety