From e3d2dbb0ab1cfe9e9704afdb570999793571c34e Mon Sep 17 00:00:00 2001 From: hectorcast-db Date: Mon, 29 Jan 2024 16:25:10 +0100 Subject: [PATCH] Update Go SDK to v0.30.1 (#1162) ## Changes Update Go SDK to 0.30.1 ## Tests ``` make fmt && make test ``` --- cmd/workspace/dashboards/dashboards.go | 12 ++++++------ .../token-management/token-management.go | 18 +++++++++--------- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cmd/workspace/dashboards/dashboards.go b/cmd/workspace/dashboards/dashboards.go index 3346a5e0..cd3227af 100755 --- a/cmd/workspace/dashboards/dashboards.go +++ b/cmd/workspace/dashboards/dashboards.go @@ -46,13 +46,13 @@ func New() *cobra.Command { // Functions can be added from the `init()` function in manually curated files in this directory. var createOverrides []func( *cobra.Command, - *sql.CreateDashboardRequest, + *sql.DashboardPostContent, ) func newCreate() *cobra.Command { cmd := &cobra.Command{} - var createReq sql.CreateDashboardRequest + var createReq sql.DashboardPostContent var createJson flags.JsonFlag // TODO: short flags @@ -122,7 +122,7 @@ func newDelete() *cobra.Command { cmd.Use = "delete DASHBOARD_ID" cmd.Short = `Remove a dashboard.` cmd.Long = `Remove a dashboard. - + Moves a dashboard to the trash. Trashed dashboards do not appear in list views or searches, and cannot be shared.` @@ -196,7 +196,7 @@ func newGet() *cobra.Command { cmd.Use = "get DASHBOARD_ID" cmd.Short = `Retrieve a definition.` cmd.Long = `Retrieve a definition. - + Returns a JSON representation of a dashboard object, including its visualization and query objects.` @@ -275,7 +275,7 @@ func newList() *cobra.Command { cmd.Use = "list" cmd.Short = `Get dashboard objects.` cmd.Long = `Get dashboard objects. - + Fetch a paginated list of dashboard objects.` cmd.Annotations = make(map[string]string) @@ -334,7 +334,7 @@ func newRestore() *cobra.Command { cmd.Use = "restore DASHBOARD_ID" cmd.Short = `Restore a dashboard.` cmd.Long = `Restore a dashboard. - + A restored dashboard appears in list views and searches and can be shared.` cmd.Annotations = make(map[string]string) diff --git a/cmd/workspace/token-management/token-management.go b/cmd/workspace/token-management/token-management.go index d4616e0b..956555b6 100755 --- a/cmd/workspace/token-management/token-management.go +++ b/cmd/workspace/token-management/token-management.go @@ -60,7 +60,7 @@ func newCreateOboToken() *cobra.Command { cmd.Use = "create-obo-token APPLICATION_ID LIFETIME_SECONDS" cmd.Short = `Create on-behalf token.` cmd.Long = `Create on-behalf token. - + Creates a token on behalf of a service principal. Arguments: @@ -146,7 +146,7 @@ func newDelete() *cobra.Command { cmd.Use = "delete TOKEN_ID" cmd.Short = `Delete a token.` cmd.Long = `Delete a token. - + Deletes a token, specified by its ID. Arguments: @@ -222,7 +222,7 @@ func newGet() *cobra.Command { cmd.Use = "get TOKEN_ID" cmd.Short = `Get token info.` cmd.Long = `Get token info. - + Gets information about a token, specified by its ID. Arguments: @@ -293,7 +293,7 @@ func newGetPermissionLevels() *cobra.Command { cmd.Use = "get-permission-levels" cmd.Short = `Get token permission levels.` cmd.Long = `Get token permission levels. - + Gets the permission levels that a user can have on an object.` cmd.Annotations = make(map[string]string) @@ -341,7 +341,7 @@ func newGetPermissions() *cobra.Command { cmd.Use = "get-permissions" cmd.Short = `Get token permissions.` cmd.Long = `Get token permissions. - + Gets the permissions of all tokens. Tokens can inherit permissions from their root object.` @@ -392,13 +392,13 @@ func newList() *cobra.Command { // TODO: short flags - cmd.Flags().StringVar(&listReq.CreatedById, "created-by-id", listReq.CreatedById, `User ID of the user that created the token.`) + cmd.Flags().Int64Var(&listReq.CreatedById, "created-by-id", listReq.CreatedById, `User ID of the user that created the token.`) cmd.Flags().StringVar(&listReq.CreatedByUsername, "created-by-username", listReq.CreatedByUsername, `Username of the user that created the token.`) cmd.Use = "list" cmd.Short = `List all tokens.` cmd.Long = `List all tokens. - + Lists all tokens associated with the specified workspace or user.` cmd.Annotations = make(map[string]string) @@ -461,7 +461,7 @@ func newSetPermissions() *cobra.Command { cmd.Use = "set-permissions" cmd.Short = `Set token permissions.` cmd.Long = `Set token permissions. - + Sets permissions on all tokens. Tokens can inherit permissions from their root object.` @@ -532,7 +532,7 @@ func newUpdatePermissions() *cobra.Command { cmd.Use = "update-permissions" cmd.Short = `Update token permissions.` cmd.Long = `Update token permissions. - + Updates the permissions on all tokens. Tokens can inherit permissions from their root object.` diff --git a/go.mod b/go.mod index 75f837b3..d85dc4e7 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/briandowns/spinner v1.23.0 // Apache 2.0 - github.com/databricks/databricks-sdk-go v0.29.1 // Apache 2.0 + github.com/databricks/databricks-sdk-go v0.30.1 // Apache 2.0 github.com/fatih/color v1.16.0 // MIT github.com/ghodss/yaml v1.0.0 // MIT + NOTICE github.com/google/uuid v1.5.0 // BSD-3-Clause diff --git a/go.sum b/go.sum index 51c98891..aec472b1 100644 --- a/go.sum +++ b/go.sum @@ -30,8 +30,8 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/databricks/databricks-sdk-go v0.29.1 h1:b0/cgl16iFQMhB8g2smxp2MiX8DqOUPea+hwE4LQjOU= -github.com/databricks/databricks-sdk-go v0.29.1/go.mod h1:4Iy1e1XZiMC15BfWMQVrtr6va8wSEkiUXv0ZRMfgo3w= +github.com/databricks/databricks-sdk-go v0.30.1 h1:ux6I3aHqUH/AOLZEaEHBmwkbHuSAmb+42mTfvh2A7bE= +github.com/databricks/databricks-sdk-go v0.30.1/go.mod h1:QB64wT8EmR9T4ZPqeTRKjfIF4tPZuP9M9kM8Hcr019Q= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=