From a511deabcbafb88d4b0e9ab26587739a79ab91ac Mon Sep 17 00:00:00 2001 From: hkepley Date: Wed, 1 May 2024 13:01:15 -0400 Subject: [PATCH 1/2] OCM-6391 | fix: Change default value for disable region dep. flag --- cmd/create/cluster/cmd.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/create/cluster/cmd.go b/cmd/create/cluster/cmd.go index fd908493bd..88750f3a26 100644 --- a/cmd/create/cluster/cmd.go +++ b/cmd/create/cluster/cmd.go @@ -3218,7 +3218,7 @@ func run(cmd *cobra.Command, _ []string) { " print for cluster describe called inside cluster create, but there is a use for a lone describe." var disableRegionDeprecation bool clusterdescribe.Cmd.LocalFlags().BoolVar(&disableRegionDeprecation, arguments.DisableRegionDeprecationFlagName, - true, disableUsage) + false, disableUsage) clusterdescribe.Cmd.Run(clusterdescribe.Cmd, []string{cluster.ID()}) disableRegionDeprecation = false // No longer disable @@ -3229,13 +3229,13 @@ func run(cmd *cobra.Command, _ []string) { } disableRegionDeprecation = true // disable again operatorroles.Cmd.LocalFlags().BoolVar(&disableRegionDeprecation, arguments.DisableRegionDeprecationFlagName, - true, disableUsage) + false, disableUsage) operatorroles.Cmd.Run(operatorroles.Cmd, []string{clusterName, mode, permissionsBoundary}) if !output.HasFlag() || r.Reporter.IsTerminal() { r.Reporter.Infof("Preparing to create OIDC Provider.") } oidcprovider.Cmd.LocalFlags().BoolVar(&disableRegionDeprecation, arguments.DisableRegionDeprecationFlagName, - true, disableUsage) + false, disableUsage) oidcprovider.Cmd.Run(oidcprovider.Cmd, []string{clusterName, mode, ""}) disableRegionDeprecation = false // No longer disable } else { @@ -3272,7 +3272,11 @@ func run(cmd *cobra.Command, _ []string) { } if args.watch { + disableRegionDeprecation = true // Disable region deprecation + clusterdescribe.Cmd.LocalFlags().BoolVar(&disableRegionDeprecation, arguments.DisableRegionDeprecationFlagName, + false, disableUsage) installLogs.Cmd.Run(installLogs.Cmd, []string{clusterName}) + disableRegionDeprecation = false // No longer disable } else if !output.HasFlag() || r.Reporter.IsTerminal() { r.Reporter.Infof( "To determine when your cluster is Ready, run 'rosa describe cluster -c %s'.", From ed112de69cffff0924502e15c7ad8fadf30641e2 Mon Sep 17 00:00:00 2001 From: hkepley Date: Thu, 2 May 2024 11:10:19 -0400 Subject: [PATCH 2/2] OCM-6391 | feat: Change default value back --- cmd/create/cluster/cmd.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/create/cluster/cmd.go b/cmd/create/cluster/cmd.go index 88750f3a26..5334dc0c9e 100644 --- a/cmd/create/cluster/cmd.go +++ b/cmd/create/cluster/cmd.go @@ -3218,7 +3218,7 @@ func run(cmd *cobra.Command, _ []string) { " print for cluster describe called inside cluster create, but there is a use for a lone describe." var disableRegionDeprecation bool clusterdescribe.Cmd.LocalFlags().BoolVar(&disableRegionDeprecation, arguments.DisableRegionDeprecationFlagName, - false, disableUsage) + true, disableUsage) clusterdescribe.Cmd.Run(clusterdescribe.Cmd, []string{cluster.ID()}) disableRegionDeprecation = false // No longer disable @@ -3229,13 +3229,13 @@ func run(cmd *cobra.Command, _ []string) { } disableRegionDeprecation = true // disable again operatorroles.Cmd.LocalFlags().BoolVar(&disableRegionDeprecation, arguments.DisableRegionDeprecationFlagName, - false, disableUsage) + true, disableUsage) operatorroles.Cmd.Run(operatorroles.Cmd, []string{clusterName, mode, permissionsBoundary}) if !output.HasFlag() || r.Reporter.IsTerminal() { r.Reporter.Infof("Preparing to create OIDC Provider.") } oidcprovider.Cmd.LocalFlags().BoolVar(&disableRegionDeprecation, arguments.DisableRegionDeprecationFlagName, - false, disableUsage) + true, disableUsage) oidcprovider.Cmd.Run(oidcprovider.Cmd, []string{clusterName, mode, ""}) disableRegionDeprecation = false // No longer disable } else { @@ -3274,7 +3274,7 @@ func run(cmd *cobra.Command, _ []string) { if args.watch { disableRegionDeprecation = true // Disable region deprecation clusterdescribe.Cmd.LocalFlags().BoolVar(&disableRegionDeprecation, arguments.DisableRegionDeprecationFlagName, - false, disableUsage) + true, disableUsage) installLogs.Cmd.Run(installLogs.Cmd, []string{clusterName}) disableRegionDeprecation = false // No longer disable } else if !output.HasFlag() || r.Reporter.IsTerminal() {