Skip to content

Commit

Permalink
chore: remove retention time feature flag (#2788)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guttz committed Jun 3, 2024
1 parent f84f281 commit 931f4ae
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions internal/flink/command_compute_pool_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ import (
"github.com/spf13/cobra"

pcmd "github.com/confluentinc/cli/v3/pkg/cmd"
"github.com/confluentinc/cli/v3/pkg/config"
"github.com/confluentinc/cli/v3/pkg/deletion"
"github.com/confluentinc/cli/v3/pkg/errors"
"github.com/confluentinc/cli/v3/pkg/featureflags"
"github.com/confluentinc/cli/v3/pkg/resource"
"github.com/confluentinc/cli/v3/pkg/utils"
)
Expand Down Expand Up @@ -51,7 +49,7 @@ func (c *command) computePoolDelete(cmd *cobra.Command, args []string) error {
return err == nil
}

if err := c.validateAndConfirmComputePoolDeletion(cmd, args, existenceFunc, resource.FlinkComputePool, computePool.Spec.GetDisplayName()); err != nil {
if err := validateAndConfirmComputePoolDeletion(cmd, args, existenceFunc, resource.FlinkComputePool, computePool.Spec.GetDisplayName()); err != nil {
return err
}

Expand Down Expand Up @@ -79,11 +77,7 @@ func confirmMultipleDeletionString(idList []string) string {
"After that, they will be permanently deleted. \n", utils.ArrayToCommaDelimitedString(idList, "and"))
}

func (c *command) validateAndConfirmComputePoolDeletion(cmd *cobra.Command, args []string, checkExistence func(string) bool, resourceType, name string) error {
if !featureflags.Manager.BoolVariation("flink.statement.30_days_retention_time", c.Context, config.CliLaunchDarklyClient, true, true) {
return deletion.ValidateAndConfirmDeletion(cmd, args, checkExistence, resourceType, name)
}

func validateAndConfirmComputePoolDeletion(cmd *cobra.Command, args []string, checkExistence func(string) bool, resourceType, name string) error {
if err := resource.ValidatePrefixes(resourceType, args); err != nil {
return err
}
Expand Down

0 comments on commit 931f4ae

Please sign in to comment.