From 06a7abe1dc5cbb6f027d129f9f6bf816a878f497 Mon Sep 17 00:00:00 2001 From: Xin Xiang Date: Wed, 11 Jan 2023 15:18:58 -0800 Subject: [PATCH 01/10] add activaiton privilge to update command --- internal/cmd/pipeline/command.go | 53 ++++++++++--------- internal/cmd/pipeline/command_activate.go | 17 +++--- internal/cmd/pipeline/command_create.go | 17 +++--- internal/cmd/pipeline/command_deactivate.go | 17 +++--- internal/cmd/pipeline/command_describe.go | 17 +++--- internal/cmd/pipeline/command_update.go | 28 ++++++---- test/fixtures/output/pipeline/activate.golden | 21 ++++---- .../pipeline/create-with-secret-names.golden | 23 ++++---- test/fixtures/output/pipeline/create.golden | 21 ++++---- .../output/pipeline/deactivate.golden | 21 ++++---- .../output/pipeline/describe-pass.golden | 21 ++++---- .../update-activation-privilege.golden | 11 ++++ .../output/pipeline/update-help.golden | 21 ++++---- .../output/pipeline/update-name.golden | 9 ---- .../pipeline/update-with-json-output.golden | 1 + .../update-with-new-name-and-desc.golden | 21 ++++---- .../pipeline/update-with-secret-names.golden | 21 ++++---- test/fixtures/output/pipeline/update.golden | 21 ++++---- test/pipeline_test.go | 3 ++ test/test-server/pipeline_handlers.go | 37 +++++++------ 20 files changed, 219 insertions(+), 182 deletions(-) create mode 100644 test/fixtures/output/pipeline/update-activation-privilege.golden delete mode 100644 test/fixtures/output/pipeline/update-name.golden diff --git a/internal/cmd/pipeline/command.go b/internal/cmd/pipeline/command.go index e5e5022e73..ff85d8d2eb 100644 --- a/internal/cmd/pipeline/command.go +++ b/internal/cmd/pipeline/command.go @@ -11,40 +11,43 @@ import ( ) type Pipeline struct { - Id string `json:"id"` - Name string `json:"name"` - Description string `json:"description"` - KsqlCluster string `json:"ksql_cluster"` - SecretNames []string `json:"secret_names"` - State string `json:"state"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` + Id string `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + KsqlCluster string `json:"ksql_cluster"` + SecretNames []string `json:"secret_names"` + ActivationPrivilege bool `json:"activation_privilege"` + State string `json:"state"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } var ( pipelineListFields = []string{"Id", "Name", "Description", "KsqlCluster", "State"} pipelineListHumanLabels = []string{"ID", "Name", "Description", "KSQL Cluster", "State"} pipelineListStructuredLabels = []string{"id", "name", "description", "ksql_cluster", "state"} - pipelineDescribeFields = []string{"Id", "Name", "Description", "KsqlCluster", "SecretNames", "State", "CreatedAt", "UpdatedAt"} + pipelineDescribeFields = []string{"Id", "Name", "Description", "KsqlCluster", "SecretNames", "ActivationPrivilege", "State", "CreatedAt", "UpdatedAt"} pipelineDescribeHumanLabels = map[string]string{ - "Id": "ID", - "Name": "Name", - "Description": "Description", - "KsqlCluster": "KSQL Cluster", - "SecretNames": "Secret Names", - "State": "State", - "CreatedAt": "Created At", - "UpdatedAt": "Updated At", + "Id": "ID", + "Name": "Name", + "Description": "Description", + "KsqlCluster": "KSQL Cluster", + "SecretNames": "Secret Names", + "ActivationPrivilege": "Activation Privilege", + "State": "State", + "CreatedAt": "Created At", + "UpdatedAt": "Updated At", } pipelineDescribeStructuredLabels = map[string]string{ - "Id": "id", - "Name": "name", - "Description": "description", - "KsqlCluster": "ksql_cluster", - "SecretNames": "secret_names", - "State": "state", - "CreatedAt": "created_at", - "UpdatedAt": "updated_at", + "Id": "id", + "Name": "name", + "Description": "description", + "KsqlCluster": "ksql_cluster", + "SecretNames": "secret_names", + "ActivationPrivilege": "activation_privilege", + "State": "state", + "CreatedAt": "created_at", + "UpdatedAt": "updated_at", } secretMappingWithoutEmptyValue = `^([a-zA-Z_][a-zA-Z0-9_]*)=(.+)$` secretMappingWithEmptyValue = `^([a-zA-Z_][a-zA-Z0-9_]*)=(.*)$` diff --git a/internal/cmd/pipeline/command_activate.go b/internal/cmd/pipeline/command_activate.go index bdb821847a..99931d3394 100644 --- a/internal/cmd/pipeline/command_activate.go +++ b/internal/cmd/pipeline/command_activate.go @@ -46,14 +46,15 @@ func (c *command) activate(cmd *cobra.Command, args []string) error { // *pipeline.state will be activating element := &Pipeline{ - Id: *pipeline.Id, - Name: *pipeline.Spec.DisplayName, - Description: *pipeline.Spec.Description, - KsqlCluster: pipeline.Spec.KsqlCluster.Id, - SecretNames: getOrderedSecretNames(pipeline.Spec.Secrets), - State: *pipeline.Status.State, - CreatedAt: *pipeline.Metadata.CreatedAt, - UpdatedAt: *pipeline.Metadata.UpdatedAt, + Id: *pipeline.Id, + Name: *pipeline.Spec.DisplayName, + Description: *pipeline.Spec.Description, + KsqlCluster: pipeline.Spec.KsqlCluster.Id, + SecretNames: getOrderedSecretNames(pipeline.Spec.Secrets), + ActivationPrivilege: *pipeline.Spec.ActivationPrivilege, + State: *pipeline.Status.State, + CreatedAt: *pipeline.Metadata.CreatedAt, + UpdatedAt: *pipeline.Metadata.UpdatedAt, } return output.DescribeObject(cmd, element, pipelineDescribeFields, pipelineDescribeHumanLabels, pipelineDescribeStructuredLabels) diff --git a/internal/cmd/pipeline/command_create.go b/internal/cmd/pipeline/command_create.go index 0afdd14c69..358e8860b1 100644 --- a/internal/cmd/pipeline/command_create.go +++ b/internal/cmd/pipeline/command_create.go @@ -99,14 +99,15 @@ func (c *command) create(cmd *cobra.Command, args []string) error { } element := &Pipeline{ - Id: *pipeline.Id, - Name: *pipeline.Spec.DisplayName, - Description: *pipeline.Spec.Description, - KsqlCluster: pipeline.Spec.KsqlCluster.Id, - SecretNames: getOrderedSecretNames(pipeline.Spec.Secrets), - State: *pipeline.Status.State, - CreatedAt: *pipeline.Metadata.CreatedAt, - UpdatedAt: *pipeline.Metadata.UpdatedAt, + Id: *pipeline.Id, + Name: *pipeline.Spec.DisplayName, + Description: *pipeline.Spec.Description, + KsqlCluster: pipeline.Spec.KsqlCluster.Id, + SecretNames: getOrderedSecretNames(pipeline.Spec.Secrets), + ActivationPrivilege: *pipeline.Spec.ActivationPrivilege, + State: *pipeline.Status.State, + CreatedAt: *pipeline.Metadata.CreatedAt, + UpdatedAt: *pipeline.Metadata.UpdatedAt, } return output.DescribeObject(cmd, element, pipelineDescribeFields, pipelineDescribeHumanLabels, pipelineDescribeStructuredLabels) diff --git a/internal/cmd/pipeline/command_deactivate.go b/internal/cmd/pipeline/command_deactivate.go index 88b8f31fc3..6e375ec491 100644 --- a/internal/cmd/pipeline/command_deactivate.go +++ b/internal/cmd/pipeline/command_deactivate.go @@ -53,14 +53,15 @@ func (c *command) deactivate(cmd *cobra.Command, args []string) error { // *pipeline.state will be deactivating element := &Pipeline{ - Id: *pipeline.Id, - Name: *pipeline.Spec.DisplayName, - Description: *pipeline.Spec.Description, - KsqlCluster: pipeline.Spec.KsqlCluster.Id, - SecretNames: getOrderedSecretNames(pipeline.Spec.Secrets), - State: *pipeline.Status.State, - CreatedAt: *pipeline.Metadata.CreatedAt, - UpdatedAt: *pipeline.Metadata.UpdatedAt, + Id: *pipeline.Id, + Name: *pipeline.Spec.DisplayName, + Description: *pipeline.Spec.Description, + KsqlCluster: pipeline.Spec.KsqlCluster.Id, + SecretNames: getOrderedSecretNames(pipeline.Spec.Secrets), + ActivationPrivilege: *pipeline.Spec.ActivationPrivilege, + State: *pipeline.Status.State, + CreatedAt: *pipeline.Metadata.CreatedAt, + UpdatedAt: *pipeline.Metadata.UpdatedAt, } return output.DescribeObject(cmd, element, pipelineDescribeFields, pipelineDescribeHumanLabels, pipelineDescribeStructuredLabels) diff --git a/internal/cmd/pipeline/command_describe.go b/internal/cmd/pipeline/command_describe.go index 10f5043fa6..aa991e640c 100644 --- a/internal/cmd/pipeline/command_describe.go +++ b/internal/cmd/pipeline/command_describe.go @@ -42,14 +42,15 @@ func (c *command) describe(cmd *cobra.Command, args []string) error { } element := &Pipeline{ - Id: *pipeline.Id, - Name: *pipeline.Spec.DisplayName, - Description: *pipeline.Spec.Description, - KsqlCluster: pipeline.Spec.KsqlCluster.Id, - SecretNames: getOrderedSecretNames(pipeline.Spec.Secrets), - State: *pipeline.Status.State, - CreatedAt: *pipeline.Metadata.CreatedAt, - UpdatedAt: *pipeline.Metadata.UpdatedAt, + Id: *pipeline.Id, + Name: *pipeline.Spec.DisplayName, + Description: *pipeline.Spec.Description, + KsqlCluster: pipeline.Spec.KsqlCluster.Id, + SecretNames: getOrderedSecretNames(pipeline.Spec.Secrets), + ActivationPrivilege: *pipeline.Spec.ActivationPrivilege, + State: *pipeline.Status.State, + CreatedAt: *pipeline.Metadata.CreatedAt, + UpdatedAt: *pipeline.Metadata.UpdatedAt, } return output.DescribeObject(cmd, element, pipelineDescribeFields, pipelineDescribeHumanLabels, pipelineDescribeStructuredLabels) diff --git a/internal/cmd/pipeline/command_update.go b/internal/cmd/pipeline/command_update.go index b67be4a63b..30c49776eb 100644 --- a/internal/cmd/pipeline/command_update.go +++ b/internal/cmd/pipeline/command_update.go @@ -34,6 +34,7 @@ func (c *command) newUpdateCommand(prerunner pcmd.PreRunner, enableSourceCode bo "where consists of 1-128 lowercase, uppercase, numeric or underscore characters but may not begin with a digit.\n"+ "If is empty, the named secret will be removed from Stream Designer.") } + cmd.Flags().Bool("activation-privilege", true, "Grant pipeline privileges to be activated.") pcmd.AddOutputFlag(cmd) pcmd.AddClusterFlag(cmd, c.AuthenticatedCLICommand) @@ -47,14 +48,15 @@ func (c *command) update(cmd *cobra.Command, args []string) error { description, _ := cmd.Flags().GetString("description") sqlFile, _ := cmd.Flags().GetString("sql-file") secrets, _ := cmd.Flags().GetStringArray("secret") + activationPrivilegeChanged := cmd.Flags().Changed("activation-privilege") cluster, err := c.Context.GetKafkaClusterForCommand() if err != nil { return err } - if name == "" && description == "" && sqlFile == "" && len(secrets) == 0 { - return fmt.Errorf("one of the update options must be provided: --name, --description, --sql-file, --secret") + if name == "" && description == "" && sqlFile == "" && len(secrets) == 0 && !activationPrivilegeChanged { + return fmt.Errorf("one of the update options must be provided: --name, --description, --sql-file, --secret, --activation-privilege") } updatePipeline := streamdesignerv1.SdV1PipelineUpdate{Spec: &streamdesignerv1.SdV1PipelineSpecUpdate{}} @@ -80,6 +82,11 @@ func (c *command) update(cmd *cobra.Command, args []string) error { } updatePipeline.Spec.SetSecrets(secretMappings) + if activationPrivilegeChanged { + activationPrivilege, _ := cmd.Flags().GetBool("activation-privilege") + updatePipeline.Spec.SetActivationPrivilege(activationPrivilege) + } + // call api pipeline, err := c.V2Client.UpdateSdPipeline(c.EnvironmentId(), cluster.ID, args[0], updatePipeline) if err != nil { @@ -87,14 +94,15 @@ func (c *command) update(cmd *cobra.Command, args []string) error { } element := &Pipeline{ - Id: *pipeline.Id, - Name: *pipeline.Spec.DisplayName, - Description: *pipeline.Spec.Description, - KsqlCluster: pipeline.Spec.KsqlCluster.Id, - SecretNames: getOrderedSecretNames(pipeline.Spec.Secrets), - State: *pipeline.Status.State, - CreatedAt: *pipeline.Metadata.CreatedAt, - UpdatedAt: *pipeline.Metadata.UpdatedAt, + Id: *pipeline.Id, + Name: *pipeline.Spec.DisplayName, + Description: *pipeline.Spec.Description, + KsqlCluster: pipeline.Spec.KsqlCluster.Id, + SecretNames: getOrderedSecretNames(pipeline.Spec.Secrets), + ActivationPrivilege: *pipeline.Spec.ActivationPrivilege, + State: *pipeline.Status.State, + CreatedAt: *pipeline.Metadata.CreatedAt, + UpdatedAt: *pipeline.Metadata.UpdatedAt, } return output.DescribeObject(cmd, element, pipelineDescribeFields, pipelineDescribeHumanLabels, pipelineDescribeStructuredLabels) diff --git a/test/fixtures/output/pipeline/activate.golden b/test/fixtures/output/pipeline/activate.golden index 0783933022..0b729d2d28 100644 --- a/test/fixtures/output/pipeline/activate.golden +++ b/test/fixtures/output/pipeline/activate.golden @@ -1,10 +1,11 @@ -+--------------+-------------------------------+ -| ID | pipe-12345 | -| Name | testPipeline | -| Description | description | -| KSQL Cluster | lksqlc-12345 | -| Secret Names | [name1 name2 name3] | -| State | activating | -| Created At | 2022-10-04 06:00:00 +0000 UTC | -| Updated At | 2022-10-06 06:00:00 +0000 UTC | -+--------------+-------------------------------+ ++----------------------+-------------------------------+ +| ID | pipe-12345 | +| Name | testPipeline | +| Description | description | +| KSQL Cluster | lksqlc-12345 | +| Secret Names | [name1 name2 name3] | +| Activation Privilege | false | +| State | activating | +| Created At | 2022-10-04 06:00:00 +0000 UTC | +| Updated At | 2022-10-06 06:00:00 +0000 UTC | ++----------------------+-------------------------------+ diff --git a/test/fixtures/output/pipeline/create-with-secret-names.golden b/test/fixtures/output/pipeline/create-with-secret-names.golden index 69908381af..e6cd52801c 100644 --- a/test/fixtures/output/pipeline/create-with-secret-names.golden +++ b/test/fixtures/output/pipeline/create-with-secret-names.golden @@ -1,11 +1,12 @@ -+--------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| ID | pipe-12345 | -| Name | testPipeline | -| Description | description | -| KSQL Cluster | lksqlc-12345 | -| Secret Names | [a_really_really_really_really_really_really_really_really_really_really_really_really_long_secret_name_but_not_exceeding_128_yet | -| | name1 name2 name3] | -| State | draft | -| Created At | 2022-10-04 06:00:00 +0000 UTC | -| Updated At | 2022-10-06 06:00:00 +0000 UTC | -+--------------+-----------------------------------------------------------------------------------------------------------------------------------+ ++----------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| ID | pipe-12345 | +| Name | testPipeline | +| Description | description | +| KSQL Cluster | lksqlc-12345 | +| Secret Names | [a_really_really_really_really_really_really_really_really_really_really_really_really_long_secret_name_but_not_exceeding_128_yet | +| | name1 name2 name3] | +| Activation Privilege | false | +| State | draft | +| Created At | 2022-10-04 06:00:00 +0000 UTC | +| Updated At | 2022-10-06 06:00:00 +0000 UTC | ++----------------------+-----------------------------------------------------------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/pipeline/create.golden b/test/fixtures/output/pipeline/create.golden index ed1710109b..4abe9184ef 100644 --- a/test/fixtures/output/pipeline/create.golden +++ b/test/fixtures/output/pipeline/create.golden @@ -1,10 +1,11 @@ -+--------------+-------------------------------+ -| ID | pipe-12345 | -| Name | testPipeline | -| Description | description | -| KSQL Cluster | lksqlc-12345 | -| Secret Names | [] | -| State | draft | -| Created At | 2022-10-04 06:00:00 +0000 UTC | -| Updated At | 2022-10-06 06:00:00 +0000 UTC | -+--------------+-------------------------------+ ++----------------------+-------------------------------+ +| ID | pipe-12345 | +| Name | testPipeline | +| Description | description | +| KSQL Cluster | lksqlc-12345 | +| Secret Names | [] | +| Activation Privilege | false | +| State | draft | +| Created At | 2022-10-04 06:00:00 +0000 UTC | +| Updated At | 2022-10-06 06:00:00 +0000 UTC | ++----------------------+-------------------------------+ diff --git a/test/fixtures/output/pipeline/deactivate.golden b/test/fixtures/output/pipeline/deactivate.golden index b53d82096d..a7fbc43f78 100644 --- a/test/fixtures/output/pipeline/deactivate.golden +++ b/test/fixtures/output/pipeline/deactivate.golden @@ -1,10 +1,11 @@ -+--------------+-------------------------------+ -| ID | pipe-12345 | -| Name | testPipeline | -| Description | description | -| KSQL Cluster | lksqlc-12345 | -| Secret Names | [name1 name2 name3] | -| State | deactivating | -| Created At | 2022-10-04 06:00:00 +0000 UTC | -| Updated At | 2022-10-06 06:00:00 +0000 UTC | -+--------------+-------------------------------+ ++----------------------+-------------------------------+ +| ID | pipe-12345 | +| Name | testPipeline | +| Description | description | +| KSQL Cluster | lksqlc-12345 | +| Secret Names | [name1 name2 name3] | +| Activation Privilege | false | +| State | deactivating | +| Created At | 2022-10-04 06:00:00 +0000 UTC | +| Updated At | 2022-10-06 06:00:00 +0000 UTC | ++----------------------+-------------------------------+ diff --git a/test/fixtures/output/pipeline/describe-pass.golden b/test/fixtures/output/pipeline/describe-pass.golden index 8a4bad21e0..4b21cd7fb1 100644 --- a/test/fixtures/output/pipeline/describe-pass.golden +++ b/test/fixtures/output/pipeline/describe-pass.golden @@ -1,10 +1,11 @@ -+--------------+-------------------------------+ -| ID | pipe-12345 | -| Name | testPipeline | -| Description | description | -| KSQL Cluster | lksqlc-12345 | -| Secret Names | [name1 name2] | -| State | draft | -| Created At | 2022-10-04 06:00:00 +0000 UTC | -| Updated At | 2022-10-06 06:00:00 +0000 UTC | -+--------------+-------------------------------+ ++----------------------+-------------------------------+ +| ID | pipe-12345 | +| Name | testPipeline | +| Description | description | +| KSQL Cluster | lksqlc-12345 | +| Secret Names | [name1 name2] | +| Activation Privilege | false | +| State | draft | +| Created At | 2022-10-04 06:00:00 +0000 UTC | +| Updated At | 2022-10-06 06:00:00 +0000 UTC | ++----------------------+-------------------------------+ diff --git a/test/fixtures/output/pipeline/update-activation-privilege.golden b/test/fixtures/output/pipeline/update-activation-privilege.golden new file mode 100644 index 0000000000..ee346ac178 --- /dev/null +++ b/test/fixtures/output/pipeline/update-activation-privilege.golden @@ -0,0 +1,11 @@ ++----------------------+-------------------------------+ +| ID | pipe-12345 | +| Name | testPipeline | +| Description | description | +| KSQL Cluster | lksqlc-12345 | +| Secret Names | [name1 name2 name3] | +| Activation Privilege | true | +| State | draft | +| Created At | 2022-10-04 06:00:00 +0000 UTC | +| Updated At | 2022-10-06 06:00:00 +0000 UTC | ++----------------------+-------------------------------+ diff --git a/test/fixtures/output/pipeline/update-help.golden b/test/fixtures/output/pipeline/update-help.golden index 7e9aacfb76..c0d937a89b 100644 --- a/test/fixtures/output/pipeline/update-help.golden +++ b/test/fixtures/output/pipeline/update-help.golden @@ -9,16 +9,17 @@ Request to update Stream Designer pipeline "pipe-12345", with new name and new d $ confluent pipeline update pipe-12345 --name test-pipeline --description "Description of the pipeline" Flags: - --name string Name of the pipeline. - --description string Description of the pipeline. - --sql-file string Path to a KSQL file containing the pipeline's source code. - --secret stringArray A named secret that can be referenced in pipeline source code, e.g. "secret_name=secret_content". - This flag can be supplied multiple times. The secret mapping must have the format =, - where consists of 1-128 lowercase, uppercase, numeric or underscore characters but may not begin with a digit. - If is empty, the named secret will be removed from Stream Designer. - -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") - --cluster string Kafka cluster ID. - --environment string Environment ID. + --name string Name of the pipeline. + --description string Description of the pipeline. + --sql-file string Path to a KSQL file containing the pipeline's source code. + --secret stringArray A named secret that can be referenced in pipeline source code, e.g. "secret_name=secret_content". + This flag can be supplied multiple times. The secret mapping must have the format =, + where consists of 1-128 lowercase, uppercase, numeric or underscore characters but may not begin with a digit. + If is empty, the named secret will be removed from Stream Designer. + --activation-privilege Grant pipeline privileges to be activated. (default true) + -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") + --cluster string Kafka cluster ID. + --environment string Environment ID. Global Flags: -h, --help Show help for this command. diff --git a/test/fixtures/output/pipeline/update-name.golden b/test/fixtures/output/pipeline/update-name.golden deleted file mode 100644 index 6836abea24..0000000000 --- a/test/fixtures/output/pipeline/update-name.golden +++ /dev/null @@ -1,9 +0,0 @@ -+--------------+-------------------------------+ -| ID | pipe-12345 | -| Name | testPipeline2 | -| Description | description | -| KSQL Cluster | lksqlc-12345 | -| State | draft | -| Created At | 2022-10-04 06:00:00 +0000 UTC | -| Updated At | 2022-10-06 06:00:00 +0000 UTC | -+--------------+-------------------------------+ diff --git a/test/fixtures/output/pipeline/update-with-json-output.golden b/test/fixtures/output/pipeline/update-with-json-output.golden index 3b36c76619..5cddb630f5 100644 --- a/test/fixtures/output/pipeline/update-with-json-output.golden +++ b/test/fixtures/output/pipeline/update-with-json-output.golden @@ -8,6 +8,7 @@ "name2", "name3" ], + "activation_privilege": false, "state": "draft", "created_at": "2022-10-04T06:00:00Z", "updated_at": "2022-10-06T06:00:00Z" diff --git a/test/fixtures/output/pipeline/update-with-new-name-and-desc.golden b/test/fixtures/output/pipeline/update-with-new-name-and-desc.golden index 4c3539ecac..1a6c90da69 100644 --- a/test/fixtures/output/pipeline/update-with-new-name-and-desc.golden +++ b/test/fixtures/output/pipeline/update-with-new-name-and-desc.golden @@ -1,10 +1,11 @@ -+--------------+-------------------------------+ -| ID | pipe-12345 | -| Name | newName | -| Description | newDescription | -| KSQL Cluster | lksqlc-12345 | -| Secret Names | [name1 name2 name3] | -| State | draft | -| Created At | 2022-10-04 06:00:00 +0000 UTC | -| Updated At | 2022-10-06 06:00:00 +0000 UTC | -+--------------+-------------------------------+ ++----------------------+-------------------------------+ +| ID | pipe-12345 | +| Name | newName | +| Description | newDescription | +| KSQL Cluster | lksqlc-12345 | +| Secret Names | [name1 name2 name3] | +| Activation Privilege | false | +| State | draft | +| Created At | 2022-10-04 06:00:00 +0000 UTC | +| Updated At | 2022-10-06 06:00:00 +0000 UTC | ++----------------------+-------------------------------+ diff --git a/test/fixtures/output/pipeline/update-with-secret-names.golden b/test/fixtures/output/pipeline/update-with-secret-names.golden index 8a4bad21e0..4b21cd7fb1 100644 --- a/test/fixtures/output/pipeline/update-with-secret-names.golden +++ b/test/fixtures/output/pipeline/update-with-secret-names.golden @@ -1,10 +1,11 @@ -+--------------+-------------------------------+ -| ID | pipe-12345 | -| Name | testPipeline | -| Description | description | -| KSQL Cluster | lksqlc-12345 | -| Secret Names | [name1 name2] | -| State | draft | -| Created At | 2022-10-04 06:00:00 +0000 UTC | -| Updated At | 2022-10-06 06:00:00 +0000 UTC | -+--------------+-------------------------------+ ++----------------------+-------------------------------+ +| ID | pipe-12345 | +| Name | testPipeline | +| Description | description | +| KSQL Cluster | lksqlc-12345 | +| Secret Names | [name1 name2] | +| Activation Privilege | false | +| State | draft | +| Created At | 2022-10-04 06:00:00 +0000 UTC | +| Updated At | 2022-10-06 06:00:00 +0000 UTC | ++----------------------+-------------------------------+ diff --git a/test/fixtures/output/pipeline/update.golden b/test/fixtures/output/pipeline/update.golden index 1abcc4861d..184956c970 100644 --- a/test/fixtures/output/pipeline/update.golden +++ b/test/fixtures/output/pipeline/update.golden @@ -1,10 +1,11 @@ -+--------------+-------------------------------+ -| ID | pipe-12345 | -| Name | testPipeline | -| Description | description | -| KSQL Cluster | lksqlc-12345 | -| Secret Names | [name1 name2 name3] | -| State | draft | -| Created At | 2022-10-04 06:00:00 +0000 UTC | -| Updated At | 2022-10-06 06:00:00 +0000 UTC | -+--------------+-------------------------------+ ++----------------------+-------------------------------+ +| ID | pipe-12345 | +| Name | testPipeline | +| Description | description | +| KSQL Cluster | lksqlc-12345 | +| Secret Names | [name1 name2 name3] | +| Activation Privilege | false | +| State | draft | +| Created At | 2022-10-04 06:00:00 +0000 UTC | +| Updated At | 2022-10-06 06:00:00 +0000 UTC | ++----------------------+-------------------------------+ diff --git a/test/pipeline_test.go b/test/pipeline_test.go index cff8d6bf28..206e58ee1d 100644 --- a/test/pipeline_test.go +++ b/test/pipeline_test.go @@ -38,6 +38,9 @@ func (s *CLITestSuite) TestSDPipeline() { {args: "pipeline update --help", fixture: "pipeline/update-help.golden"}, {args: "pipeline update pipeline-12345 --name newName --description newDescription", fixture: "pipeline/update-with-new-name-and-desc.golden"}, {args: "pipeline update pipeline-12345 --name newName --description newDescription -o json", fixture: "pipeline/update-with-json-output.golden"}, + {args: "pipeline update pipeline-12345 --activation-privilege", fixture: "pipeline/update-activation-privilege.golden"}, + {args: "pipeline update pipeline-12345 --activation-privilege=true", fixture: "pipeline/update-activation-privilege.golden"}, + {args: "pipeline update pipeline-12345 --activation-privilege=false", fixture: "pipeline/update.golden"}, {args: fmt.Sprintf("pipeline update pipeline-12345 --sql-file %s", testPipelineSourceCode), fixture: "pipeline/update.golden"}, {args: "pipeline update pipeline-12345 --secret name1=value-with,and= --secret name2=value-with\"and' --secret name3=", fixture: "pipeline/update-with-secret-names.golden"}, } diff --git a/test/test-server/pipeline_handlers.go b/test/test-server/pipeline_handlers.go index 72609df1ff..a242b3c0ce 100644 --- a/test/test-server/pipeline_handlers.go +++ b/test/test-server/pipeline_handlers.go @@ -23,11 +23,12 @@ func handlePipeline(t *testing.T) http.HandlerFunc { pipeline := &streamdesignerv1.SdV1Pipeline{ Id: streamdesignerv1.PtrString("pipe-12345"), Spec: &streamdesignerv1.SdV1PipelineSpec{ - DisplayName: streamdesignerv1.PtrString("testPipeline"), - Description: streamdesignerv1.PtrString("description"), - SourceCode: &streamdesignerv1.SdV1SourceCodeObject{Sql: "CREATE STREAM `upstream` (id INTEGER, name STRING) WITH (kafka_topic = 'topic', partitions=1, value_format='JSON');\n\nCREATE STREAM `downstream` AS SELECT * FROM upstream;"}, - Secrets: &map[string]string{"name1": "secret1", "name2": "secret2"}, - KsqlCluster: &streamdesignerv1.ObjectReference{Id: "lksqlc-12345"}, + DisplayName: streamdesignerv1.PtrString("testPipeline"), + Description: streamdesignerv1.PtrString("description"), + SourceCode: &streamdesignerv1.SdV1SourceCodeObject{Sql: "CREATE STREAM `upstream` (id INTEGER, name STRING) WITH (kafka_topic = 'topic', partitions=1, value_format='JSON');\n\nCREATE STREAM `downstream` AS SELECT * FROM upstream;"}, + Secrets: &map[string]string{"name1": "secret1", "name2": "secret2"}, + KsqlCluster: &streamdesignerv1.ObjectReference{Id: "lksqlc-12345"}, + ActivationPrivilege: streamdesignerv1.PtrBool(false), }, Status: &streamdesignerv1.SdV1PipelineStatus{ @@ -53,11 +54,12 @@ func handlePipeline(t *testing.T) http.HandlerFunc { pipeline := &streamdesignerv1.SdV1Pipeline{ Id: streamdesignerv1.PtrString("pipe-12345"), Spec: &streamdesignerv1.SdV1PipelineSpec{ - DisplayName: streamdesignerv1.PtrString("testPipeline"), - Description: streamdesignerv1.PtrString("description"), - SourceCode: &streamdesignerv1.SdV1SourceCodeObject{Sql: "CREATE STREAM `upstream` (id INTEGER, name STRING) WITH (kafka_topic = 'topic', partitions=1, value_format='JSON');\n\nCREATE STREAM `downstream` AS SELECT * FROM upstream;"}, - Secrets: &map[string]string{"name1": "*****************", "name2": "*****************", "name3": "*****************"}, - KsqlCluster: &streamdesignerv1.ObjectReference{Id: "lksqlc-12345"}, + DisplayName: streamdesignerv1.PtrString("testPipeline"), + Description: streamdesignerv1.PtrString("description"), + SourceCode: &streamdesignerv1.SdV1SourceCodeObject{Sql: "CREATE STREAM `upstream` (id INTEGER, name STRING) WITH (kafka_topic = 'topic', partitions=1, value_format='JSON');\n\nCREATE STREAM `downstream` AS SELECT * FROM upstream;"}, + Secrets: &map[string]string{"name1": "*****************", "name2": "*****************", "name3": "*****************"}, + KsqlCluster: &streamdesignerv1.ObjectReference{Id: "lksqlc-12345"}, + ActivationPrivilege: streamdesignerv1.PtrBool(false), }, Status: &streamdesignerv1.SdV1PipelineStatus{ @@ -78,6 +80,10 @@ func handlePipeline(t *testing.T) http.HandlerFunc { pipeline.Spec.Description = body.Spec.Description } + if body.Spec.ActivationPrivilege != nil { + pipeline.Spec.ActivationPrivilege = body.Spec.ActivationPrivilege + } + state := "draft" if body.Spec.Activated != nil { if *body.Spec.Activated { @@ -164,11 +170,12 @@ func handlePipelines(t *testing.T) http.HandlerFunc { pipeline := &streamdesignerv1.SdV1Pipeline{ Id: streamdesignerv1.PtrString("pipe-12345"), Spec: &streamdesignerv1.SdV1PipelineSpec{ - DisplayName: body.Spec.DisplayName, - Description: streamdesignerv1.PtrString("description"), - SourceCode: body.Spec.SourceCode, - Secrets: body.Spec.Secrets, - KsqlCluster: &streamdesignerv1.ObjectReference{Id: "lksqlc-12345"}, + DisplayName: body.Spec.DisplayName, + Description: streamdesignerv1.PtrString("description"), + SourceCode: body.Spec.SourceCode, + Secrets: body.Spec.Secrets, + KsqlCluster: &streamdesignerv1.ObjectReference{Id: "lksqlc-12345"}, + ActivationPrivilege: streamdesignerv1.PtrBool(false), }, Status: &streamdesignerv1.SdV1PipelineStatus{ From 2be1387491da3cdaee9f20ea4e3b4ba68f507476 Mon Sep 17 00:00:00 2001 From: Xin Xiang Date: Wed, 11 Jan 2023 16:09:08 -0800 Subject: [PATCH 02/10] feedback --- internal/cmd/pipeline/command_update.go | 15 +++++++++++---- test/fixtures/output/pipeline/update-help.golden | 10 +++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/internal/cmd/pipeline/command_update.go b/internal/cmd/pipeline/command_update.go index 30c49776eb..3965256b2a 100644 --- a/internal/cmd/pipeline/command_update.go +++ b/internal/cmd/pipeline/command_update.go @@ -22,6 +22,14 @@ func (c *command) newUpdateCommand(prerunner pcmd.PreRunner, enableSourceCode bo Text: `Request to update Stream Designer pipeline "pipe-12345", with new name and new description.`, Code: `confluent pipeline update pipe-12345 --name test-pipeline --description "Description of the pipeline"`, }, + examples.Example{ + Text: `Request to update Stream Designer pipeline "pipe-12345", to grant it the activation privilege.`, + Code: `confluent pipeline update pipe-12345 --activation-privilege`, + }, + examples.Example{ + Text: `Request to update Stream Designer pipeline "pipe-12345", to revoke the activation privilege.`, + Code: `confluent pipeline update pipe-12345 --activation-privilege=false`, + }, ), } @@ -34,7 +42,7 @@ func (c *command) newUpdateCommand(prerunner pcmd.PreRunner, enableSourceCode bo "where consists of 1-128 lowercase, uppercase, numeric or underscore characters but may not begin with a digit.\n"+ "If is empty, the named secret will be removed from Stream Designer.") } - cmd.Flags().Bool("activation-privilege", true, "Grant pipeline privileges to be activated.") + cmd.Flags().Bool("activation-privilege", true, "Grant or revoke the privilege to active this pipeline.") pcmd.AddOutputFlag(cmd) pcmd.AddClusterFlag(cmd, c.AuthenticatedCLICommand) @@ -48,14 +56,13 @@ func (c *command) update(cmd *cobra.Command, args []string) error { description, _ := cmd.Flags().GetString("description") sqlFile, _ := cmd.Flags().GetString("sql-file") secrets, _ := cmd.Flags().GetStringArray("secret") - activationPrivilegeChanged := cmd.Flags().Changed("activation-privilege") cluster, err := c.Context.GetKafkaClusterForCommand() if err != nil { return err } - if name == "" && description == "" && sqlFile == "" && len(secrets) == 0 && !activationPrivilegeChanged { + if name == "" && description == "" && sqlFile == "" && len(secrets) == 0 && !cmd.Flags().Changed("activation-privilege") { return fmt.Errorf("one of the update options must be provided: --name, --description, --sql-file, --secret, --activation-privilege") } @@ -82,7 +89,7 @@ func (c *command) update(cmd *cobra.Command, args []string) error { } updatePipeline.Spec.SetSecrets(secretMappings) - if activationPrivilegeChanged { + if cmd.Flags().Changed("activation-privilege") { activationPrivilege, _ := cmd.Flags().GetBool("activation-privilege") updatePipeline.Spec.SetActivationPrivilege(activationPrivilege) } diff --git a/test/fixtures/output/pipeline/update-help.golden b/test/fixtures/output/pipeline/update-help.golden index c0d937a89b..d410ba2ea7 100644 --- a/test/fixtures/output/pipeline/update-help.golden +++ b/test/fixtures/output/pipeline/update-help.golden @@ -8,6 +8,14 @@ Request to update Stream Designer pipeline "pipe-12345", with new name and new d $ confluent pipeline update pipe-12345 --name test-pipeline --description "Description of the pipeline" +Request to update Stream Designer pipeline "pipe-12345", to grant it the activation privilege. + + $ confluent pipeline update pipe-12345 --activation-privilege + +Request to update Stream Designer pipeline "pipe-12345", to revoke the activation privilege. + + $ confluent pipeline update pipe-12345 --activation-privilege=false + Flags: --name string Name of the pipeline. --description string Description of the pipeline. @@ -16,7 +24,7 @@ Flags: This flag can be supplied multiple times. The secret mapping must have the format =, where consists of 1-128 lowercase, uppercase, numeric or underscore characters but may not begin with a digit. If is empty, the named secret will be removed from Stream Designer. - --activation-privilege Grant pipeline privileges to be activated. (default true) + --activation-privilege Grant or revoke the privilege to active this pipeline. (default true) -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") --cluster string Kafka cluster ID. --environment string Environment ID. From 8e8948c31f66288bd81ccba0b17e091f9518fcd5 Mon Sep 17 00:00:00 2001 From: Xin Xiang Date: Thu, 12 Jan 2023 09:52:31 -0800 Subject: [PATCH 03/10] make grant example explicit --- internal/cmd/pipeline/command_update.go | 2 +- test/fixtures/output/pipeline/update-help.golden | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cmd/pipeline/command_update.go b/internal/cmd/pipeline/command_update.go index 3965256b2a..ad121a9295 100644 --- a/internal/cmd/pipeline/command_update.go +++ b/internal/cmd/pipeline/command_update.go @@ -24,7 +24,7 @@ func (c *command) newUpdateCommand(prerunner pcmd.PreRunner, enableSourceCode bo }, examples.Example{ Text: `Request to update Stream Designer pipeline "pipe-12345", to grant it the activation privilege.`, - Code: `confluent pipeline update pipe-12345 --activation-privilege`, + Code: `confluent pipeline update pipe-12345 --activation-privilege=true`, }, examples.Example{ Text: `Request to update Stream Designer pipeline "pipe-12345", to revoke the activation privilege.`, diff --git a/test/fixtures/output/pipeline/update-help.golden b/test/fixtures/output/pipeline/update-help.golden index d410ba2ea7..51f0e58d1f 100644 --- a/test/fixtures/output/pipeline/update-help.golden +++ b/test/fixtures/output/pipeline/update-help.golden @@ -10,7 +10,7 @@ Request to update Stream Designer pipeline "pipe-12345", with new name and new d Request to update Stream Designer pipeline "pipe-12345", to grant it the activation privilege. - $ confluent pipeline update pipe-12345 --activation-privilege + $ confluent pipeline update pipe-12345 --activation-privilege=true Request to update Stream Designer pipeline "pipe-12345", to revoke the activation privilege. From 9134b714cd5b8d7ae93051b2921a70d9a17f41fd Mon Sep 17 00:00:00 2001 From: Xin Xiang Date: Thu, 12 Jan 2023 11:47:44 -0800 Subject: [PATCH 04/10] default activation-privilege to false --- internal/cmd/pipeline/command_update.go | 2 +- test/fixtures/output/pipeline/update-help.golden | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cmd/pipeline/command_update.go b/internal/cmd/pipeline/command_update.go index ad121a9295..c648089f14 100644 --- a/internal/cmd/pipeline/command_update.go +++ b/internal/cmd/pipeline/command_update.go @@ -42,7 +42,7 @@ func (c *command) newUpdateCommand(prerunner pcmd.PreRunner, enableSourceCode bo "where consists of 1-128 lowercase, uppercase, numeric or underscore characters but may not begin with a digit.\n"+ "If is empty, the named secret will be removed from Stream Designer.") } - cmd.Flags().Bool("activation-privilege", true, "Grant or revoke the privilege to active this pipeline.") + cmd.Flags().Bool("activation-privilege", false, "Grant or revoke the privilege to active this pipeline.") pcmd.AddOutputFlag(cmd) pcmd.AddClusterFlag(cmd, c.AuthenticatedCLICommand) diff --git a/test/fixtures/output/pipeline/update-help.golden b/test/fixtures/output/pipeline/update-help.golden index 51f0e58d1f..f268ecb312 100644 --- a/test/fixtures/output/pipeline/update-help.golden +++ b/test/fixtures/output/pipeline/update-help.golden @@ -24,7 +24,7 @@ Flags: This flag can be supplied multiple times. The secret mapping must have the format =, where consists of 1-128 lowercase, uppercase, numeric or underscore characters but may not begin with a digit. If is empty, the named secret will be removed from Stream Designer. - --activation-privilege Grant or revoke the privilege to active this pipeline. (default true) + --activation-privilege Grant or revoke the privilege to active this pipeline. -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") --cluster string Kafka cluster ID. --environment string Environment ID. From f1d01b4d74ae3c78394a65adf0119a164be36805 Mon Sep 17 00:00:00 2001 From: Xin Xiang Date: Thu, 12 Jan 2023 12:02:11 -0800 Subject: [PATCH 05/10] Revert "default activation-privilege to false" This reverts commit 9134b714cd5b8d7ae93051b2921a70d9a17f41fd. --- internal/cmd/pipeline/command_update.go | 2 +- test/fixtures/output/pipeline/update-help.golden | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cmd/pipeline/command_update.go b/internal/cmd/pipeline/command_update.go index c648089f14..ad121a9295 100644 --- a/internal/cmd/pipeline/command_update.go +++ b/internal/cmd/pipeline/command_update.go @@ -42,7 +42,7 @@ func (c *command) newUpdateCommand(prerunner pcmd.PreRunner, enableSourceCode bo "where consists of 1-128 lowercase, uppercase, numeric or underscore characters but may not begin with a digit.\n"+ "If is empty, the named secret will be removed from Stream Designer.") } - cmd.Flags().Bool("activation-privilege", false, "Grant or revoke the privilege to active this pipeline.") + cmd.Flags().Bool("activation-privilege", true, "Grant or revoke the privilege to active this pipeline.") pcmd.AddOutputFlag(cmd) pcmd.AddClusterFlag(cmd, c.AuthenticatedCLICommand) diff --git a/test/fixtures/output/pipeline/update-help.golden b/test/fixtures/output/pipeline/update-help.golden index f268ecb312..51f0e58d1f 100644 --- a/test/fixtures/output/pipeline/update-help.golden +++ b/test/fixtures/output/pipeline/update-help.golden @@ -24,7 +24,7 @@ Flags: This flag can be supplied multiple times. The secret mapping must have the format =, where consists of 1-128 lowercase, uppercase, numeric or underscore characters but may not begin with a digit. If is empty, the named secret will be removed from Stream Designer. - --activation-privilege Grant or revoke the privilege to active this pipeline. + --activation-privilege Grant or revoke the privilege to active this pipeline. (default true) -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") --cluster string Kafka cluster ID. --environment string Environment ID. From b211999a4fef198fa782bd5c7e05ac22021b81b3 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 12 Jan 2023 14:35:49 -0800 Subject: [PATCH 06/10] Update internal/cmd/pipeline/command_update.go --- internal/cmd/pipeline/command_update.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cmd/pipeline/command_update.go b/internal/cmd/pipeline/command_update.go index ad121a9295..af31a61e52 100644 --- a/internal/cmd/pipeline/command_update.go +++ b/internal/cmd/pipeline/command_update.go @@ -23,8 +23,8 @@ func (c *command) newUpdateCommand(prerunner pcmd.PreRunner, enableSourceCode bo Code: `confluent pipeline update pipe-12345 --name test-pipeline --description "Description of the pipeline"`, }, examples.Example{ - Text: `Request to update Stream Designer pipeline "pipe-12345", to grant it the activation privilege.`, - Code: `confluent pipeline update pipe-12345 --activation-privilege=true`, + Text: `Grant privilege to activate Stream Designer pipeline "pipe-12345".`, + Code: `confluent pipeline update pipe-12345 --activation-privilege true`, }, examples.Example{ Text: `Request to update Stream Designer pipeline "pipe-12345", to revoke the activation privilege.`, From 53ea2acc1a5b7a93a1b577acac4a53d29238ef19 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 12 Jan 2023 14:35:55 -0800 Subject: [PATCH 07/10] Update internal/cmd/pipeline/command_update.go --- internal/cmd/pipeline/command_update.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cmd/pipeline/command_update.go b/internal/cmd/pipeline/command_update.go index af31a61e52..1251690da8 100644 --- a/internal/cmd/pipeline/command_update.go +++ b/internal/cmd/pipeline/command_update.go @@ -27,8 +27,8 @@ func (c *command) newUpdateCommand(prerunner pcmd.PreRunner, enableSourceCode bo Code: `confluent pipeline update pipe-12345 --activation-privilege true`, }, examples.Example{ - Text: `Request to update Stream Designer pipeline "pipe-12345", to revoke the activation privilege.`, - Code: `confluent pipeline update pipe-12345 --activation-privilege=false`, + Text: `Revoke privilege to activate Stream Designer pipeline "pipe-12345".`, + Code: `confluent pipeline update pipe-12345 --activation-privilege false`, }, ), } From 7a2b101dc589f2369a892a2cad43201ec350f4a3 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 12 Jan 2023 14:36:02 -0800 Subject: [PATCH 08/10] Update internal/cmd/pipeline/command_update.go --- internal/cmd/pipeline/command_update.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/cmd/pipeline/command_update.go b/internal/cmd/pipeline/command_update.go index 1251690da8..5717b5f66f 100644 --- a/internal/cmd/pipeline/command_update.go +++ b/internal/cmd/pipeline/command_update.go @@ -43,7 +43,6 @@ func (c *command) newUpdateCommand(prerunner pcmd.PreRunner, enableSourceCode bo "If is empty, the named secret will be removed from Stream Designer.") } cmd.Flags().Bool("activation-privilege", true, "Grant or revoke the privilege to active this pipeline.") - pcmd.AddOutputFlag(cmd) pcmd.AddClusterFlag(cmd, c.AuthenticatedCLICommand) pcmd.AddEnvironmentFlag(cmd, c.AuthenticatedCLICommand) From 4b4b5a4195af8f956ba5de46ccdb19f1dee91881 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 12 Jan 2023 14:36:08 -0800 Subject: [PATCH 09/10] Update test/fixtures/output/pipeline/update-help.golden --- test/fixtures/output/pipeline/update-help.golden | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/fixtures/output/pipeline/update-help.golden b/test/fixtures/output/pipeline/update-help.golden index 51f0e58d1f..815ceb7bf2 100644 --- a/test/fixtures/output/pipeline/update-help.golden +++ b/test/fixtures/output/pipeline/update-help.golden @@ -8,9 +8,9 @@ Request to update Stream Designer pipeline "pipe-12345", with new name and new d $ confluent pipeline update pipe-12345 --name test-pipeline --description "Description of the pipeline" -Request to update Stream Designer pipeline "pipe-12345", to grant it the activation privilege. +Grant privilege to activate Stream Designer pipeline "pipe-12345". - $ confluent pipeline update pipe-12345 --activation-privilege=true + $ confluent pipeline update pipe-12345 --activation-privilege true Request to update Stream Designer pipeline "pipe-12345", to revoke the activation privilege. From 1334c9feb56b584ae52ed03beaf92091521b09ec Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 12 Jan 2023 14:36:14 -0800 Subject: [PATCH 10/10] Update test/fixtures/output/pipeline/update-help.golden --- test/fixtures/output/pipeline/update-help.golden | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/fixtures/output/pipeline/update-help.golden b/test/fixtures/output/pipeline/update-help.golden index 815ceb7bf2..9bed133f1f 100644 --- a/test/fixtures/output/pipeline/update-help.golden +++ b/test/fixtures/output/pipeline/update-help.golden @@ -12,9 +12,9 @@ Grant privilege to activate Stream Designer pipeline "pipe-12345". $ confluent pipeline update pipe-12345 --activation-privilege true -Request to update Stream Designer pipeline "pipe-12345", to revoke the activation privilege. +Revoke privilege to activate Stream Designer pipeline "pipe-12345". - $ confluent pipeline update pipe-12345 --activation-privilege=false + $ confluent pipeline update pipe-12345 --activation-privilege false Flags: --name string Name of the pipeline.