diff --git a/.codegen/service.go.tmpl b/.codegen/service.go.tmpl index 492b2132fa..ad482ebe6a 100644 --- a/.codegen/service.go.tmpl +++ b/.codegen/service.go.tmpl @@ -39,6 +39,7 @@ import ( {{define "service"}} {{- $excludeMethods := list "put-secret" -}} +{{- $hideService := .IsPrivatePreview }} // Slice with functions to override default command behavior. // Functions can be added from the `init()` function in manually curated files in this directory. @@ -57,7 +58,7 @@ func New() *cobra.Command { "package": "{{ .Package.Name }}", }, {{- end }} - {{- if .IsPrivatePreview }} + {{- if $hideService }} // This service is being previewed; hide from help output. Hidden: true, @@ -190,7 +191,8 @@ func new{{.PascalName}}() *cobra.Command { {{- end -}} ` {{- end }} - {{- if .IsPrivatePreview }} + {{/* Don't hide commands if the service itself is already hidden. */}} + {{- if and (not $hideService) .IsPrivatePreview }} // This command is being previewed; hide from help output. cmd.Hidden = true diff --git a/cmd/workspace/apps/apps.go b/cmd/workspace/apps/apps.go index 2ccd16c0c6..1d6de47758 100755 --- a/cmd/workspace/apps/apps.go +++ b/cmd/workspace/apps/apps.go @@ -89,9 +89,6 @@ func newCreate() *cobra.Command { characters and hyphens and be between 2 and 30 characters long. It must be unique within the workspace.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -192,9 +189,6 @@ func newCreateDeployment() *cobra.Command { APP_NAME: The name of the app. SOURCE_CODE_PATH: The source code path of the deployment.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -288,9 +282,6 @@ func newDelete() *cobra.Command { Arguments: NAME: The name of the app.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -349,9 +340,6 @@ func newGet() *cobra.Command { Arguments: NAME: The name of the app.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -412,9 +400,6 @@ func newGetDeployment() *cobra.Command { APP_NAME: The name of the app. DEPLOYMENT_ID: The unique id of the deployment.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -474,9 +459,6 @@ func newGetEnvironment() *cobra.Command { Arguments: NAME: The name of the app.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -535,9 +517,6 @@ func newList() *cobra.Command { Lists all apps in the workspace.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -594,9 +573,6 @@ func newListDeployments() *cobra.Command { Arguments: APP_NAME: The name of the app.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -652,9 +628,6 @@ func newStop() *cobra.Command { Arguments: NAME: The name of the app.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -719,9 +692,6 @@ func newUpdate() *cobra.Command { characters and hyphens and be between 2 and 30 characters long. It must be unique within the workspace.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { diff --git a/cmd/workspace/consumer-fulfillments/consumer-fulfillments.go b/cmd/workspace/consumer-fulfillments/consumer-fulfillments.go index cd92002a47..6f3ba4b42a 100755 --- a/cmd/workspace/consumer-fulfillments/consumer-fulfillments.go +++ b/cmd/workspace/consumer-fulfillments/consumer-fulfillments.go @@ -64,9 +64,6 @@ func newGet() *cobra.Command { Get a high level preview of the metadata of listing installable content.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -126,9 +123,6 @@ func newList() *cobra.Command { Personalized installations contain metadata about the attached share or git repo, as well as the Delta Sharing recipient type.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { diff --git a/cmd/workspace/consumer-installations/consumer-installations.go b/cmd/workspace/consumer-installations/consumer-installations.go index 9d6c7c8943..d176e5b39d 100755 --- a/cmd/workspace/consumer-installations/consumer-installations.go +++ b/cmd/workspace/consumer-installations/consumer-installations.go @@ -76,9 +76,6 @@ func newCreate() *cobra.Command { Install payload associated with a Databricks Marketplace listing.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -140,9 +137,6 @@ func newDelete() *cobra.Command { Uninstall an installation associated with a Databricks Marketplace listing.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -202,9 +196,6 @@ func newList() *cobra.Command { List all installations across all listings.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -258,9 +249,6 @@ func newListListingInstallations() *cobra.Command { List all installations for a particular listing.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -321,9 +309,6 @@ func newUpdate() *cobra.Command { the rotateToken flag is true 2. the token will be forcibly rotate if the rotateToken flag is true and the tokenInfo field is empty` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { diff --git a/cmd/workspace/consumer-listings/consumer-listings.go b/cmd/workspace/consumer-listings/consumer-listings.go index 70295dfb35..f75f03b3ad 100755 --- a/cmd/workspace/consumer-listings/consumer-listings.go +++ b/cmd/workspace/consumer-listings/consumer-listings.go @@ -66,9 +66,6 @@ func newGet() *cobra.Command { Get a published listing in the Databricks Marketplace that the consumer has access to.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -148,9 +145,6 @@ func newList() *cobra.Command { List all published listings in the Databricks Marketplace that the consumer has access to.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -215,9 +209,6 @@ func newSearch() *cobra.Command { Arguments: QUERY: Fuzzy matches query` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient diff --git a/cmd/workspace/consumer-personalization-requests/consumer-personalization-requests.go b/cmd/workspace/consumer-personalization-requests/consumer-personalization-requests.go index 40ae4c8480..c55ca4ee1d 100755 --- a/cmd/workspace/consumer-personalization-requests/consumer-personalization-requests.go +++ b/cmd/workspace/consumer-personalization-requests/consumer-personalization-requests.go @@ -75,9 +75,6 @@ func newCreate() *cobra.Command { Create a personalization request for a listing.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -142,9 +139,6 @@ func newGet() *cobra.Command { Get the personalization request for a listing. Each consumer can make at *most* one personalization request for a listing.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -203,9 +197,6 @@ func newList() *cobra.Command { List personalization requests for a consumer across all listings.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { diff --git a/cmd/workspace/consumer-providers/consumer-providers.go b/cmd/workspace/consumer-providers/consumer-providers.go index 5a0849dcea..d8ac0ec12c 100755 --- a/cmd/workspace/consumer-providers/consumer-providers.go +++ b/cmd/workspace/consumer-providers/consumer-providers.go @@ -64,9 +64,6 @@ func newGet() *cobra.Command { Get a provider in the Databricks Marketplace with at least one visible listing.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -139,9 +136,6 @@ func newList() *cobra.Command { List all providers in the Databricks Marketplace with at least one visible listing.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { diff --git a/cmd/workspace/provider-exchange-filters/provider-exchange-filters.go b/cmd/workspace/provider-exchange-filters/provider-exchange-filters.go index 43ae6da7ed..4ab36b5d0d 100755 --- a/cmd/workspace/provider-exchange-filters/provider-exchange-filters.go +++ b/cmd/workspace/provider-exchange-filters/provider-exchange-filters.go @@ -68,9 +68,6 @@ func newCreate() *cobra.Command { Add an exchange filter.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -128,9 +125,6 @@ func newDelete() *cobra.Command { Delete an exchange filter` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -201,9 +195,6 @@ func newList() *cobra.Command { List exchange filter` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -258,9 +249,6 @@ func newUpdate() *cobra.Command { Update an exchange filter.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { diff --git a/cmd/workspace/provider-exchanges/provider-exchanges.go b/cmd/workspace/provider-exchanges/provider-exchanges.go index c9f5818f54..7ff73e0d1d 100755 --- a/cmd/workspace/provider-exchanges/provider-exchanges.go +++ b/cmd/workspace/provider-exchanges/provider-exchanges.go @@ -74,9 +74,6 @@ func newAddListingToExchange() *cobra.Command { Associate an exchange with a listing` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -152,9 +149,6 @@ func newCreate() *cobra.Command { Create an exchange` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -212,9 +206,6 @@ func newDelete() *cobra.Command { This removes a listing from marketplace.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -270,9 +261,6 @@ func newDeleteListingFromExchange() *cobra.Command { Disassociate an exchange with a listing` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -328,9 +316,6 @@ func newGet() *cobra.Command { Get an exchange.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -389,9 +374,6 @@ func newList() *cobra.Command { List exchanges visible to provider` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -445,9 +427,6 @@ func newListExchangesForListing() *cobra.Command { List exchanges associated with a listing` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -503,9 +482,6 @@ func newListListingsForExchange() *cobra.Command { List listings associated with an exchange` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -560,9 +536,6 @@ func newUpdate() *cobra.Command { Update an exchange` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { diff --git a/cmd/workspace/provider-files/provider-files.go b/cmd/workspace/provider-files/provider-files.go index b9357f1313..25e1addf59 100755 --- a/cmd/workspace/provider-files/provider-files.go +++ b/cmd/workspace/provider-files/provider-files.go @@ -72,9 +72,6 @@ func newCreate() *cobra.Command { Create a file. Currently, only provider icons and attached notebooks are supported.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -132,9 +129,6 @@ func newDelete() *cobra.Command { Delete a file` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -202,9 +196,6 @@ func newGet() *cobra.Command { Get a file` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -277,9 +268,6 @@ func newList() *cobra.Command { List files attached to a parent entity.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient diff --git a/cmd/workspace/provider-listings/provider-listings.go b/cmd/workspace/provider-listings/provider-listings.go index 4f90f7b9eb..0abdf51d87 100755 --- a/cmd/workspace/provider-listings/provider-listings.go +++ b/cmd/workspace/provider-listings/provider-listings.go @@ -70,9 +70,6 @@ func newCreate() *cobra.Command { Create a new listing` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -130,9 +127,6 @@ func newDelete() *cobra.Command { Delete a listing` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -200,9 +194,6 @@ func newGet() *cobra.Command { Get a listing` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -273,9 +264,6 @@ func newList() *cobra.Command { List listings owned by this provider` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -328,9 +316,6 @@ func newUpdate() *cobra.Command { Update a listing` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { diff --git a/cmd/workspace/provider-personalization-requests/provider-personalization-requests.go b/cmd/workspace/provider-personalization-requests/provider-personalization-requests.go index 58b3cba1dd..a38d9f4201 100755 --- a/cmd/workspace/provider-personalization-requests/provider-personalization-requests.go +++ b/cmd/workspace/provider-personalization-requests/provider-personalization-requests.go @@ -69,9 +69,6 @@ func newList() *cobra.Command { List personalization requests to this provider. This will return all personalization requests, regardless of which listing they are for.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -128,9 +125,6 @@ func newUpdate() *cobra.Command { Update personalization request. This method only permits updating the status of the request.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { diff --git a/cmd/workspace/provider-provider-analytics-dashboards/provider-provider-analytics-dashboards.go b/cmd/workspace/provider-provider-analytics-dashboards/provider-provider-analytics-dashboards.go index 70ef0f320b..8cee6e4eb1 100755 --- a/cmd/workspace/provider-provider-analytics-dashboards/provider-provider-analytics-dashboards.go +++ b/cmd/workspace/provider-provider-analytics-dashboards/provider-provider-analytics-dashboards.go @@ -60,9 +60,6 @@ func newCreate() *cobra.Command { Create provider analytics dashboard. Returns Marketplace specific id. Not to be confused with the Lakeview dashboard id.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -105,9 +102,6 @@ func newGet() *cobra.Command { Get provider analytics dashboard.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -150,9 +144,6 @@ func newGetLatestVersion() *cobra.Command { Get latest version of provider analytics dashboard.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -207,9 +198,6 @@ func newUpdate() *cobra.Command { Arguments: ID: id is immutable property and can't be updated.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { diff --git a/cmd/workspace/provider-providers/provider-providers.go b/cmd/workspace/provider-providers/provider-providers.go index 52f4c45ae8..b7273a3441 100755 --- a/cmd/workspace/provider-providers/provider-providers.go +++ b/cmd/workspace/provider-providers/provider-providers.go @@ -69,9 +69,6 @@ func newCreate() *cobra.Command { Create a provider` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -129,9 +126,6 @@ func newDelete() *cobra.Command { Delete provider` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -199,9 +193,6 @@ func newGet() *cobra.Command { Get provider profile` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.PreRunE = root.MustWorkspaceClient @@ -272,9 +263,6 @@ func newList() *cobra.Command { List provider profiles for account.` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { @@ -327,9 +315,6 @@ func newUpdate() *cobra.Command { Update provider profile` - // This command is being previewed; hide from help output. - cmd.Hidden = true - cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error {