Skip to content

Commit

Permalink
Fixed more breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitjasa-db committed May 22, 2024
1 parent a4fb18b commit d31bba3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions catalog/resource_system_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func ResourceSystemSchema() common.Resource {
//enable new schema
err = w.SystemSchemas.Enable(ctx, catalog.EnableRequest{
MetastoreId: metastoreSummary.MetastoreId,
SchemaName: catalog.EnableSchemaName(new),
SchemaName: new,
})
//ignore "schema <schema-name> already exists" error
if err != nil && !strings.Contains(err.Error(), "already exists") {
Expand All @@ -53,7 +53,7 @@ func ResourceSystemSchema() common.Resource {
if old != "" {
err = w.SystemSchemas.Disable(ctx, catalog.DisableRequest{
MetastoreId: metastoreSummary.MetastoreId,
SchemaName: catalog.DisableSchemaName(old),
SchemaName: old,
})
if err != nil {
return err
Expand Down Expand Up @@ -106,7 +106,7 @@ func ResourceSystemSchema() common.Resource {
}
return w.SystemSchemas.Disable(ctx, catalog.DisableRequest{
MetastoreId: metastoreSummary.MetastoreId,
SchemaName: catalog.DisableSchemaName(schemaName),
SchemaName: schemaName,
})
},
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/libraries_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func NewLibraryFromInstanceState(i any) (lib compute.Library) {
}

// Diff returns install/uninstall lists given a cluster lib status
func GetLibrariesToInstallAndUninstall(cll []compute.Library, cls *compute.ClusterStatusResponse) ([]compute.Library, []compute.Library) {
func GetLibrariesToInstallAndUninstall(cll []compute.Library, cls *compute.ClusterLibraryStatuses) ([]compute.Library, []compute.Library) {
inConfig := map[string]compute.Library{}
for _, lib := range cll {
inConfig[lib.String()] = lib
Expand Down
2 changes: 1 addition & 1 deletion libraries/libraries_api_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

// Given a compute.Wait struct, returns library statuses based on the input parameter.
// If wait.IsRunning is set to true, this function will wait until all of the libraries are installed to return. Otherwise, it will directly return the list of libraries.
func WaitForLibrariesInstalledSdk(ctx context.Context, w *databricks.WorkspaceClient, wait compute.Wait, timeout time.Duration) (result *compute.ClusterStatusResponse, err error) {
func WaitForLibrariesInstalledSdk(ctx context.Context, w *databricks.WorkspaceClient, wait compute.Wait, timeout time.Duration) (result *compute.ClusterLibraryStatuses, err error) {
err = resource.RetryContext(ctx, timeout, func() *resource.RetryError {
libsClusterStatus, err := w.Libraries.ClusterStatusByClusterId(ctx, wait.ClusterID)
if err != nil {
Expand Down

0 comments on commit d31bba3

Please sign in to comment.