Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #755 +/- ##
==========================================
- Coverage 17.97% 17.93% -0.04%
==========================================
Files 108 108
Lines 14649 14698 +49
==========================================
+ Hits 2633 2636 +3
- Misses 11802 11848 +46
Partials 214 214 ☔ View full report in Codecov by Sentry. |
| assert.NotEqual(t, "", byName.Id) | ||
|
|
||
| all, err := w.StorageCredentials.ListAll(ctx) | ||
| all, err := w.StorageCredentials.ListAll(ctx, catalog.ListStorageCredentialsRequest{}) |
There was a problem hiding this comment.
[Discussion]
This is a breaking change (as golang doesn't support optional parameters) so we will have to mention this explicitly in our release notes or revert the original change in openapi spec for not introducing this.
We could do this change since Go SDK isn't GA yet but it won't be a good user experience i.e sending empty request.
Other non breaking alternatives are:
- Make ListAll as variadic on
ListExternalLocationsRequest. Not sure if this is supported in SDK generator + if there are other different types of parameters in future for this method, then there might be more difficulties in maintenance.
func ListAll(ctx context.Context, requests ...ListExternalLocationsRequest) ([]ExternalLocationInfo, error) {
}
- Have a wrapper over ListAll -- but this is something we would have to maintain externally.
Both of these are something that we could do to not have breakage. This type of problem is specific to golang and could arise for other methods as well so we would need a solution that will work for other such cases as well without extra overhead.
What do you think? @miles @hectorcast-db
There was a problem hiding this comment.
+ @pietern for visibility as CLI release is blocked on GoSDK release.
There was a problem hiding this comment.
If we decided to not revert the open api change: Java SDK: databricks/databricks-sdk-java#204. There are some issues with Python SDK -- will take a look at them tomorrow.
There was a problem hiding this comment.
Right now, since it's not GA we could go forward. List APIs should have pagination, so this is a good change.
But indeed, in general, adding an optional parameter to an API should not be a breaking change.
mgyucht
left a comment
There was a problem hiding this comment.
Need to make sure .gitattributes is not regressing here.
* Extract API interfaces for all services and generate mock clients ([#740](#740)). * Handle empty response for errors ([#756](#756)). * Update SDK to OpenAPI spec + Fix tests ([#755](#755)). * Add utility to retry on specific errors ([#757](#757)). API Changes: * Changed `List` method for [w.ExternalLocations](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ExternalLocationsAPI) workspace-level service to require request of [catalog.ListExternalLocationsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListExternalLocationsRequest). * Changed `List` method for [w.StorageCredentials](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#StorageCredentialsAPI) workspace-level service to require request of [catalog.ListStorageCredentialsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListStorageCredentialsRequest). * Added `NextPageToken` field for [catalog.ListExternalLocationsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListExternalLocationsResponse). * Added `MaxResults` field for [catalog.ListFunctionsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListFunctionsRequest). * Added `PageToken` field for [catalog.ListFunctionsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListFunctionsRequest). * Added `NextPageToken` field for [catalog.ListFunctionsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListFunctionsResponse). * Added `MaxResults` field for [catalog.ListSchemasRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListSchemasRequest). * Added `PageToken` field for [catalog.ListSchemasRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListSchemasRequest). * Added `NextPageToken` field for [catalog.ListSchemasResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListSchemasResponse). * Added `NextPageToken` field for [catalog.ListStorageCredentialsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListStorageCredentialsResponse). * Added `OmitColumns` field for [catalog.ListTablesRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListTablesRequest). * Added `OmitProperties` field for [catalog.ListTablesRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListTablesRequest). * Added [catalog.ListExternalLocationsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListExternalLocationsRequest). * Added [catalog.ListStorageCredentialsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListStorageCredentialsRequest). * Changed `List` method for [w.Tokens](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#TokensAPI) workspace-level service to return [settings.ListPublicTokensResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#ListPublicTokensResponse). * Added [settings.ListPublicTokensResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#ListPublicTokensResponse). * Added [dashboards](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards) package. * Added [vectorsearch](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch) package. OpenAPI SHA: a7a9dc025bb80303e676bf3708942c6aa06689f1, Date: 2024-01-04 Dependency updates: * Bump google.golang.org/api from 0.153.0 to 0.154.0 ([#741](#741)). * Bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /examples/slog ([#747](#747)). * Bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /examples/zerolog ([#748](#748)). * Bump golang.org/x/crypto from 0.16.0 to 0.17.0 ([#749](#749)).
* Extract API interfaces for all services and generate mock clients ([#740](#740)). * Handle empty response for errors ([#756](#756)). * Update SDK to OpenAPI spec + Fix tests ([#755](#755)). * Add utility to retry on specific errors ([#757](#757)). * Integration test fixes for TestMwsAccWorkspaces ([#763](#763)) and TestMwsAccUsageDownload ([#764](#764)). Note: This release contains breaking changes, please see below. API Changes: * [Breaking] Changed `List` method for [w.ExternalLocations](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ExternalLocationsAPI) workspace-level service to require request of [catalog.ListExternalLocationsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListExternalLocationsRequest), [w.StorageCredentials](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#StorageCredentialsAPI) workspace-level service to require request of [catalog.ListStorageCredentialsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListStorageCredentialsRequest) and [w.Tokens](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#TokensAPI) workspace-level service to return [settings.ListPublicTokensResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#ListPublicTokensResponse). * Added `NextPageToken` field for [catalog.ListExternalLocationsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListExternalLocationsResponse), [catalog.ListFunctionsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListFunctionsResponse), [catalog.ListSchemasResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListSchemasResponse) and [catalog.ListStorageCredentialsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListStorageCredentialsResponse). * Added `MaxResults` field for [catalog.ListFunctionsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListFunctionsRequest) and [catalog.ListSchemasRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListSchemasRequest). * Added `PageToken` field for [catalog.ListFunctionsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListFunctionsRequest) and [catalog.ListSchemasRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListSchemasRequest). * Added `OmitColumns` and `OmitProperties` field for [catalog.ListTablesRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListTablesRequest). * Added [catalog.ListExternalLocationsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListExternalLocationsRequest). * Added [catalog.ListStorageCredentialsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListStorageCredentialsRequest). * Added [settings.ListPublicTokensResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#ListPublicTokensResponse). * Added [dashboards](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards) package. * Added [vectorsearch](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch) package. OpenAPI SHA: a7a9dc025bb80303e676bf3708942c6aa06689f1, Date: 2024-01-04 Dependency updates: * Bump google.golang.org/api from 0.153.0 to 0.154.0 ([#741](#741)). * Bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /examples/slog ([#747](#747)) and /examples/zerolog ([#748](#748)). * Bump golang.org/x/crypto from 0.16.0 to 0.17.0 ([#749](#749)).
Changes
SDK generation and fixing tests by passing a request when calling ListAll method
Tests
Successfully generated + Integration tests passed except 2 tests in aws-prod-acct due to
Credentials limit exceededmake testpassingmake fmtapplied