Currently, ProtobufSetting.String() panics if MarshalToJSON fails. This could in principle fail for various reasons, like required fields not being set.
One solution would be marshaling the default when we register the setting, and also when we set a new value. We could just hold on to the marshaled string so the String() / DefaultString() functions are trivial.
Currently,
ProtobufSetting.String()
panics ifMarshalToJSON
fails. This could in principle fail for various reasons, like required fields not being set.One solution would be marshaling the default when we register the setting, and also when we set a new value. We could just hold on to the marshaled string so the
String() / DefaultString()
functions are trivial.Jira issue: CRDB-39556