[FlyteCTL Feature] Allow seed project description to be set
Describe the feature/command for FlyteCTL
Currently you can only set the name of the seed project as a string
https://github.com/flyteorg/flyte/blob/14171fd84d171a609e619a214fa36695fc79990b/cmd/single/config.go#L27 https://github.com/flyteorg/flyte/issues/2503
Provide a possible output or UX example
Support the current implementation + the ability to set a description
With Description
flyte:
admin:
seedProjects:
- name: myproject
description: My project description
Without Description
flyte:
admin:
seedProjects:
- koi
Are you sure this issue hasn't been raised already?
- [X] Yes
Have you read the Code of Conduct?
- [X] Yes
#take
After a whole day of research, I found that Flyte's config is read using Viper. Please correct me if I'm wrong.
Does Viper accept different types of values?
After I simply changed the type of seedProjects, I got the following error if I try to use the strings as before:
type SeedProject struct {
Name string `json:"name" pflag:",Name of flyte project to create"`
Description string `json:"description" pflag:",Description of flyte project to create"`
}
type Admin struct {
Disabled bool `json:"disabled" pflag:",Disables flyteadmin in the single binary mode"`
DisableScheduler bool `json:"disableScheduler" pflag:",Disables Native scheduler in the single binary mode"`
DisableClusterResourceManager bool `json:"disableClusterResourceManager" pflag:",Disables Cluster resource manager"`
SeedProjects []*SeedProject `json:"seedProjects" pflag:",flyte projects to create by default."`
}
error
1 error(s) decoding:
* 'admin.seedProjects[0]' expected a map, got 'string'
Where would be the best place to start making it could be backward compatible?
thanks
Hi @pingsutw ,
Based on our discussion today, I will add a new field seedProjectsWithDetails, allowing the user to define both the Name and Description. The reason for naming it seedProjectsWithDetails instead of seedProjectsWithDescriptions is to avoid limitations in case more fields need to be added in the future. thanks