cuddly-jelly-27016
05/14/2025, 12:10 AMtype ClusterConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// List of plugins that this cluster can run.
EnabledPlugins []string `protobuf:"bytes,1,rep,name=enabled_plugins,json=enabledPlugins,proto3" json:"enabled_plugins,omitempty"`
// List of projects for which this cluster can schedule executions.
EnabledProjects []string `protobuf:"bytes,2,rep,name=enabled_projects,json=enabledProjects,proto3" json:"enabled_projects,omitempty"`
}
Would be great if this behavior is customizable.
Currently the flytectl uses camelcase for all its commandline flags
In some cases where we want to allow users to read/write such configs from json/yaml files and pass them to cli, then in the existing behavior it results in empty attributes due to this diff.
eg : while defining the commandline flag counterpart for the above ClusterConfig we define this way to match up with the json tag in the generated definition of ClusterConfig
type UpdateClusterConfig struct {
DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."`
ClusterConfigFile string `json:"clusterConfigFile" pflag:",file containing the update cluster config parameters."`
EnabledPlugins []string `json:"enabled_plugins" pflag:",comma separated list of plugins to be enabled on the cluster."`
EnabledProjects []string `json:"enabled_projects" pflag:",comma separated list of projects to be enabled on the cluster."`
}
Expected to keep the cli config using camel case and still be able to use ClusterConfig to write a yaml file in camelCase
type UpdateClusterConfig struct {
DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."`
ClusterConfigFile string `json:"clusterConfigFile" pflag:",file containing the update cluster config parameters."`
EnabledPlugins []string `json:"enabledPlugins" pflag:",comma separated list of plugins to be enabled on the cluster."`
EnabledProjects []string `json:"enabledProjects" pflag:",comma separated list of projects to be enabled on the cluster."`
}
### What if we do not do this?
mixture of camel case and snake case or add customized unmarshalling
### Related component(s)
No response
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/14/2025, 12:10 AM