-
Notifications
You must be signed in to change notification settings - Fork 68
Comparing changes
Open a pull request
base repository: databricks/databricks-sdk-go
base: v0.43.0
head repository: databricks/databricks-sdk-go
compare: v0.43.2
- 11 commits
- 48 files changed
- 4 contributors
Commits on Jul 3, 2024
-
Parse API Error messages with
interror codes (#960)## Changes Parsing error messages from the `/api/2.0/preview/scim/v2/Me` API causes parsing errors because the API returns the HTTP status (i.e. an `int`) as error code instead of a `string`. For example: ```json { "error_code": 403, "message": "Invalid access token." } ``` This PR solves the problem by parsing the `error_code` field as a `string` no matter its type. Note that the implementation is overkill because it also converts _any_ literal to a string (e.g. `true` becomes `"true"`). We could guarantee that the behavior is limited to converting `int` to `string` by adding a custom [Unmarshaler](https://pkg.go.dev/encoding/json#Unmarshaler) but this didn't seem worth the additional code. This PR also: - Refactors the code by removing the `APIErroBody` struct. The rationale is that the struct exists solely for parsing and is actually not used outside of the `parseErrorFromResponse` function. Turning it into an anonymous struct within `parseErrorFromResponse` makes the intent crystal clear. - Slightly restructures the test cases to better match go's naming conventions and separate the "three tests parts" (init, test, assert). ## Tests Added a unit test to verify that (i) an int error code are parsed as string, and (ii) that this string is properly ignored. - [x] `make test` passing - [x] `make fmt` applied - [x] relevant integration tests appliedConfiguration menu - View commit details
-
Copy full SHA for b58dc70 - Browse repository at this point
Copy the full SHA b58dc70View commit details
Commits on Jul 5, 2024
-
Add a credentials provider for Github Azure OIDC (#965)
_Note: this PR is a copy of PR #950 which could not be merged because of some unverified commits. Please check PR #950 for the original review and comments._ ## Changes This PR adds a `CredentialsProvider` to authenticate with Azure from Github workflows. The code is inspired by a similar feature already implemented in the Python SDK. It works as follows: 1. Obtain an ID token from Azure leveraging the env variables `ACTIONS_ID_TOKEN_REQUEST_URL` and `ACTIONS_ID_TOKEN_REQUEST_TOKEN` as [explained here](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-cloud-providers). 2. Exchange that ID token for an auth token. ## Tests Added a test suite which covers all the added code paths. I've also confirmed in my own Github Action that the code is properly able to authenticate. Note: I'm not super happy with how errors are compared (i.e. using a prefix) which is a little brittle. A better approach would be to leverage `errors.As` or `errors.Is`. However, it is difficult to do that at the moment without adding ad hoc new error types. A longer term solution would probably involve standardizing the package around a set of clearly defined error types shared by all implementations of `CredentialsProvider` in `config`. That is out of the scope of this PR though. - [x] `make test` passing - [x] `make fmt` applied - [x] relevant integration tests applied
Configuration menu - View commit details
-
Copy full SHA for 78b367a - Browse repository at this point
Copy the full SHA 78b367aView commit details -
Add DataPlane API Support (#936)
## Changes Add DataPlane API Support ## Tests Manual test: ``` input := []string{} input = append(input, "Hello, I'm a language model,") _, err := w.ServingEndpointsDataPlane.Query(context.Background(), serving.QueryEndpointInput{ Name: <...>, Inputs: input, }) require.NoError(t, err) ``` - [x] `make test` passing - [x] `make fmt` applied - [ ] relevant integration tests appliedConfiguration menu - View commit details
-
Copy full SHA for df99404 - Browse repository at this point
Copy the full SHA df99404View commit details
Commits on Jul 8, 2024
-
Add ChangelogConfig to Generator struct (#967)
## Changes Add ChangelogConfig to Generator struct ## Tests - [X] `make test` passing - [X] `make fmt` applied - [ ] relevant integration tests applied
Configuration menu - View commit details
-
Copy full SHA for f54345a - Browse repository at this point
Copy the full SHA f54345aView commit details -
[Internal] Improve Changelog by grouping changes (#962)
## Changes Improve Changelog by grouping changes ## Tests Recreated Changelog for Release v0.43.0 ``` ## 0.43.0 ### New Features and Improvements * Add `serverless_compute_id` field to the config ([#952](#952)). * Generate from latest spec ([#944](#944)). * Parse API Error messages with `int` error codes ([#960](#960)). * Support partners in SDK ([#925](#925)). * Update OpenAPI spec ([#947](#947)). ### Bug Fixes * Fictional commit for Changelog testing purposes ([#xxx](https://github.com/databricks/databricks-sdk-go/pull/xxx)). ### API Changes: * Added [w.ServingEndpointsDataPlane](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ServingEndpointsDataPlaneAPI) workspace-level service. * Added `Start` method for [w.Apps](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppsAPI) workspace-level service. * Added `CreateSchedule`, `CreateSubscription`, `DeleteSchedule`, `DeleteSubscription`, `GetSchedule`, `GetSubscription`, `List`, `ListSchedules`, `ListSubscriptions` and `UpdateSchedule` methods for [w.Lakeview](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#LakeviewAPI) workspace-level service. * Added `QueryNextPage` method for [w.VectorSearchIndexes](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#VectorSearchIndexesAPI) workspace-level service. * Added [catalog.CatalogIsolationMode](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CatalogIsolationMode). * Added [dashboards.CreateScheduleRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#CreateScheduleRequest), [dashboards.CreateSubscriptionRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#CreateSubscriptionRequest), [dashboards.CronSchedule](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#CronSchedule), [dashboards.DashboardView](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#DashboardView), [dashboards.DeleteScheduleRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#DeleteScheduleRequest), `any`, [dashboards.DeleteSubscriptionRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#DeleteSubscriptionRequest), `any`, [dashboards.GetScheduleRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GetScheduleRequest), [dashboards.GetSubscriptionRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GetSubscriptionRequest), [dashboards.ListDashboardsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#ListDashboardsRequest), [dashboards.ListDashboardsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#ListDashboardsResponse), [dashboards.ListSchedulesRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#ListSchedulesRequest), [dashboards.ListSchedulesResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#ListSchedulesResponse), [dashboards.ListSubscriptionsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#ListSubscriptionsRequest), [dashboards.ListSubscriptionsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#ListSubscriptionsResponse), [dashboards.Schedule](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#Schedule), [dashboards.SchedulePauseStatus](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#SchedulePauseStatus), [dashboards.Subscriber](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#Subscriber), [dashboards.Subscription](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#Subscription), [dashboards.SubscriptionSubscriberDestination](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#SubscriptionSubscriberDestination), [dashboards.SubscriptionSubscriberUser](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#SubscriptionSubscriberUser) and [dashboards.UpdateScheduleRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#UpdateScheduleRequest). * Added [jobs.PeriodicTriggerConfiguration](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#PeriodicTriggerConfiguration) and [jobs.PeriodicTriggerConfigurationTimeUnit](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#PeriodicTriggerConfigurationTimeUnit). * Added [marketplace.ProviderIconFile](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#ProviderIconFile), [marketplace.ProviderIconType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#ProviderIconType) and [marketplace.ProviderListingSummaryInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#ProviderListingSummaryInfo). * Added [serving.StartAppRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#StartAppRequest). * Added [vectorsearch.QueryVectorIndexNextPageRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#QueryVectorIndexNextPageRequest). * Added `IsolationMode` field for [catalog.ExternalLocationInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ExternalLocationInfo). * Added `MaxResults` and `PageToken` fields for [catalog.ListCatalogsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListCatalogsRequest). * Added `NextPageToken` field for [catalog.ListCatalogsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListCatalogsResponse). * Added `TableServingUrl` field for [catalog.OnlineTable](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#OnlineTable). * Added `IsolationMode` field for [catalog.StorageCredentialInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#StorageCredentialInfo). * Added `IsolationMode` field for [catalog.UpdateExternalLocation](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#UpdateExternalLocation). * Added `IsolationMode` field for [catalog.UpdateStorageCredential](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#UpdateStorageCredential). * Added `OnStreamingBacklogExceeded` field for [jobs.JobEmailNotifications](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#JobEmailNotifications). * Added `EnvironmentKey` field for [jobs.RunTask](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#RunTask). * Added `Environments` field for [jobs.SubmitRun](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#SubmitRun). * Added `DbtTask` and `EnvironmentKey` fields for [jobs.SubmitTask](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#SubmitTask). * Added `OnStreamingBacklogExceeded` field for [jobs.TaskEmailNotifications](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#TaskEmailNotifications). * Added `Periodic` field for [jobs.TriggerSettings](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#TriggerSettings). * Added `OnStreamingBacklogExceeded` field for [jobs.WebhookNotifications](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#WebhookNotifications). * Added `ProviderSummary` field for [marketplace.Listing](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#Listing). * Added `ServicePrincipalId` and `ServicePrincipalName` fields for [serving.App](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#App). * Added `QueryType` field for [vectorsearch.QueryVectorIndexRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#QueryVectorIndexRequest). * Added `NextPageToken` field for [vectorsearch.QueryVectorIndexResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#QueryVectorIndexResponse). * Changed `IsolationMode` field for [catalog.CatalogInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CatalogInfo) to [catalog.CatalogIsolationMode](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CatalogIsolationMode). * Changed `IsolationMode` field for [catalog.UpdateCatalog](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#UpdateCatalog) to [catalog.CatalogIsolationMode](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CatalogIsolationMode). * Removed `ConditionTask`, `DbtTask`, `NotebookTask`, `PipelineTask`, `PythonWheelTask`, `RunJobTask`, `SparkJarTask`, `SparkPythonTask`, `SparkSubmitTask` and `SqlTask` fields for [jobs.SubmitRun](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#SubmitRun). OpenAPI SHA: 7437dabb9dadee402c1fc060df4c1ce8cc5369f0, Date: 2024-06-24 ```
Configuration menu - View commit details
-
Copy full SHA for 951c091 - Browse repository at this point
Copy the full SHA 951c091View commit details -
Added more error messages for retriable errors (timeouts, etc.) (#963)
These are necessary to handle a problem with timeouts in permissions fetching ## Changes <!-- Summary of your changes that are easy to understand --> ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [x] `make test` passing - [x] `make fmt` applied - [ ] relevant integration tests applied Signed-off-by: Alex Ott <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c67dc8a - Browse repository at this point
Copy the full SHA c67dc8aView commit details -
## 0.43.1 ### Major Changes and Improvements: * Add a credentials provider for Github Azure OIDC ([#965](#965)). * Add DataPlane API Support ([#936](#936)). * Added more error messages for retriable errors (timeouts, etc.) ([#963](#963)). ### Internal Changes * Add ChangelogConfig to Generator struct ([#967](#967)). * Improve Changelog by grouping changes ([#962](#962)). * Parse API Error messages with `int` error codes ([#960](#960)).
Configuration menu - View commit details
-
Copy full SHA for 82b07c8 - Browse repository at this point
Copy the full SHA 82b07c8View commit details
Commits on Jul 9, 2024
-
[Internal] Enforce Tag on PRs (#969)
## Changes Enforce Tag on PRs ## Tests - [ ] `make test` passing - [ ] `make fmt` applied - [ ] relevant integration tests applied - [X] New check as part of the PR
Configuration menu - View commit details
-
Copy full SHA for a6222c8 - Browse repository at this point
Copy the full SHA a6222c8View commit details -
Generate SDK for
apierrchanges (#970)## Changes <!-- Summary of your changes that are easy to understand --> Generate the errors on which we should retry ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] `make test` passing - [ ] `make fmt` applied - [ ] relevant integration tests applied
Configuration menu - View commit details
-
Copy full SHA for f20ef58 - Browse repository at this point
Copy the full SHA f20ef58View commit details -
[Internal] Add Release tag and Workflow Fix (#972)
## Changes Add release tag ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] `make test` passing - [ ] `make fmt` applied - [ ] relevant integration tests applied
Configuration menu - View commit details
-
Copy full SHA for f111a28 - Browse repository at this point
Copy the full SHA f111a28View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0825ef - Browse repository at this point
Copy the full SHA f0825efView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.43.0...v0.43.2