Don't mark policy and watch commands as experimental (#4001)

This commit is contained in:
Justin Van Patten 2020-03-02 14:23:40 -08:00 committed by GitHub
parent c96271b7a3
commit acd6a5e753
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 26 additions and 33 deletions

View file

@ -14,6 +14,9 @@ CHANGELOG
- Reinstate caching of TypeScript compilation.
[#4007](https://github.com/pulumi/pulumi/pull/4007)
- Remove the need to set PULUMI_EXPERIMENTAL to use the policy and watch commands.
[#4001](https://github.com/pulumi/pulumi/pull/4001)
## 1.11.1 (2020-02-26)
- Fix a regression for CustomTimeouts in Python SDK.
[#3964](https://github.com/pulumi/pulumi/pull/3964)

View file

@ -22,7 +22,7 @@ import (
func newPolicyCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "policy",
Short: "Manage resource policies",
Short: "[PREVIEW] Manage resource policies",
Args: cmdutil.NoArgs,
}

View file

@ -31,7 +31,7 @@ func newPolicyDisableCmd() *cobra.Command {
var cmd = &cobra.Command{
Use: "disable <org-name>/<policy-pack-name>",
Args: cmdutil.MaximumNArgs(1),
Short: "Disable a Policy Pack for a Pulumi organization",
Short: "[PREVIEW] Disable a Policy Pack for a Pulumi organization",
Long: "Disable a Policy Pack for a Pulumi organization",
Run: cmdutil.RunFunc(func(cmd *cobra.Command, cliArgs []string) error {
// Obtain current PolicyPack, tied to the Pulumi service backend.

View file

@ -32,7 +32,7 @@ func newPolicyEnableCmd() *cobra.Command {
var cmd = &cobra.Command{
Use: "enable <org-name>/<policy-pack-name> <latest|version>",
Args: cmdutil.ExactArgs(2),
Short: "Enable a Policy Pack for a Pulumi organization",
Short: "[PREVIEW] Enable a Policy Pack for a Pulumi organization",
Long: "Enable a Policy Pack for a Pulumi organization. " +
"Can specify latest to enable the latest version of the Policy Pack or a specific version number.",
Run: cmdutil.RunFunc(func(cmd *cobra.Command, cliArgs []string) error {

View file

@ -27,7 +27,7 @@ import (
func newPolicyGroupCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "group",
Short: "Manage policy groups",
Short: "[PREVIEW] Manage policy groups",
Args: cmdutil.NoArgs,
}
@ -40,7 +40,7 @@ func newPolicyGroupLsCmd() *cobra.Command {
var cmd = &cobra.Command{
Use: "ls [org-name]",
Args: cmdutil.MaximumNArgs(1),
Short: "List all Policy Groups for a Pulumi organization",
Short: "[PREVIEW] List all Policy Groups for a Pulumi organization",
Long: "List all Policy Groups for a Pulumi organization",
Run: cmdutil.RunFunc(func(cmd *cobra.Command, cliArgs []string) error {
// Get backend.

View file

@ -31,7 +31,7 @@ func newPolicyLsCmd() *cobra.Command {
var cmd = &cobra.Command{
Use: "ls [org-name]",
Args: cmdutil.MaximumNArgs(1),
Short: "List all Policy Packs for a Pulumi organization",
Short: "[PREVIEW] List all Policy Packs for a Pulumi organization",
Long: "List all Policy Packs for a Pulumi organization",
Run: cmdutil.RunFunc(func(cmd *cobra.Command, cliArgs []string) error {
// Get backend.

View file

@ -48,7 +48,7 @@ func newPolicyNewCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "new [template|url]",
SuggestFor: []string{"init", "create"},
Short: "Create a new Pulumi Policy Pack",
Short: "[PREVIEW] Create a new Pulumi Policy Pack",
Long: "Create a new Pulumi Policy Pack from a template.\n" +
"\n" +
"To create a Policy Pack from a specific template, pass the template name (such as `aws-typescript`\n" +

View file

@ -35,7 +35,7 @@ func newPolicyPublishCmd() *cobra.Command {
var cmd = &cobra.Command{
Use: "publish [org-name]",
Args: cmdutil.MaximumNArgs(1),
Short: "Publish a Policy Pack to the Pulumi service",
Short: "[PREVIEW] Publish a Policy Pack to the Pulumi service",
Long: "Publish a Policy Pack to the Pulumi service\n" +
"\n" +
"If an organization name is not specified, the current user account is used.",

View file

@ -27,7 +27,7 @@ func newPolicyRmCmd() *cobra.Command {
var cmd = &cobra.Command{
Use: "rm <org-name>/<policy-pack-name> <all|version>",
Args: cmdutil.ExactArgs(2),
Short: "Removes a Policy Pack from a Pulumi organization",
Short: "[PREVIEW] Removes a Policy Pack from a Pulumi organization",
Long: "Removes a Policy Pack from a Pulumi organization. " +
"The Policy Pack must be disabled from all Policy Groups before it can be removed.",
Run: cmdutil.RunFunc(func(cmd *cobra.Command, cliArgs []string) error {

View file

@ -207,11 +207,9 @@ func newPreviewCmd() *cobra.Command {
"Allows updating of dependent targets discovered but not specified in --target list")
// Flags for engine.UpdateOptions.
if hasDebugCommands() || hasExperimentalCommands() {
cmd.PersistentFlags().StringSliceVar(
&policyPackPaths, "policy-pack", []string{},
"Run one or more analyzers as part of this update")
}
cmd.PersistentFlags().StringSliceVar(
&policyPackPaths, "policy-pack", []string{},
"[PREVIEW] Run one or more policy packs as part of this update")
cmd.PersistentFlags().BoolVar(
&diffDisplay, "diff", false,
"Display operation as a rich diff showing the overall change")

View file

@ -174,6 +174,7 @@ func NewPulumiCmd() *cobra.Command {
cmd.AddCommand(newUpCmd())
cmd.AddCommand(newPreviewCmd())
cmd.AddCommand(newDestroyCmd())
cmd.AddCommand(newWatchCmd())
// - Stack Management Commands:
cmd.AddCommand(newStackCmd())
cmd.AddCommand(newConfigCmd())
@ -181,6 +182,8 @@ func NewPulumiCmd() *cobra.Command {
cmd.AddCommand(newLoginCmd())
cmd.AddCommand(newLogoutCmd())
cmd.AddCommand(newWhoAmICmd())
// - Policy Management Commands:
cmd.AddCommand(newPolicyCmd())
// - Advanced Commands:
cmd.AddCommand(newCancelCmd())
cmd.AddCommand(newRefreshCmd())
@ -198,13 +201,8 @@ func NewPulumiCmd() *cobra.Command {
// We have a set of commands that are still experimental and that we add only when PULUMI_EXPERIMENTAL is set
// to true.
if hasExperimentalCommands() {
// - Deploy Commands:
cmd.AddCommand(newWatchCmd())
// - Query Commands:
cmd.AddCommand(newQueryCmd())
// - Policy Management Commands:
cmd.AddCommand(newPolicyCmd())
}
// We have a set of options that are useful for developers of pulumi that we add when PULUMI_DEBUG_COMMANDS is
@ -215,13 +213,11 @@ func NewPulumiCmd() *cobra.Command {
// - Diagnostic Commands:
cmd.AddCommand(newViewTraceCmd())
// For legacy reasons, we make these two commands available also under PULUMI_DEBUG_COMMANDS, though
// For legacy reasons, we make this command available also under PULUMI_DEBUG_COMMANDS, though
// PULUMI_EXPERIMENTAL should be preferred.
// - Query Commands:
cmd.AddCommand(newQueryCmd())
// - Policy Management Commands:
cmd.AddCommand(newPolicyCmd())
}
return cmd

View file

@ -410,11 +410,9 @@ func newUpCmd() *cobra.Command {
"Allows updating of dependent targets discovered but not specified in --target list")
// Flags for engine.UpdateOptions.
if hasDebugCommands() || hasExperimentalCommands() {
cmd.PersistentFlags().StringSliceVar(
&policyPackPaths, "policy-pack", []string{},
"Run one or more policy packs as part of this update")
}
cmd.PersistentFlags().StringSliceVar(
&policyPackPaths, "policy-pack", []string{},
"[PREVIEW] Run one or more policy packs as part of this update")
cmd.PersistentFlags().BoolVar(
&diffDisplay, "diff", false,
"Display operation as a rich diff showing the overall change")

View file

@ -48,7 +48,7 @@ func newWatchCmd() *cobra.Command {
var cmd = &cobra.Command{
Use: "watch",
SuggestFor: []string{"developer", "dev"},
Short: "Continuously update the resources in a stack",
Short: "[PREVIEW] Continuously update the resources in a stack",
Long: "Continuously update the resources in a stack.\n" +
"\n" +
"This command watches the working directory for the current project and updates the active stack whenever\n" +
@ -159,11 +159,9 @@ func newWatchCmd() *cobra.Command {
"Optional message to associate with each update operation")
// Flags for engine.UpdateOptions.
if hasDebugCommands() || hasExperimentalCommands() {
cmd.PersistentFlags().StringSliceVar(
&policyPackPaths, "policy-pack", []string{},
"Run one or more policy packs as part of each update")
}
cmd.PersistentFlags().StringSliceVar(
&policyPackPaths, "policy-pack", []string{},
"[PREVIEW] Run one or more policy packs as part of each update")
cmd.PersistentFlags().IntVarP(
&parallel, "parallel", "p", defaultParallel,
"Allow P resource operations to run in parallel at once (1 for no parallelism). Defaults to unbounded.")