Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FlyteCTL Feature] Allow seed project description to be set #3742

Closed
2 tasks done
rupurt opened this issue Jun 2, 2023 · 3 comments · Fixed by #5864
Closed
2 tasks done

[FlyteCTL Feature] Allow seed project description to be set #3742

rupurt opened this issue Jun 2, 2023 · 3 comments · Fixed by #5864
Assignees
Labels
enhancement New feature or request flytectl Issues related to flytectl -Flytes CLI good first issue Good for newcomers

Comments

@rupurt
Copy link

rupurt commented Jun 2, 2023

Describe the feature/command for FlyteCTL

Currently you can only set the name of the seed project as a string

SeedProjects []string `json:"seedProjects" pflag:",flyte projects to create by default."`

#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?

  • Yes

Have you read the Code of Conduct?

  • Yes
@rupurt rupurt added enhancement New feature or request untriaged This issues has not yet been looked at by the Maintainers labels Jun 2, 2023
@pingsutw pingsutw added good first issue Good for newcomers flytectl Issues related to flytectl -Flytes CLI and removed untriaged This issues has not yet been looked at by the Maintainers labels Dec 22, 2023
@Terryhung
Copy link
Contributor

#take

@Terryhung
Copy link
Contributor

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

@Terryhung
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request flytectl Issues related to flytectl -Flytes CLI good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants