Skip to content

Conversation

@nullfunc
Copy link
Contributor

@nullfunc nullfunc commented Nov 7, 2025

Reverts #1618

Add back the non-secret config functionality.

This was previous approved but revert to allow for more testing time.

@nullfunc nullfunc requested a review from lionello as a code owner November 7, 2025 22:43
@lionello lionello changed the title Revert "Revert "Add support of non-secret configs"" Add support of non-secret configs Nov 7, 2025
configSetCmd.Flags().BoolP("name", "n", false, "name of the config (backwards compat)")
configSetCmd.Flags().BoolP("env", "e", false, "set the config from an environment variable")
configSetCmd.Flags().Bool("random", false, "set a secure randomly generated value for config")
configSetCmd.Flags().Bool("secret", true, "set a secret config")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boolean flags with true as default are a little awkward since the only way to really use it is to say --secret=false, which can perhaps be considered a feature since you make it explicit that a config can be read?


configCmd.AddCommand(configSetCmd)

configGetCmd.Flags().BoolP("name", "n", false, "name of the config")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd do this using positional arg(s). For a while we only had -n so I had changed that to be a boolean, so it's effectively ignored.

Suggested change
configGetCmd.Flags().BoolP("name", "n", false, "name of the config")

// Exec(ctx context.Context, taskID TaskID, args ...string) error
GetInfo(ctx context.Context, taskID TaskID) (*TaskInfo, error)
PutSecret(ctx context.Context, name, value string) error
PutSecret(ctx context.Context, encrypt bool, name, value string) error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, they are always encrypted, regardless of whether you can read back or not, so this is a misnomer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants